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 IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Loading an external .swf to a specific frame label? 2

Status
Not open for further replies.

DEEZL

Technical User
Dec 13, 2004
12
CA
I've created 2 .swfs (main.swf, products.swf). On the main.swf is a dropdown menu bar that can access products.swf or link directly to certain items in the products.swf.

In the main timeline of the products.swf, I've put the 4 products (every 10 frames) and stopped and labelled the frames where they begin.

Here's my dilemma:

I can easily load the products.swf over the main.swf with:
Code:
on (release){
_root.loadMovie("products.swf");
}
but the user has the option of going directly to the product of interest (which is noted by a label within products.swf).

So, what I'd like to do is be able to load this external movie clip directly to a frame label.

I searched this site (I didn't want to repeat post), but if anyone has any answers to this, I'd really appreciate it.

BTW, I'm using MacOS X Flash MX 2004 Professional.
 
but.onRelease = function(){
clip.loadMovie("products.swf?jump=3");
}


products frame 1

if(jump!=undefined){
gotoAndPlay(jump)
}
stop();

wont work in authoring only browser page
 
oldnewbie,

Thanks, this works fine. I've encountered an interesting problem, though. Maybe you can help?

When I use the process you provided, the 2nd .swf file opens to whatever label I choose. Great! But, there is navigation within this 2nd .swf that now doesn't work —I'm trying to navigate within the .swf.

So, if user clicks Products (and not a specific product), s/he goes to Products.swf intro-type page. S/he has the option of clicking to other products.

Does this make sense? Perhaps I should link to the file I'm working on?

Thanks

 
DEEZL,

Sorry, I am not replying to you post..I actually have a question for you. I am trying to do what you origianally asked (load swf and go to specific frame). The link above from oldnewbie does not work for me and the second one from billwatson gives me errors. Is there any way you could explain oldnewbie's? I click on the link and it gives me and error. Looks like it is supposed to be downloading something...if so could you email it to me?

Thanks!!
B
 
Bwalkley,

Darn it. I thought you had a solution for me. Oh well. I only halfway understand oldnewbie's brilliant solution, so I can't really explain it, but I can email you. What's your email address? I'm at justaverageiq [a] yahoo [d] com. You can respond there, if you, like and I'll send you the .zip
 
me again. my emails keep getting bounced back from that address....

could you try mine: brettwalkley [a] hotmail [d] com
 
b, i've sent the file to your email.
 
DEEZL, you probably have references in your code of the loaded movie to _root, which when loaded in a container clip of another main movie, now wrongly point to the root level of the main movie rather to the root level of the loaded movie itself.

If you're on MX2004, you can solve that problem with the use of _lockroot. If not, you'll have to change all references to _root in the loaded movie to the appropriate this or 1 or more _parent's.

Regards. Affiliate Program - Web Hosting
 
Hi, oldnewbie,

I checked my loaded file and I haven't used _root to navigate. This is the code I'm using (within the loaded .swf):

Code:
on (release) {
gotoAndPlay("product1");
}

I'm merely telling it to jump to a frame label on click. I should say that it does try to go there, but it just goes back to the referencing page after showing it briefly. To better illustrate my problem, here's a link to an example of what my file looks like, and what I'm trying to do:


Thanks for the assist.

PS. The ultimate destination for all this is a CDRom, if that matters.
 
It seems that the folder is empty.

How about gotoAndStop in your scripts... rather than gotoAndPlay?

Otherwise, make your .fla available and in a MX only format not MX2004.

Regards. Affiliate Program - Web Hosting
 
I've changed to gotoAndStop but that didn't work either. Will keep trying other things.
 
That worked. Thanks.

Just a question: Why does the navigation in the "main_menuTEST.swf" override that of "productsTEST.swf'?
If the 2nd .swf is being loaded into a blank movieclip on top of the 1st .swf, wouldn't it be covered up? This would need to work for me because of colour changes on the dropdown menus of each page.

Sorry if these questions are elementary. Design is more my thing, but learning the programming side of things seems to be equally, if not more important. Plus, it's more interesting.
 
Well it's loaded within the 1st movie and not really on top (as it would be if you loaded the 2nd.swf on another level rather than a container clip...) and then, depending on which layer (relative to other layers) it's on, would cover or not the 1st.swf content. Thus your navigation being on a higher layer than the container it overides it.

Regards. Affiliate Program - Web Hosting
 
Okay, now I get it. I'm playing with the example you provided and see now how to get it to do exactly what I want. Your explanation of levels helped.

Thanks a lot.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top