dcsimg
A Flash Developer Resource Site

Results 1 to 4 of 4

Thread: unloadmovie command

  1. #1
    Junior Member
    Join Date
    Sep 2003
    Posts
    15

    unloadmovie command

    Hi:

    I am doing an on-line "TV show" mixing Flash with VHost Studio characters from OddCast.

    My problem should be simple to the veteran, but I'm baffled. To pull up the character animation I have to load it as a movie clip. I have a layer with a keyframe with the action line:

    LoadMovie ("VHSS.swf", 1)

    So the movie clip runs on top of the Flash, right? I could also put 0 instead of 1 and have it replace the Flash movie, right?

    Here's the problem: What I need to do is when the movie clip stops I want to unload the movie and go back to the original Flash movie. I put a keyframe right after the previous keyframe and typed in the actionscript line:

    unloadMovie ("VHSS.swf")

    Unfortunately, this did not work.

    So I figured if I use 1 as the level then the movie clip runs past the command to stop it. So I added several hundred frames and then put a new keyframe with the same action command to unload. It did not work.

    How do I unload this darn thing? What is the actionscript command and where do I put it in the layers/frames?

    Any help = huge appreciation.

    Thanks,

    Craig

  2. #2
    Member
    Join Date
    Aug 2003
    Location
    Dryden, ON - Canada
    Posts
    71
    There are possible problems that could cause Flash Player to freeze up or terminate prematurely if you use the unloadMovie() call, instead just load another movie into the same location and it replaces what was there even if it hasn't finished playing (although I assume that your movie will be finished playing before you replace it by the sounds of it so you should be okay there). So just use, loadMovie("VHSS2.swf", 1); and you should be doing fine. Let me know if this doesn't work because I haven't tried loading a movie just into a level, I first usually create a movie clip instance (create a new symbol... I believe CTRL+F8... and then load the movie clip into that instance... always give the instance a name). Most of the time I'm doing as follows:

    loadMovie("mymov.swf", "mcholder"); and then to replace whats placing in the instance "mcholder", I simply call loadMovie("mynextmov.swf", "mcholder"); and it simply replaces what movie was already playing in that instance.

    Hope this helps,
    Tyouk

  3. #3
    Junior Member
    Join Date
    Sep 2003
    Posts
    15

    trying it

    Hi Tyouk,

    Thanks a lot for your help. Here's what I did:

    Made keyframe in movie, action: loadmovie ("VHSS.swf", "mcholder");

    Created movie clip symbol "mcholder"

    But it didn't work. So I dragged the symbol onto the stage, and that didn't work. What am I doing wrong? Does something need to be in the movie clip symbol frames? I'm sure it's something simple...

    So I did what you told me to do first, which was simply: loadmovie ("VHSS2.swf", 1). That worked perfect!

    So to build a movie made up of movies, I build an infrastructure movie, then a string of other movies that I load in as needed. Is that hard to post on a web site? How is that done?

    Any further advice is greatly appreciated!

    Craig

  4. #4
    Member
    Join Date
    Aug 2003
    Location
    Dryden, ON - Canada
    Posts
    71
    Its actually quite simple to do it using that method. Just upload all your .swf's into one directory on your webhost and then setup an HTML page (probably index.html) that embeds the first movie clip that will hold all the others. Then as required, simply use the loadMovie() call to load all the other SWFs into your movie holder when people visit your site. Just like you did with VHSS.swf, just keep loading the movies in like that. Right over top of each other.

    Good luck,
    Tyouk

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center