Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Arrow KEYS required click LMB

New Here ,
Oct 12, 2014 Oct 12, 2014

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);

    }

);

TOPICS
ActionScript
398
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Expert , Oct 12, 2014 Oct 12, 2014

try adding

stage.focus=this;

on your main timeline.

Translate
Community Expert ,
Oct 12, 2014 Oct 12, 2014

try adding

stage.focus=this;

on your main timeline.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Oct 13, 2014 Oct 13, 2014

Thanks, but it's not working.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Oct 13, 2014 Oct 13, 2014

what's lbm?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Oct 13, 2014 Oct 13, 2014

Left Button Mouse

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Oct 13, 2014 Oct 13, 2014

i don't know why your swf would be losing focus but apply that code in frame 2 or wherever you're losing focus.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Oct 13, 2014 Oct 13, 2014

Thanks man, I added your code to every frame and now it's working.

Thanks one more time.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Oct 13, 2014 Oct 13, 2014
LATEST

you're welcome.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines