0

I am completely new using Flash and I am doing a project to enhance my skills.

I wonder if there's a way to connect a button doing 2 different things.

I created a slide button that goes on X axis only using Gesture (Touch) and also I created a movie clip showing a map progressing (changes) I would like to connect them, something like every single frame this button goes on this slide it also plays one frame inside the movie clip and return of course.

I think I made myself clear, as it goes along the axis it plays the movie clip.

is there a way to approach for this idea?

ps: It looks very advanced

1 Answers1

0
MySprite.addEventListener(TouchEvent.TOUCH_BEGIN, onTouchBegin);
MySprite.addEventListener(TouchEvent.TOUCH_END, onTouchEnd);
MySprite.addEventListener(Event.ENTER_FRAME, fixer);

function onTouchBegin(e:TouchEvent) {
     e.target.startTouchDrag(e.touchPointID);
     trace("touch begin");

 }
function onTouchEnd(e:TouchEvent) {
     e.target.stopTouchDrag(e.touchPointID);
     trace("touch end");
}
function fixer(e:Event) {
     e.currentTarget.x = [int here];
     if(runIt){
         e.currentyTarget.x += speed;
     }
}
wuiyang
  • 409
  • 2
  • 5
  • 18