473,324 Members | 1,646 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,324 software developers and data experts.

Button in swf file no longer working once loaded into the master swf

37
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
Apr 28 '08 #1
4 2255
nomad
664 Expert 512MB
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
Apr 29 '08 #2
Max58kl
37
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
May 1 '08 #3
nomad
664 Expert 512MB
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
May 2 '08 #4
Max58kl
37
Hi

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


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
Jun 5 '08 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

7
by: code100579 | last post by:
Hi there, sorry if this is a really simple question. I need to write code for: If a button is pushed and then one variety of other buttons is pushed then certain options on the program will...
1
by: needin4mation | last post by:
protected void Page_Load(object sender, EventArgs e) { TextBox mpTextBox = (TextBox)(Master.FindControl("txtFreeSearch")); Response.Write("mp" + mpTextBox.Text); //only works the second time ...
2
by: Gregory Gadow | last post by:
I have a large website written to use ASP.Net 2.0. The master page has a "logout" button. If the child page does not have an explicitly defined default button (most do not), the page posts back...
1
by: Tlholo | last post by:
Here are the requirements for the project. I have also included the other project that I am working on and is also giving me some problems. i need code examples. Project 1 This program actually...
3
by: Jay | last post by:
I am on the 2.0 framework and have run the c:\windows\microsoft.net \framework\v1.1.4322\aspnet_regiis.exe -c and had no success. About half of the buttons on my webforms are firing and the other...
6
by: Sunfire | last post by:
Is there a way you can test what page is loaded from inside a master page? What I need to do is test to see what page is loaded inside the master page and then gray out the root item linked to that...
2
by: =?Utf-8?B?UGF1bA==?= | last post by:
Hi I have a menu contol on a master page and some dropdown boxes and text boxes on another page that gets loaded into the place holder of the master page. The dropdown menu on the master page...
8
by: Harvey Schmidlapp | last post by:
I have a fairly complex form (generated by means of an ASP 3 page). The form is used to define a query against a database. After running a query, the user hits their browser's back button and goes...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.