×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

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

Loading an external .swf to a specific frame label?

Loading an external .swf to a specific frame label?

(OP)
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.

RE: Loading an external .swf to a specific frame label?

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

RE: Loading an external .swf to a specific frame label?

(OP)
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

RE: Loading an external .swf to a specific frame label?

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

RE: Loading an external .swf to a specific frame label?

(OP)
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

RE: Loading an external .swf to a specific frame label?

thanks so much! I sent you an email....

RE: Loading an external .swf to a specific frame label?

me again. my emails keep getting bounced back from that address....

could you try mine: brettwalkley [a] hotmail [d] com

RE: Loading an external .swf to a specific frame label?

(OP)
b, i've sent the file to your email.

RE: Loading an external .swf to a specific frame label?

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

RE: Loading an external .swf to a specific frame label?

(OP)
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:

http://ca.f2.pg.briefcase.yahoo.com/justaverageiq

Thanks for the assist.

PS. The ultimate destination for all this is a CDRom, if that matters.

RE: Loading an external .swf to a specific frame label?

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

RE: Loading an external .swf to a specific frame label?

(OP)
I've changed to gotoAndStop but that didn't work either. Will keep trying other things.

RE: Loading an external .swf to a specific frame label?

Can you provide your .flas in a MX only format? As I said earlier, your folder in your briefcase is empty?

Regards.    Affiliate Program - Web Hosting

RE: Loading an external .swf to a specific frame label?

Got it! Will look into it a little later...

Regards.    Affiliate Program - Web Hosting

RE: Loading an external .swf to a specific frame label?

Uncomment the following line in the "productsTEST.fla"...

delete this.onEnterFrame;

And it'll work fine...

Regards.    Affiliate Program - Web Hosting

RE: Loading an external .swf to a specific frame label?

(OP)
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.

RE: Loading an external .swf to a specific frame label?

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

RE: Loading an external .swf to a specific frame label?

(OP)
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.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close