Your function cracked me up!  LOL!  Thanks! I will give it a shot.

I just added the following to unload the movie clip:

function unloadHotword(evt:Event):void {
        loader.unload();
}

loader.addEventListener(MouseEvent.CLICK, unloadHotword);

It seemed to work well.  :)

Now I just need to figure out how to incorporate my array of movie
clips! :)

Thanks!

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of eric e.
dolecki
Sent: Tuesday, September 02, 2008 1:12 PM
To: Flash Coders List
Subject: Re: [BULK] Re: [Flashcoders] Unloading an SWF in Flash
andcontrolling the loadedSWF
Importance: Low

I think you want to listen for the event of the loader being loaded &
then
use .content for it.

loader.addEventListener( Event.COMPLETE, iAmLoaded_Drunk );

function iAmLoaded_Drunk( e:Event ):void

{

     var lo:Loader = e.target as Loader;

     lo.content.alpha = 20; // what you actually loaded

}



On Tue, Sep 2, 2008 at 12:55 PM, Lord, Susan, CTR, DSS <
[EMAIL PROTECTED]> wrote:

> Thanks Paul,
>
> I rewrote the code, so its easier to read:
>
> var request:URLRequest = new URLRequest("hotword.swf");
> var loader:Loader = new Loader()
>
> function displayHotword(evt:Event):void {
>         loader.load(request);
>        addChild(loader);
>        loader.x = 100;
>        loader.y = 150
> }
>
>
> btClassified.addEventListener(MouseEvent.CLICK, displayHotword);
>
> My question is, how do I control the instance that is now on the
stage?
> Say I wanted to create a function that would change the opacity of
that
> movie or something like that. How do I reference that item. In the old
> flash, I would create a movie clip that would hold the swf and
reference
> that instance name. With this new method, I have no instance name to
> reference.
>
>
> Also, I can't seem to "talk" to the file.  If they click a button
within
> the file (the close button), I want the popup removed from the stage.
> Right now, I am hiding (visibility = false) the clip and putting the
> code to hide it within the loaded swf.  I am not communicating with
the
> clip from the parent file.
>
> Any direction you could provide is very much appreciated!
>
> Thank you!
> Susan
>
> _______________________________________________
> Flashcoders mailing list
> Flashcoders@chattyfig.figleaf.com
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>
_______________________________________________
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

_______________________________________________
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Reply via email to