I’m scrolling a movie clip from about.swf
Now when about is loaded into my index.swf the scroller in about doesn’t work. I have a feeling I know the problem, because I am using _global. Now I used this because when I started using FMX 2004 the actionscript I previously used didn’t work anymore. Not too sure why. But anyway here is my code.
onClipEvent (load) {
_global.tarX = 719;
_global.tarY = 91.0;
}
onClipEvent (enterFrame) {
this._x += (tarX-_x)/3;
this._y += (tarY-_y)/3;
_root.scrollUp.onPress = function(){
if(_global.tarY < 91){
_global.tarY = _global.tarY + 25;
}
}
_root.scrollDown.onPress = function(){
if(_global.tarY > -34){
_global.tarY = _global.tarY - 24;
}
}
}
Thanks