How to roll over image tiles and bring image to front ?
Hey
I have started practising AS3 from O'Reilly.Wanna make a game in it.
I have created an image collage on the stage by importing & resizing images.
Then, I made all of them as individual symbols named "Pic1","Pic2",..
Then I created variables in AS named "Pic1":MovieClip (then addChild(Pic1)),"Pic2" :MovieClip (then addChild("Pic2") and so on..
then as O'reilly says
this.addEventListener(MouseEvent.MOUSE_OVER, onBringToTop, false, 0,
true);
function onBringToTop(evt:MouseEvent):void {
this.setChildIndex(evt.target, this.numChildren-1);
}
Images not moving.
Error:
| Scene 1, Layer 'Layer 1', Frame 1, Line 53 | 1118: Implicit coercion of a value with static type Object to a possibly unrelated type flash.display:DisplayObject. |
So what do I need to learn more ? ![]()