Groups | Blog | Home
all groups > flash actionscript > january 2006 >

flash actionscript : LoadMovie Help!



gwennabeme
1/10/2006 8:53:47 PM
I want to load a new movie to replace the one playing. The new swf is in the
same directory as the current movie. Lets say the new movie I want to load is
called newmovie.swf. What should I put for the url, target, and
method???:camera;
zensoldier
1/10/2006 9:42:37 PM
loadMovie("newmovie.swf")

gwennabeme
1/10/2006 9:48:03 PM
But when I go to:
Global functions > Browser/Network > LoadMovie, it says I need all three (url, target, and method)

ryandrum
1/10/2006 9:56:39 PM
'target' is used for loading into or replacing another movie clip already
playing and method is used for sending variables which isnt needed to just load
a movie. you could use loadMovie('newmovie.swf", oldMovie_mc); to replace the
other movie clip but it will take on the size of the previous movie
gwennabeme
1/10/2006 10:06:40 PM
Originally posted by: ryandrum
'target' is used for loading into or replacing another movie clip already
playing and method is used for sending variables which isnt needed to just load
a movie. you could use loadMovie('newmovie.swf", oldMovie_mc); to replace the
other movie clip but it will take on the size of the previous movie


OK, will this work:

loadMovie('newmovie.swf", oldMovie.swf)

??? I want to replace a swf with a swf

gwennabeme
1/10/2006 10:16:04 PM
Originally posted by: ryandrum
'target' is used for loading into or replacing another movie clip already
playing and method is used for sending variables which isnt needed to just load
a movie. you could use loadMovie('newmovie.swf", oldMovie_mc); to replace the
other movie clip but it will take on the size of the previous movie


This is the error I got:
**Error** Scene=Scene 1, layer=Layer 5, frame=1375:Line 2: String literal was
not properly terminated
loadMovie('where5.swf", recruitcustomervideocropped.swf)

**Error** Scene=Scene 1, layer=Layer 5, frame=1375:Line 5: ')' or ',' expected

Total ActionScript Errors: 2 Reported Errors: 2


zensoldier
1/10/2006 10:30:23 PM
You have a single quote in front of where5.swf and a double qoute after and you
should use the movie clip name you are loading to as the target, not the swf
you are replacing.


loadMovie("newmovie.swf") will work fine if you are loading to the root. if
not use.

yourTarget.loadMovie("newmovie.swf")
gwennabeme
1/13/2006 7:56:42 PM
zensoldier
1/13/2006 9:47:27 PM
Its the same as before only last time your target was 'this'

now you have a button that is in a clip and you want to load a movie to that
clip.

So let's say the movieClip that your button is in is called 'myClip'

so the script for your button would be.

on(release)
{
_root.myclip.loadmovie("newClipName");
}





AddThis Social Bookmark Button