Copy link to clipboard
Copied
Hi everyone,
I've got a problem with my script. In first frame I have 3 image:
First image = go to frame 2
Second image = go to frame 3
Third image = go to frame 4
I can use arrow keys (left/right) to go from frame 1 to frame 2 (example). But when I click in first frame (frame with 3 images) on image, for example 1, script go me to frame 2, I must first click LBM inside my swf, so that use arrow keys left/right.
My script in frame 1.
qrPA.addEventListener(
MouseEvent.CLICK,
function(e:MouseEvent):void
{
gotoAndPlay(2);
}
);
qrKM.addEventListener(
MouseEvent.CLICK,
function(e:MouseEvent):void
{
gotoAndPlay(3);
}
);
qrGK.addEventListener(
MouseEvent.CLICK,
function(e:MouseEvent):void
{
gotoAndPlay(4);
}
);
try adding
stage.focus=this;
on your main timeline.
Copy link to clipboard
Copied
try adding
stage.focus=this;
on your main timeline.
Copy link to clipboard
Copied
Thanks, but it's not working.
Copy link to clipboard
Copied
what's lbm?
Copy link to clipboard
Copied
Left Button Mouse
Copy link to clipboard
Copied
i don't know why your swf would be losing focus but apply that code in frame 2 or wherever you're losing focus.
Copy link to clipboard
Copied
Thanks man, I added your code to every frame and now it's working.
Thanks one more time.
Copy link to clipboard
Copied
you're welcome.
Find more inspiration, events, and resources on the new Adobe Community
Explore Now