View Full Version : Target FrameLable
Jose Antonio
05-15-2005, 07:26 PM
Hi,
I don't know when one graduates to the next level, but I consider myself a NEWBIE still, and I haven't found a tutorial on this so.....
I have a Main Movie with 5 buttons. Each one has ActionScript to gotoandplay a Frame Lable. Once there I have ActionScript to load an external swf onto a level; each externaly loaded swf has Frame Lables also.
Question:
I want to have a separate button on the Main Movie (not one of the other 5 buttons) target a Frame Lable that resides in one of the externaly loaded swf's, what would be the ActionScript or Target Path for this?
I don't know the proper jargon so I hope this question is clear
Peace
Jose Antonio
Flash Gordon
05-15-2005, 07:47 PM
FYI label != lable;
in the loaded swf's use
on(release) {
_level0.gotoAndStop(1);
//or whatever you need it to be
}
Ricod
05-15-2005, 07:50 PM
That depends on where you load the swfs. Do you load them into a seperate _level or into a mc ?
Let's say you load an SWF number 3 into _level3 and there's a frame labled "SpecialFrame".
_level3.gotoAndPlay("SpecialFrame");
If you load the same SWF into "holder_mc" on the main timeline, the path would be :
_root.holder_mc and to tell it to go SpecialFrame : _root.holder_mc.gotoAndPlay("SpecialFrame");
The tutorial about this subject is : http://www.actionscript.org/tutorials/beginner/paths/index.shtml
Jose Antonio
05-15-2005, 11:41 PM
Thanks for the quick reply but neither of these worked.
(FYI: I'm not targeting an MC, just a Level, and that tutorial covers MC's not SWF's, unless ofcourse MC's and SWF's are used interchangeably? Either way doesn't this tutorial cover targeting a movie that already resides somewhere within the Main Time?)
My target resides in an external Movie (.swf file) that has not been loaded yet. This Movie (.SWF file) loads into the Main Movie's Time Line on a Mouse Event that sends the Playhead to a Frame Lable in the Main Movies Time Line where I have ActionScript on a Frame that loads that external Movie (.SWF file).
I'm looking to target that Movie's (.SWF file) Frame Lable from anywhere in the Main Movies Time Line.
Doesn't the ActionScript suggested assume that the Movie (SWF file) I want to target is already loaded?
Flash Gordon
05-15-2005, 11:57 PM
try out my attachment here:
http://actionscripts.org/forums/showthread.php3?t=72916
4 or 5th one down.
Jose Antonio
05-16-2005, 02:10 AM
try out my attachment here:
http://actionscripts.org/forums/showthread.php3?t=72916
4 or 5th one down.
What version of Flash are you using cause I couldn't open file?
I'm using Flash MX
Ricod
05-16-2005, 03:01 PM
You can only target frames that are already loaded. You can't target something that's not there.
What are you trying to achieve ? If you explain what you want to do, then maybe we can suggest a different approach.
Jose Antonio
05-16-2005, 08:36 PM
You can only target frames that are already loaded. You can't target something that's not there.
What are you trying to achieve ? If you explain what you want to do, then maybe we can suggest a different approach.
I have a Form -Contact Us- that resides in an external swf ( company.swf )that I wanted to target from anywhere in the site. I knew that ( company.swf ) would have to be loaded on the main movie in order for me to access the -Contact Us- Frame Lable, I was looking for a path to it.
I thought I could just gotoandPlay Frame Lable ( company info ) in the Main Movie's Time Line thus loading the external swf and then use gotoandPlay Frame Lable again in that swf to where the Form resides but that didn't work cause I couldn't use two gotoandPlay back to back thus the original question how do I target an external swf' frame lable.....
I have resolved the issue by creating another swf with just the form and adding an on release loadMovieNum on a button ( Contact Us ) that resides in the main movie's time line so I can call the form from anywhere.
If you can still tell me how to target that external swf, please do. And thanks for the help
Peace
Jose Antonio
Ricod
05-17-2005, 01:52 PM
It depends on where you load it. Did you read the paths tutorial I posted ? It's in the tutorial section.
Let's say your swf has a mc labeled 'form' on the main timeline of company.swf.
Let's say, in that mc, there's a frame labeled 'someFrame'. If you load company.swf into _level2 of your main movie, then in order to play from 'someFrame' :
_level2.form.gotoAndPlay("someFrame");
Which works, once it's loaded. Make sure it is, before you proceed.
You can use something like getBytesTotal() to see how many bytes there are and getBytesLoaded() to see how much you've loaded so far.
Jose Antonio
05-17-2005, 06:11 PM
Thanks for the help
Peace
Jose Antonio
Ricod
05-18-2005, 10:40 AM
No problem. :)
|
vBulletin® v3.8.5, Copyright ©2000-2012, Jelsoft Enterprises Ltd.