Hi All
I figured this would be easy but for some reason I can't get it right.
I have a movie clip that loads a video and streams it. But what I want to do is have the video stream first time but second time it is loaded to go to a stop position.
I have defined a variable x=1; in a movie clip called movieVar - and on the button that calls the video.swf I have put
on(release)
{
_root.movieVar.x=x++;
}
Now in the video .swf on frame 1 I have put:
if(_root.movieVar.x >= 2){
gotoAndPlay(2);
}else{
gotoAndStop("videoStop" );
}
When I first load the video.swf the x variable in movieVar says 'undefined' but when I click the button again to load it it does give it a value of 1 - and then I press again and it goes to 2.
So why is it saying undefined when the button is pressed for the first time?
Any ideas where I am going wrong?
All help much appreciated.
Drew




Bookmarks