Weird issue with motion tween in Flash CS3


hey guys,

 

got a  weird  issue motion tween.

 

im making kind of  slideshow project; assume every frame  a  single  slide.  of  the  frames  have eventlisteners

keyboardevent.key_down  event.  just  like  this  example:

 

-------------------------------------------------------

import flash.events.keyboardevent;

 

stage.addeventlistener(keyboardevent.key_down, keypressed);

 

 

function keypressed (e:keyboardevent):void
{
    if (e.keycode == keyboard.right)

    { gotoandplay("menu5")

    }

}

------------------------------------------------------

 

so  whenever  click right arrow on keyboard navigates next slide, worked  perfectly  until i  created frame  motion tween on it.

it's simple box  moves left right , stops,  pop-up menu.   new  frame  has completely  no actionscript  excluding  stop();  command not move next slide itself.  here weird part:   when press right arrow button on frame motion tween replays itself!  strange right?

i can't it, why plays left right tween again?  if i  create a  new blank project  and  copy  box movieclip , test again - nothing happens. looks previous frame's actionscript somehow interferring frame.

 

any aprecciated,

i'm using flash cs3 , actionscript 3.0.

 

also i've uploaded slideshow, run through see yourslef. (frame labeled menu5 frame box on it)

http://www.megaupload.com/?d=pevmigog

all keyboard listeners active unless remove them.  reason you're not seeing more problems because event listeners executing in order created them last goto seen on-stage (but they're executing).

 

to remedy, on keyframes use:

 

 

import flash.events.keyboardevent;  stage.addeventlistener(keyboardevent.key_down, keypressed);  function keypressed (e:keyboardevent):void { 
    if (e.keycode == keyboard.right) stage.removeeventlistener(keyboardevent.key_down, keypressed);     { gotoandplay("menu5")     } }


More discussions in Adobe Animate CC - General


adobe

Comments

Popular posts from this blog

Flip address is out of range arduino uno r3

Arduino Uno not uploading

Indesign and MathType fonts