Copy link to clipboard
Copied
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 ?
Copy link to clipboard
Copied
Which line is line 53?
Copy link to clipboard
Copied
Sir, that's irrelevant. I had written another code above , then converted it as a comment.
So, the above code is all that is valid.
Copy link to clipboard
Copied
I´m not sure if its due to language barriers, but your reply comes across as snarky.
If someone, who is considered an expert on this forum asks you to provide better information it is not to belittle you, but to help you efficiently.
So, the above code is all that is valid.
The code you provided has nothing in it that could hint at what causes the compile error.
If you don`t know how to read Error messages, then most here will gladly help you to improve that skill.
Find more inspiration, events, and resources on the new Adobe Community
Explore Now