Re: can you unload an swf file from an mx:image control?

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Re: can you unload an swf file from an mx:image control?

wayne_badu_johnson
Hi Jamie

Try just setting the source to null.

private function stopImage():void{
        myImage.source = null;
}
//
<mx:Image id="myImage" source="test.swf"/>
<mx:Button label="Stop" click="stopImage()"/>

Also you may want to check if your sounds in the flash file are
streamed or event sounds, would be better to stream.

Cheers
Wayne



--- In [hidden email], JClouz <jclouser@...> wrote:
>
> I've been loading flash movies into an mx:image control for
display just fine.  Problem comes when the user quits during
playback.  He heads out to a new state but the flash swf file and
it's sound keep on playing until they're done.  I've tried
removeChild, .enabled = false, and other stuff, but I can't get the
movie to quit midway.
>
> Will I have to load into an swfLoader instead of an mx:image
control in order to kill it midway through playing?
>
> Thanks,
>
>
> Jamie
>






--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/flexcoders/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/flexcoders/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:[hidden email]
    mailto:[hidden email]

<*> To unsubscribe from this group, send an email to:
    [hidden email]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 



Reply | Threaded
Open this post in threaded view
|

Re: can you unload an swf file from an mx:image control? **SOLVED**

JClouz

> Hi Jamie
>
> Try just setting the source to null.

Thanks Wayne.  That didn't do the trick, the sound just kept on
playing.  This worked though:

SoundMixer.stopAll();

I didn't even need an extra include statement for the SoundMixer, maybe
I had it already included somehow, it's located at
flash.media.SoundMixer.

Thanks again.

Jamie





--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/flexcoders/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/flexcoders/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:[hidden email]
    mailto:[hidden email]

<*> To unsubscribe from this group, send an email to:
    [hidden email]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 



Reply | Threaded
Open this post in threaded view
|

Re: can you unload an swf file from an mx:image control? **SOLVED**

JClouz
In reply to this post by wayne_badu_johnson

> Hi Jamie
>
> Try just setting the source to null.

Thanks Wayne.  That didn't do the trick, the sound just kept on
playing.  This worked though:

SoundMixer.stopAll();

I didn't even need an extra include statement for the SoundMixer, maybe
I had it already included somehow, it's located at
flash.media.SoundMixer.

Thanks again.

Jamie





--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/flexcoders/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/flexcoders/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:[hidden email]
    mailto:[hidden email]

<*> To unsubscribe from this group, send an email to:
    [hidden email]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/