Bonjour,
j'ai une ligne et une image superposée, comment faire pour que l'image "cache" la ligne
Merci
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):
* 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.
![]()
Pensez vraiment à effectuer une recherche avant de poster, ici et sur un moteur de recherche! c'est la moindre des choses
Pensez au tag
Mon Blog sur la techno Flex
Ma page sur Developpez.com
Jim_Nastiq
J'ai modifié l'ordre d'appel de addChild pour obtenir ce que je voulais
Merci
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4 myCanvas.rawChildren.addChild(myShape); myCanvas.rawChildren.addChild(mySprite); myCanvas.rawChildren.addChild(myimg);
Partager