Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Problems with Scenes

Status
Not open for further replies.

chris0walker

IS-IT--Management
Jan 23, 2003
4
GB
Hi,

I want to create a MovieClip for my library that contains three buttons. the first one will get the "_root" to move to the next Scene. the second will replay the current scene and the third will goto the previos scene. I would then be able to import the library to other movies and reuse it!

The problem I am having is that the following code isnt working:

on (release) {
tellTarget ("_Parent") {
nextScene();
}
}

but if i enter the following it does:

on (release) {
tellTarget ("_Parent") {
gotoAndStop("Scene 2", 1);
}
}

However the latter will only work if moving forward to scene 2.

nextScene();

works fine if I have a button with an action script in the movie itself but not if i try to use it from with in a movie clip simbol?

Any help would save me pulling my hair out.

Cheers

Chris
 
Don't use scene names but labeled frames instead...
While you're at it, use simple dot syntax rather than tellTarget which is deprecated.

Label the first frame of your targeted scene with an unique label such as my_target(no number only labels or at least not starting off with a number), add _root or _parent to your path, and target the labeled frame...

on(release){
_parent.gotoAndStop("my_target");
}



Regards,

cubalibre2.gif
 
Yes could do that, but I want to be able to reuse the toolbar for each scene in my animation, without having to edit any action script, so i can keep it as simple as possible for non technical users to create something, similar to PowerPoint.

This would then be easier than PowerPoint to view over a large network. (we are a school and I want teachers to be able to produce some content!)

Cheers

Chris
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top