Load a SWF that is on the web

When I exacute, load, a swf movie I want it to load a swf that is on the web . I use the exacutable movie as a master program that loads a page from the web. The web page has the most recent information. I have tryied many different methods with no luck.

Bob

Do a search on ‘no-cache’. That way your browser doesn’t cache the incoming external movies…

…I think that’s what you mean :crazy:

loadMovieNum(“http://www.yoursite.com/yourmovie.swf”, 1);

This is what I tried:

loadMovieNum(“http://www.home2000.com/updater/Front_Page_Ad.swf”,1);

And this is what was returned when I tested:

Scene=Scene 1, Layer=_bkgnd, Frame=1: Line 1: Statement must appear within on/onClipEvent handler
loadMovieNum(“http://www.home2000.com/updater/Front_Page_Ad.swf”,1);

Scene=Scene 1, Layer=Slides, Frame=1: Line 1: ‘)’ or ‘,’ expected
play(http://www.home2000.com/updater/Front_Page_Ad.swf);

I am not sure what this means.

Bob

It means you have to use an event handler

Check the actionscript dictionary for on(press), on(release),
onClipEvent(enterFrame), onClipEvent(load) for more information.

Either that or just make sure your code is on the frame itself, and not on an object.

–EP

It seems to me with the on(press) or on(release) you are talking about a button to apply an action to. When our page loads, we automatically want it to load the movie.

Bob

just put this in a keyframe:

loadMovieNum(“http://www.yoursite.com/yourmovie.swf”, 1);

We are getting it to load now with the movie, but we still have a few questions.

When we load it with the “1” it seems to load within the main movie (behind everything), when we use a “0” it opens inplace of the main movie, and when we use an instance name (where in this case is where we would like it to open) it opens a new browser window.

Trying the different things was valuable because in the future we will want to use these different features. But in this case we have an instance set up in our movie where we open informational pages. That is where we would like this swf to open.

loadMovieNum loads movies onto different levels - 0 being the host movie. try a higher level.
you can load movies into the host with a ‘dummy clip’ by placing the dummy mc on the stage, giving it an instance and positioning it (the new movie’s top left corner will replace the dummy movie’s). for this method, use:

loadMovie(“http://www.mysite.com/mymovie.swf”, _root.dummyinstance);

Thank you so much. That did exactly what we wanted. Now I have one more thing.

How would I do it if I wanted to open something else in another browser window as well as what we did here. This is what worked before so I tried adding it as a second line and it did not work.

loadMovie(“http://www.home2000.com/updater/Front_Page_Ad.swf”,_root.front_page);
loadMovie(“http://www.home2000.com/updater/Front_Page_Ad.swf”,front_page);

do you mean load another external swf into the main movie?

When we are loading the main movie we are actually tring to load three different movies to the main movie. The three movies are to be loaded to three different instances.

We are sure close to finalizing a great project, thanks to loads of help from this site.

Bob

okay freddy thunder — dig the banner. i have been playing with that d@mn thing for 30 min and have accomplished not a stich of work. :~)

freddy seems to be the banner king:P new one for each day:p:

are you sorted now amerifax?

[AS]
loadMovie(“http://www.mysite.com/mymovie1.swf”, _root.dummyinstance1);
loadMovie(“http://www.mysite.com/mymovie2.swf”, _root.dummyinstance2);
loadMovie(“http://www.mysite.com/mymovie3.swf”, _root.dummyinstance3);

[/AS]

urbaneve - I’m sorry about that, if it makes you feel any better, I’ve wasted time playing with it too. :stuck_out_tongue:

no bond movie - I like to change it up every once in a while.

We are using something similar to a demo that comes with flash. It almost seems to be a slide show. So the base page actually carries all the way through. But each page if, you can call it that because uses arrows at the beginning of the movie for navigation, has an instance that I would like to assign this loadmovie to. Will that work correctly. Would I place the load movie on each slide or just in the beginning of the main movie?

i thought you just had a few small sections you wanted to load onto the main movie. if you want to replace the movie which is loaded from a button being pressed, you could add this to a buttons actions:


on (release) {
loadMovieNum("http://www.mysite.com/mymovie.swf", _root.dummy);
}

if you like, you can attatch the .fla and i’ll have a look.

>>want to replace the movie which is loaded from a button <<

I’m not explaining my self well enough. We are not using buttons. This is how it works.

The master movie has nine frames. Each frame has an area that contains an “Instant”. The “instant” has to be updated with the latest information when the master movie is executed. Actually update is a bad word since the “instant” has no data, information, tell we load a movie to each of the “instances”. This is where we want to use the action. It is to load a movie to each of the “instances” of the master movie. This is only done once, each time the master movie to execute.

The whole idea to the master file is it acts as a container that holds critical information that is updated every time the master file is run.

Bob

I am attaching the files. I think it may be easier that way. I put in what I thought would work, maybe you could check it out. In the gray space to the left is where the instance is set up. Each page has one. When I go to the 2nd page I would like a movie to load within that instance.

Ok, so when you enter a frame, you want to load the according movieclip, right ? And the two extra files “Front_Page_Ad” and “Front_Page_Ad2” are two of those movieclips ?