Banner

Sponsor

Login


Welcome Back!
Guest
Guest

Register

Lost your password?

47 users online



Urgent help with LoadMovie

Urgent help with LoadMovie

Currently viewing this thread: 1 (0 members and 1 guests)


MrBoom

MrBoom

Status: Offline!

Urgent help with LoadMovie

hey ya'll, wow, i havnt been here in aaaaaages..
anyways, onto business...

http://adam.ezy.com.au/tfg

this is a website i am making for my brother..
but i am having some trouble loading external .swf files...
now, basically the main site is index.swf.. and it loads the other .swf files into the container(home, about, products etc...)

using this code..

PHP:

<?php

on 
(release) {
    
loadMovie("Home.swf""_root.Container");
}

?>

this works fine, but my problem is, links that are on the external .swf pages, i.e. home, about, products, etc... i want them to load into another container, located in that .swf.. making sense??

now, click "contact us"
this is the format of the content area.. there is an invisible container inside this .swf which should be loading a file called "contact2.swf

using this code..

PHP:

<?php

on 
(release) {
    
loadMovie("Contact2.swf""_root.Contact");
}

?>

now as you can see by this code, the container has an instance name of "contact"..

now im sure i just have to be more specific with the path of the second container, but i dont know in which way i am suppose to..

so any help would be greatly appreciated, cheers..

___________________


http://adam.ezy.com.au/temp/grungesig.gif

devonair

devonair

Neverside Newbie
Status: Offline!

Hey, Mr. Boom,

_root will always refer to the "base" swf (for lack of a better word) - meaning if you load swf b into swf a, swf a becomes the root for b.

Personally, I never use "_root", I prefer a relative approach using "_parent", like:

PHP:

<?php
some_mc
.onRelease = function() {
    
this._parent.container_mc.loadMovie("some.swf");
};
?>

so anyway, try using _parent to reach the _root level and see if that helps..

d.

___________________

obod | weapons of mass dysfunction

MrBoom

MrBoom

Status: Offline!

so, what is "some_mc"???
and what is "container_mc", is that the symbol name, or the instance name??

it goes..
Index.swf >> loads Contact.swf >> a link(the gradient bar) in contact.swf loads Contact2.swf into the container located inside Contact.swf
(the symbol name of the container is "Container", and instance name is "Contact"..)

if this makes sense.. could you please alter that code to suit my mcs?
cause its late right now, and i cant really figure it out, cause i havnt touched flash in a long time..

thanks dev...

___________________


http://adam.ezy.com.au/temp/grungesig.gif

rberry88

rberry88

Status: Offline!

In your swf that you are loading into index.swf you could just add the line "this.lockroot=true;" (without the quotes) and then your instances of _root will apply to the external swf.

___________________

http://home.comcast.net/~rberry883/mysig.gif

MrBoom

MrBoom

Status: Offline!

thanks rberry, ill give that a try..

but where do i put that code??

___________________


http://adam.ezy.com.au/temp/grungesig.gif

Last edited by MrBoom, September 17th, 2004 09:58 AM (Edited 1 times)

rberry88

rberry88

Status: Offline!

Put this

this.lockroot=true;

as the first line of code in your external swf. You can put it on the first frame of the timeline, a movie clip, button. Just try to put it as close to the beginning as possible.

___________________

http://home.comcast.net/~rberry883/mysig.gif

MrBoom

MrBoom

Status: Offline!

ok, yeh, seriously, i cant get this to work...
>> Here << are the fla files(index, contact, contact2) can someone solve this problem for me, please, im desperate now....

___________________


http://adam.ezy.com.au/temp/grungesig.gif

devonair

devonair

Neverside Newbie
Status: Offline!

Mr. Boom,

in your contact.fla, right after the stop action, just put:

contact.loadMovie("contact2.swf");

that's it..

hope that's what you were trying to do..

d.

___________________

obod | weapons of mass dysfunction

MrBoom

MrBoom

Status: Offline!

YES!!! THANK YOU DEV!!!
cheers buddy, solved it perfectly.. thank you too rberry...

___________________


http://adam.ezy.com.au/temp/grungesig.gif

Quick Jump:

Main Navigation


Site & Graphic Design by Aeon Tan
Developed by Jeremie Pelletier & Scott Roach


NeverAPI generated this page in 0.0183 seconds.