Ok, for my site i have a preloader that slides in, then it slides out once it’s finished. I decided to change a couple things, now the same file with some unrelated changes is giving me syntax errors when publishing it. Heres some code:
import mx.transitions.Tween;
preloader.bar._visible = false;
container._x = container._y=0;
var preloadTween:Tween = new Tween(preloader, "_x", mx.transitions.easing.Regular.easeOut, Stage.width+100, 428.9, .5, true);
preloadTween.FPS = 30;
preloadTween.onMotionFinished = function() {
my_mc = new MovieClipLoader();
preload = new Object();
my_mc.addListener(preload);
preload.onLoadStart = function(targetMC) {
container._visible = false;
preloader.bar._visible = true;
preloader.border._visible = true;
};
preload.onLoadProgress = function(targetMC, lBytes, tBytes) {
preloader.bar._xscale = (lBytes/tBytes)*100;
};
preload.onLoadComplete = function(targetMC) {
var preloadDoneTween:Tween = new Tween(preloader, "_x", mx.transitions.easing.Regular.easeIn, 428.9, Stage.width*0.1-500, .5, true);
preloadDoneTween.FPS = 30;
preloadDoneTween.onMotionFinished = function() {
container._visible = true;
preloader.border._visible = false;
preloader.bar._visible = false;
};
};
trace(container._x);
my_mc.loadClip("jj.swf", "container");
container._lockroot = true;
};
Im getting this in the output window:
**Error** Scene=Scene 1, layer=actions, frame=1:Line 6: There is no property with the name 'onMotionFinished'.
preloadTween.onMotionFinished = function() {
**Error** Scene=Scene 1, layer=actions, frame=1:Line 21: There is no property with the name 'onMotionFinished'.
preloadDoneTween.onMotionFinished = function() {
Total ActionScript Errors: 2 Reported Errors: 2