Help | Site Map
Connecting Tech Pros Worldwide
Reply
 
LinkBack Thread Tools
  #1  
Old April 28th, 2008, 10:04 PM
Newbie
 
Join Date: Nov 2007
Posts: 24
Default Button in swf file no longer working once loaded into the master swf

Hi

I have a main swf file that loads in 2 other swfs.
The 2 other swfs have on their timeline a movieClipController the plays
their timeline in reverse when a button is clicked.
When I view the 2 swfs on their own everything works as it should, the timeline
plays in reverse.
But when I load either of the swfs into the main swf and click on the button that reverses the timeline nothing happens.

I tried turning the information on the timeline of the main swf into a movie clip and giving it an instance name "base"
Then I added the instance name to the path on the button of the loaded clip

on (release) {
_root.base.control.gotoAndPlay(2);
}

which made no difference.

Can someone please help with this.


Regards Max
Reply
  #2  
Old April 29th, 2008, 07:45 PM
nomad's Avatar
Expert
 
Join Date: Mar 2007
Location: CA.
Posts: 562
Default

Quote:
Originally Posted by Max58kl
Hi

I have a main swf file that loads in 2 other swfs.
The 2 other swfs have on their timeline a movieClipController the plays
their timeline in reverse when a button is clicked.
When I view the 2 swfs on their own everything works as it should, the timeline
plays in reverse.
But when I load either of the swfs into the main swf and click on the button that reverses the timeline nothing happens.

I tried turning the information on the timeline of the main swf into a movie clip and giving it an instance name "base"
Then I added the instance name to the path on the button of the loaded clip

on (release) {
_root.base.control.gotoAndPlay(2);
}

which made no difference.

Can someone please help with this.


Regards Max
Max:

Try some thing like this
Make a new layer called labels.
Make a blank keyframe at each movieClip and give them a name in the Propeties Window.
Frame base
Label type: Name

Then on your button:
on (release) {
//Movieclip GotoAndStop Behavior
this.gotoAndStop("base");
//End Behavior
}

Make a copy before you do this thou...

nomad
Reply
  #3  
Old May 1st, 2008, 11:20 AM
Newbie
 
Join Date: Nov 2007
Posts: 24
Default

HI

I tried creating a new layer and adding a frame label as you suggested,
and still nothing happens when I click the button that should play the timeline in reverse.
The is the code on each frame of the MC Controller

Frame 1. stop();

Frame 2. _root.prevFrame(); // Frame 2 has the label "base" on the layer above.

Frame 3. gotoAndPlay("base");

This is the code on the (play in reverse) button

on (release) {
_root.control.gotoAndPlay("base");
}



Any further suggestions would be appreciated!

Regards Max
Reply
  #4  
Old May 2nd, 2008, 06:09 AM
nomad's Avatar
Expert
 
Join Date: Mar 2007
Location: CA.
Posts: 562
Default

Quote:
Originally Posted by Max58kl
HI

I tried creating a new layer and adding a frame label as you suggested,
and still nothing happens when I click the button that should play the timeline in reverse.
The is the code on each frame of the MC Controller

Frame 1. stop();

Frame 2. _root.prevFrame(); // Frame 2 has the label "base" on the layer above.

Frame 3. gotoAndPlay("base");

This is the code on the (play in reverse) button

on (release) {
_root.control.gotoAndPlay("base");
}



Any further suggestions would be appreciated!

Regards Max
Max
did you make the button or did you use one from the library.
Can you please tell me what you used to create the button and what keyframes you used as well.

nomad
Reply
  #5  
Old June 5th, 2008, 09:19 PM
Newbie
 
Join Date: Nov 2007
Posts: 24
Default

Hi

I recently received the following information, which thankfully resolved the issue.


Quote:
scope issue.

when you play the 2 movies alone _root refers to it's own root timeline. when you load that movie into a new parent movie, _root refers to the parent's main timeline.

you can either:

set _lockroot to true on the movieclips that you load in.

or:

change your references to _root in the loaded movieclips to relative paths instead of absolute paths.
I placed -
Expand|Select|Wrap|Line Numbers
  1. this._lockroot = true;
on the first frame of the first scene in both of the loaded swfs
and the timelines successfully play in reverse when loaded into the main movie.

Regards Max
Reply
Reply

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over network members.
Post your question now . . .
It's fast and it's free

Popular Articles