GNubie
02-15-2005, 02:49 PM
I am trying to create a virtual tour by loading an image and incrementally shifting its position off the stage by decrementing property _x. The image loads and gets shifted to the left once, but then gets reset back to the original position.
This appears to be caused by continual re-execution of Layer 1/Frame 1 which contains the initialization script. It should not because I do a gotoAndPlay(9) right after decementing property _x in frame 20.
The test program has only 2 layers and 20 frames.
Layer 1/Frame 1 Code:
// Load image file.
this.createEmptyMovieClip("myMovie_mc", 1);
myMovie_mc.loadMovie("ef_mp.jpg");
setProperty(this.myMovie_mc, _y, 0);
setProperty(this.myMovie_mc, _x, 0);
Layer 2/Frame 20 Code:
setProperty(this.myMovie_mc, _x, Number(getProperty(this.myMovie_mc, _x))-10);
myMovie_mc.gotoAndPlay(9);
1. Why does it not loop from frame 20 back to 9? :confused:
2. Why does Layer 1/Frame 1 get continuously re-exectued? I have no looping properties set and Repeat is set to 0. :confused:
Using FlashMXPro 7.
I would welcome pointers specific tuts or documentation. If you know of a better way to create a virtual tour, please suggest it.
This appears to be caused by continual re-execution of Layer 1/Frame 1 which contains the initialization script. It should not because I do a gotoAndPlay(9) right after decementing property _x in frame 20.
The test program has only 2 layers and 20 frames.
Layer 1/Frame 1 Code:
// Load image file.
this.createEmptyMovieClip("myMovie_mc", 1);
myMovie_mc.loadMovie("ef_mp.jpg");
setProperty(this.myMovie_mc, _y, 0);
setProperty(this.myMovie_mc, _x, 0);
Layer 2/Frame 20 Code:
setProperty(this.myMovie_mc, _x, Number(getProperty(this.myMovie_mc, _x))-10);
myMovie_mc.gotoAndPlay(9);
1. Why does it not loop from frame 20 back to 9? :confused:
2. Why does Layer 1/Frame 1 get continuously re-exectued? I have no looping properties set and Repeat is set to 0. :confused:
Using FlashMXPro 7.
I would welcome pointers specific tuts or documentation. If you know of a better way to create a virtual tour, please suggest it.