Groups | Blog | Home
all groups > flash actionscript > april 2005 >

flash actionscript : unload swf from a form application


I flash therefore I am
4/11/2005 12:00:00 AM
The form is a movie clip (the name is as it appears in the navigation window
like "form1", etc. unless you have changed the name) and when you load
content like this, it goes into a movie clip called "contentHolder" that is
a child clip of the form clip.

So you could use

contentHolder.unloadMovie();

removeMovieClip(contentHolder);

and depending on where you want to place this script, you will have to
supply the appropriate path as a prefix.

or you could just load dummy content in place of what you had before. I have
never used a forms application so I don't know if the contentHolder clip
will be recreated if you revisit the form or not. From what little I know
about this format in Flash, I suspect it actually might do it but you will
just have to try.

Anyway, those are my suggestions.

enfantterrible
4/11/2005 4:02:11 PM
does any know if I load an SWF movie clip in a form application using the code
that follows, how I can unload the movie clip:
on(reveal){
this.contentPath = "contactsmain_010.swf"
}

Suggestions would be greatly apreciated!!!



enfantterrible
4/12/2005 12:00:00 AM
thanks for your input with your help I was successful. I've included the code I
used in case some other newby like me, has the same need or someone wants to
present a better solution.


:D

// code to open make the form visible
gMainWindow.visible = false;
_global.gMainWindow = _level0.application.contactmanager;
gMainWindow.visible = true;

// code attached to the form itself
on(reveal){
this.contentPath="registration_101.swf";
this.load(); // required if there is a need to reload the form
}

// to unload the movie clip
removeMovieClip(_parent); // targets the "contentHolder" MC inserted by flash
SunSeekerNC
5/23/2006 3:08:59 AM
OK. I can get this:
// Assume this code is place on a form called FormA
on(reveal){
this.contentPath = "contactsmain_010.swf"
}

That works. However, how do you get it show the next form (let's call it
FormB) and hide the current one (FormA) when the "contactsmain_010.swf" is done
playing in FormA.

Thanks for your help,
Loren
AddThis Social Bookmark Button