Javier,
The problem you describe is a known bug with the videoDisplay class. I
use the following function on an event listener for when video is
removed from the stage or closed in a window.
thisVid.addEventListener(Event.REMOVED_FROM_STAGE,vidInterupt);
thisVid.addEventListener(Event.REMOVED,vidInterupt);
If the video is not fully downloaded it will continue to download, so
you need to force close the connection and then SoundMixer.stopAll();
will stop the audio to cease.
import flash.media.SoundMixer;
private function vidInterupt(event:Event):void{
trace('entered interupt function');
if(event.currentTarget.thisVideoDisplay.state
!= "disconnected") {
event.currentTarget.thisVideoDisplay.stop();
}
if(event.currentTarget.thisVideoDisplay.state
!= "disconnected") {
event.currentTarget.thisVideoDisplay.close();
}
SoundMixer.stopAll();
}
On May 27, 10:34 am, phoenix-slk <[email protected]> wrote:
> few way can be taken.
>
> By seeing the code in your class, i think you can't acces to video
> display cause the scope of the parent of the displayObject are
> constraint to the function
> by declaring the VideoDisplay variable as public in your class you can
> access to the videoDisplay and use this in your mxml file. try this at
> the INFOWINDOW_CLOSED handler function
> options2.customContent.v.stop();
> if it doesn't work use transtypage
> InfoWindowTabbedComponent(options2.customContent).v.stop();
>
> you can also use a public function stopVideo in your class to secure
> your variable (you have to declare v variable as private)
>
> public class InfoWindowTabbedComponent extends UIComponent {
> public var v:VideoDisplay;
>
> public function InfoWindowTabbedComponent() {
> var c:Canvas=new Canvas();
> c.width=300;
> c.height=300;
> v=new VideoDisplay();
> v.source="http://localhost/PFC/timelapse.flv";
> v.height=200;
> v.width=200;
> c.addChild(v);
> addChild(c);
> }
>
> I hope that works for you
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Google Maps API For Flash" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/google-maps-api-for-flash?hl=en
-~----------~----~----~----~------~----~------~--~---