Hi Alex,
If I load chat.swf directly in the standalone player or in a browser,
the app resizes as expected.
We have people installing the chat widget on their blogs in all
different shapes and sizes. It's only when we load it into another
Flex app that it doesn't behave. One clue that might help is that
when chat.swf is loaded into another SWF, the preloader is scaled up
significantly, but then the app frame itself is scaled ok but it's
dimensions match the width and height of the window (offset by the
SWFLoader's x,y position) instead of respecting the SWFLoader's
dimensions.
The mx:Application is very simple:
<?xml version="1.0" encoding="utf-8"?>
<mx:Application
xmlns:mx="http://www.adobe.com/2006/mxml"
xmlns:views="com.searchcoders.minisites.chat.views.*"
layout="absolute"
backgroundColor="0x204a96"
backgroundGradientColors="[0x67a0cd, 0x204a96]"
>
<mx:Metadata>
[ResourceBundle("Chat")]
</mx:Metadata>
<mx:Style source="assets.css"/>
<views:Chat/>
</mx:Application>
Thanks for your help,
Tom
Tom Bray
CEO
SearchCoders, LLC
11751 Mississippi Ave., Suite 150
Los Angeles, CA 90025
www.searchcoders.com
www.chatopica.com
310.452.2024
On Sep 18, 2007, at 9:48 PM, Alex Harui wrote:
A flex swf has two frames, the preloader frame followed by the app
frame.
In theory, the chat.swf should be sized by SWFLoader while it is in
the first frame, which should dictate the size for the rest of the
app. If you run chat.swf in the standalone player what size is
it? What does the mx:Application tag look like in chat.swf? If
you resize the browser, does chat.swf respond?
It might be that the app frame has a bigger measured size than
expected.
-Alex
From: [email protected]
[mailto:[EMAIL PROTECTED] On Behalf Of chatopica
Sent: Tuesday, September 18, 2007 2:27 PM
To: [email protected]
Subject: Re: [flexcoders]SWFLoader not sizing loaded swf
Hi Alex,
chat.swf is a Flex swf and there's no resizing code in the app. Do
I need to add some? I
assumed it would automatically respect the size of the SWFLoader.
Thanks,
Tom Bray
www.chatopica.com/topics/flex
--- In [email protected], "Alex Harui" <[EMAIL PROTECTED]> wrote:
>
> Is chat.swf a Flex swf? Does chat.swf have code that resizes to the
> stage?
>
>
>
> ________________________________
>
> From: [email protected]
[mailto:[EMAIL PROTECTED] On
> Behalf Of dorkie dork from dorktown
> Sent: Tuesday, September 18, 2007 12:21 PM
> To: [email protected]
> Subject: [flexcoders]SWFLoader not sizing loaded swf
>
>
>
> I am using a swf loader to load a chat swf. Unfortunately, I
cannot get
> the content to stay inside of the swfloader. Here is an example
> application. Notice I have the width and height set to 500. In my
test
> the content is sized to the width and height of the browser. You can
> test this code:
>
> <?xml version="1.0" encoding="utf-8"?>
> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml
> <http://www.adobe.com/2006/mxml> " layout="absolute"
> creationComplete="{Security.allowDomain('static.chatopica.com
> <http://static.chatopica.com> ')}">
>
> <mx:SWFLoader scaleContent="true" x="50" y="50" width="500"
> height="500" source=" http://static.chatopica.com/chat.swf?room=flex
> <http://static.chatopica.com/chat.swf?room=flex> "/>
>
> </mx:Application>
>