PDA

View Full Version : problems passing variables in flash


gobadgrs
03-31-2005, 01:24 PM
I cant seem to pass variables to get a file loop to run properly.

I have one actionscript layer where I set

check1 = false. The timeline for that layer extends the full length of the movie.

in the second frame (on a new layer) I have the code

if (_root.check1 = true){

_root.slide._x=15+((_root.moviePlayed/_root.movieLength)*370);


}

else
{
_root.check1= true;
}

in the third frame I just tell the movie to gotoAndPlay(2);

Because of a display problem I just want to delay the loop by 1 count. I am making a media player and when you drag the slide to a new position it will jump back to the original position for 1 frame before going to the new position.

I never get the else loop to run. Somehow the check1 always equals true....
Why cant I seem to properly change the variable on the actionscript layer? All the action script is also on the main timeline.

cannon303
03-31-2005, 01:30 PM
should your first line have 2 "=" ie
if (_root.check1 == true)

gobadgrs
03-31-2005, 01:44 PM
the double == doesnt fix the problem

cannon303
03-31-2005, 01:47 PM
could u attach movie?