Found the answer...  just like the docs say... Loader.content property when you load a SWF is a MovieClip not a UIComponent (which i was treating it as)  so i set loader.content._height + _width instead of loader.content.height + width

here's the code i used...

    var iconLoader;
    function someFunc()
    {
        var initObj = {x:startX, y:2, height:22, scaleContent:true, visible:false}
        createClassObject(Loader, "iconLoader", 301, initObj);       
        iconLoader.addEventListener("complete", mx.utils.Delegate.create(this,loader_complete));
    }

    private function loader_complete()
    {
        var brand = iconLoader.content;       
        brand._height = 15;
        brand._width = 100;
        iconLoader.visible = true;
    }

On 7/4/05, Philippe Maegerman <[EMAIL PROTECTED]> wrote:
or yourLoader.setSize() maybe
 
Philippe Maegerman
 


From: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] On Behalf Of Manish Jethani
Sent: lundi 4 juillet 2005 13:05
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Loader + swf doesn't scaleContent

On 7/4/05, Clint Modien <[EMAIL PROTECTED]> wrote:

>  I'm creating a Loader like so:

>  var initObj = {x:0, height:22, scaleContent:true}
>  createClassObject(Loader, "iconLoader", 301, initObj);

>  then i set the source of iconLoader like so:

>  iconLoader.source = "http://the source of the attached swf"

>  i need the height to be 22 px

>  when it loads... it's 4x that...

I think I can reproduce the problem.  If you set the height to more
than a certain number (like 50), it works fine.

Try setting the height _after_ setting the source property.  You could
also try setting it in creationComplete or something.


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




--
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



------------------------------------------------------------------
**STATEMENT OF CONFIDENTIALITY**

This e-mail and any attached files are confidential and intended solely for the use of the individual to whom it is addressed. If you have received this email in error please send it back to the person that sent it to you. Any views or opinions presented are solely those of author and do not necessarily represent those the Emakina Company. Unauthorized publication, use, dissemination, forwarding, printing or copying of this email and its associated attachments is strictly prohibited.

We also inform you that we have checked that this message does not contain any virus but we decline any responsability in case of any damage caused by an a non detected virus.
------------------------------------------------------------------




--
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




Reply via email to