SWFLoader problem

View: New views
6 Messages — Rating Filter:   Alert me  

SWFLoader problem

by chandruflex :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

In my application, I have a SWFLoader component, placed inside a Canvas container. I load a swf into the SWFLoader, dynamically. The problem is, when the swf file is loading, the display seems to be larger than the size of the enclosing Canvas container. But, after the swf has loaded completely, it perfectly fits into that Canvas.

How do I avoid this problem. I do not want the swf file look larger than the enclosing Canvas, while it is loading. I am using Flex sdk 3.0.



RE: SWFLoader problem

by Alex Harui :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Set visible=false until it is loaded

Alex Harui
Flex SDK Developer
Adobe Systems Inc.<http://www.adobe.com/>
Blog: http://blogs.adobe.com/aharui

From: flexcoders@... [mailto:flexcoders@...] On Behalf Of chandruflex
Sent: Monday, November 02, 2009 4:55 AM
To: flexcoders@...
Subject: [flexcoders] SWFLoader problem



In my application, I have a SWFLoader component, placed inside a Canvas container. I load a swf into the SWFLoader, dynamically. The problem is, when the swf file is loading, the display seems to be larger than the size of the enclosing Canvas container. But, after the swf has loaded completely, it perfectly fits into that Canvas.

How do I avoid this problem. I do not want the swf file look larger than the enclosing Canvas, while it is loading. I am using Flex sdk 3.0.


Re: SWFLoader problem

by chandruflex :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Thank you, Alex.

--- In flexcoders@..., Alex Harui <aharui@...> wrote:

>
> Set visible=false until it is loaded
>
> Alex Harui
> Flex SDK Developer
> Adobe Systems Inc.<http://www.adobe.com/>
> Blog: http://blogs.adobe.com/aharui
>
> From: flexcoders@... [mailto:flexcoders@...] On Behalf Of chandruflex
> Sent: Monday, November 02, 2009 4:55 AM
> To: flexcoders@...
> Subject: [flexcoders] SWFLoader problem
>
>
>
> In my application, I have a SWFLoader component, placed inside a Canvas container. I load a swf into the SWFLoader, dynamically. The problem is, when the swf file is loading, the display seems to be larger than the size of the enclosing Canvas container. But, after the swf has loaded completely, it perfectly fits into that Canvas.
>
> How do I avoid this problem. I do not want the swf file look larger than the enclosing Canvas, while it is loading. I am using Flex sdk 3.0.
>



Re: SWFLoader problem

by chandruflex :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Setting the SWFLoader component's "visible" attribute to false, solved the problem.

Is it possible to control when the loaded swf file starts to play? This is because, by the time the swf file has loaded completely, and the SWFLoader component is made visible, the loaded swf file has already started playing.

--- In flexcoders@..., Alex Harui <aharui@...> wrote:

>
> Set visible=false until it is loaded
>
> Alex Harui
> Flex SDK Developer
> Adobe Systems Inc.<http://www.adobe.com/>
> Blog: http://blogs.adobe.com/aharui
>
> From: flexcoders@... [mailto:flexcoders@...] On Behalf Of chandruflex
> Sent: Monday, November 02, 2009 4:55 AM
> To: flexcoders@...
> Subject: [flexcoders] SWFLoader problem
>
>
>
> In my application, I have a SWFLoader component, placed inside a Canvas container. I load a swf into the SWFLoader, dynamically. The problem is, when the swf file is loading, the display seems to be larger than the size of the enclosing Canvas container. But, after the swf has loaded completely, it perfectly fits into that Canvas.
>
> How do I avoid this problem. I do not want the swf file look larger than the enclosing Canvas, while it is loading. I am using Flex sdk 3.0.
>



RE: Re: SWFLoader problem

by Alex Harui :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Depends.  If you can talk to it, you can rewind it before making it visible.

________________________________
From: flexcoders@... [flexcoders@...] On Behalf Of chandruflex [chandruflex@...]
Sent: Tuesday, November 03, 2009 5:08 AM
To: flexcoders@...
Subject: [flexcoders] Re: SWFLoader problem



Setting the SWFLoader component's "visible" attribute to false, solved the problem.

Is it possible to control when the loaded swf file starts to play? This is because, by the time the swf file has loaded completely, and the SWFLoader component is made visible, the loaded swf file has already started playing.

--- In flexcoders@...<mailto:flexcoders%40yahoogroups.com>, Alex Harui <aharui@...> wrote:

>
> Set visible=false until it is loaded
>
> Alex Harui
> Flex SDK Developer
> Adobe Systems Inc.<http://www.adobe.com/>
> Blog: http://blogs.adobe.com/aharui
>
> From: flexcoders@...<mailto:flexcoders%40yahoogroups.com> [mailto:flexcoders@...<mailto:flexcoders%40yahoogroups.com>] On Behalf Of chandruflex
> Sent: Monday, November 02, 2009 4:55 AM
> To: flexcoders@...<mailto:flexcoders%40yahoogroups.com>
> Subject: [flexcoders] SWFLoader problem
>
>
>
> In my application, I have a SWFLoader component, placed inside a Canvas container. I load a swf into the SWFLoader, dynamically. The problem is, when the swf file is loading, the display seems to be larger than the size of the enclosing Canvas container. But, after the swf has loaded completely, it perfectly fits into that Canvas.
>
> How do I avoid this problem. I do not want the swf file look larger than the enclosing Canvas, while it is loading. I am using Flex sdk 3.0.
>




Re: SWFLoader problem

by chandruflex :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I was able to achieve it. I tried stopping the loaded swf file (in the loaders complete event handler). Then I tried playing it from the first frame, simultaneously making my loader to go visible.

--- In flexcoders@..., Alex Harui <aharui@...> wrote:

>
> Depends.  If you can talk to it, you can rewind it before making it visible.
>
> ________________________________
> From: flexcoders@... [flexcoders@...] On Behalf Of chandruflex [chandruflex@...]
> Sent: Tuesday, November 03, 2009 5:08 AM
> To: flexcoders@...
> Subject: [flexcoders] Re: SWFLoader problem
>
>
>
> Setting the SWFLoader component's "visible" attribute to false, solved the problem.
>
> Is it possible to control when the loaded swf file starts to play? This is because, by the time the swf file has loaded completely, and the SWFLoader component is made visible, the loaded swf file has already started playing.
>
> --- In flexcoders@...<mailto:flexcoders%40yahoogroups.com>, Alex Harui <aharui@> wrote:
> >
> > Set visible=false until it is loaded
> >
> > Alex Harui
> > Flex SDK Developer
> > Adobe Systems Inc.<http://www.adobe.com/>
> > Blog: http://blogs.adobe.com/aharui
> >
> > From: flexcoders@...<mailto:flexcoders%40yahoogroups.com> [mailto:flexcoders@...<mailto:flexcoders%40yahoogroups.com>] On Behalf Of chandruflex
> > Sent: Monday, November 02, 2009 4:55 AM
> > To: flexcoders@...<mailto:flexcoders%40yahoogroups.com>
> > Subject: [flexcoders] SWFLoader problem
> >
> >
> >
> > In my application, I have a SWFLoader component, placed inside a Canvas container. I load a swf into the SWFLoader, dynamically. The problem is, when the swf file is loading, the display seems to be larger than the size of the enclosing Canvas container. But, after the swf has loaded completely, it perfectly fits into that Canvas.
> >
> > How do I avoid this problem. I do not want the swf file look larger than the enclosing Canvas, while it is loading. I am using Flex sdk 3.0.
> >
>