|
-
Yer already figured out _currentframe ..
I'm testing the stuff now, i saw a few other posts with the same question,
if i have solved it i will post it here for others to use ..
Cheers
-
Ok, gheghe .. done it, AS is pretty cool .. never worked with it ..
So shortcut version, i didn't want to reload the flash movie everytime
the user clicked somewhere in the menu.
So this is the code (based on my envirement).
I've put this at the first frame.
Code:
// function for saving the current frame
function saveCurrentframe() {
LSO.data.currentframe = this._currentframe;
//trace(LSO.data.currentframe);
}
//create the Local Shared Object
LSO = SharedObject.getLocal("pacman" );
//check content currentframe and do something
if(LSO.data.currentframe != null && LSO.data.currentframe != 350)
gotoAndPlay(LSO.data.currentframe);
else
LSO.data.currentframe = 1;
gotoAndPlay(LSO.data.currentframe);
So... I check if the currentframe is empty (not set) or at the end of my movie (frame 350), set it to 1 (so it starts at the beginning) and play the frame, if it's not true, play the saved frame.
The function saveCurrentframe(), has been put on every frame left (counting from 2), copy paste it 
Well if someone has a better solution or has some modifications, please reply ..
(Used Flash CS3)
Cheers
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|