Not able to pause/resume a scrolling image

Hi all

I wrote a post re there try to pause/resume a scrolling image a few days. I still have the problem that keeps development. I have attached the code snippet and be grateful for the help please. If the image is replaced by a text string, the methods to pause/resume work. I walked through the code with the debugger and the methods are called, but it's not yet to stop scrolling!

Any help is highly appreciated or code suggestions, for example, on a better way to do it. Thank you

Cheers!

DaveJ

This is a more elegant solution. Get rid of the callLater() calls entirely and use a timer to invoke the effect of movement:



http://www.Adobe.com/2006/mxml"creationComplete =" initApp () ">"
import flash.utils.Timer;
import flash.events.TimerEvent;

[Bindable]
public var speed: Number = 5;

private var myTimer:Timer;

private function initApp (): void {}
myTimer = new Timer (1, 0);
myTimer.addEventListener ("timer", Moveimage);
myTimer.start ();
}

public function changeSpeed (): void {}
Speed = speedSelector.value;
}

private void moveImage(e:Event):void {}
myMove.end ();
If (theImage.x > c1.width) {}
theImage.x = 0 - theImage.width;
}
myMove.xTo = theImage.x + speed;
myMove.play ();
}
]]>



horizontalScrollPolicy = "off" width = "100%" >

Height = "100".
Width = "100".
mouseOver = "myTimer.stop ()" "
mouseout/mouseouthandler() = "myTimer.start ()" "
/>




ID = "speedSelector" snapInterval = "1" tickInterval = "1" liveDragging = "true".
change = "changeSpeed ()" / > "

HTH,
Matt Horn
Flex docs

Tags: Flex

Similar Questions

Maybe you are looking for