Bonjour,
j'ai une ligne et une image superposée, comment faire pour que l'image "cache" la ligne :?
Merci
Version imprimable
Bonjour,
j'ai une ligne et une image superposée, comment faire pour que l'image "cache" la ligne :?
Merci
Salut,
il te faut gérer la displayList.
Tu peux "échanger" la position de deux élément avec la méthode swapChildren.
voici qq méthode qui devrait t'aider (valable pour les DisplayObject):
Citation:
* contains(): Determines whether a display object is a child of a DisplayObjectContainer.
* getChildByName(): Retrieves a display object by name.
* getChildIndex(): Returns the index position of a display object.
* setChildIndex(): Changes the position of a child display object.
* swapChildren(): Swaps the front-to-back order of two display objects.
* swapChildrenAt(): Swaps the front-to-back order of two display objects, specified by their index values.
J'ai modifié l'ordre d'appel de addChild pour obtenir ce que je voulais :ccool:
MerciCode:
1
2
3
4 myCanvas.rawChildren.addChild(myShape); myCanvas.rawChildren.addChild(mySprite); myCanvas.rawChildren.addChild(myimg);