Hi,
Here is the code.
stop();
import flash.events.MouseEvent;
import flash.utils.setTimeout;
this.addEventListener(MouseEvent.MOUSE_DOWN, onClick);
function onClick(e:MouseEvent):void {
test()
//setTimeout(test, 80);
}
function test() {
var b:Blah = new Blah();
addChild(b);
}
Jobe Makar
http://www.electrotank.com
252-627-8026
919-609-0408 (mobile)
919-882-1121 (fax)
From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of Sherif
Abdou
Sent: Monday, February 11, 2008 7:01 PM
To: [email protected]
Subject: Re: [flexcoders] Bad Flash bug - MouseEvent and MovieClips
you have the actionscript since i dont have flash, i can test in flex and see
if i can help
----- Original Message ----
From: Jobe Makar <[EMAIL PROTECTED]>
To: "[email protected]" <[email protected]>
Sent: Monday, February 11, 2008 5:40:22 PM
Subject: [flexcoders] Bad Flash bug - MouseEvent and MovieClips
Hi guys,
I just ran into a nasty Flash bug. I hope that someone tells me I'm wrong here.
You can download the tiny example FLA here:
http://www.electrot ank.com/lab/ MouseEventBug.
fla<http://www.electrotank.com/lab/MouseEventBug.fla>
I have a function called 'test'. When run, test creates a new Blah() movie
clip. Blah() contains movie clip that has many frames, and a stop action so
they don't play.
If I run test() as the result of a MouseEvent, then that internal clip
automatically plays. (which it shouldn't)
If I run test() as the result of something else, then it does not automatically
play.
In my example you can see where I have a line of code commented out, and the
one above it is not. Just swap the commenting to see it work/not work.
ps - If you are playing this this code and you see the setTimeout, try lowering
the time delay. If you lower it enough the bug starts happening again. Very
very strange.
Jobe Makar
http://www.electrot ank.com<http://www.electrotank.com/>
252-627-8026
919-609-0408 (mobile)
919-882-1121 (fax)
________________________________
Be a better friend, newshound, and know-it-all with Yahoo! Mobile. Try it
now.<http://us.rd.yahoo.com/evt=51733/*http:/mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ%20>