Hi Roger:

Excellent!  Do you have any examples of how to use this?  This will be my last request and I’ll investigate the rest on my own.  Thanks for all your help.

Cheers,

Dave

 


From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of Roger Gonzalez
Sent: Monday, February 13, 2006 2:15 PM
To: [email protected]
Subject: RE: [flexcoders] Using Embed not working in Beta (worked in Alpha)

 

Well, in general it doesn't work at all with bitmaps... Scale-9 scales things at their control points, and the control points for a bitmap are in the four corners... the unscaled zones.  D'oh!

 

However, I thought this was a pretty serious limitation, so I added code to Flex to allow you to correctly Scale-9 an embedded bitmap.  It basically creates a Sprite with 9 shapes, where each shape uses the original bitmap as a fill.  Works great, but you need to use Embed.

 

-rg

 


From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of Dave Cook
Sent: Monday, February 13, 2006 10:05 AM
To: [email protected]
Subject: RE: [flexcoders] Using Embed not working in Beta (worked in Alpha)

Hi Roger:

Does Scale9 work reliably with bitmaps?  Or just movie clips.

Cheers,

Dave

 


From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of Roger Gonzalez
Sent: Monday, February 13, 2006 12:16 PM
To: [email protected]
Subject: RE: [flexcoders] Using Embed not working in Beta (worked in Alpha)

 

Embedding bitmaps doesn't usually produce a Sprite, it usually produces
a SkinBitmap, which extends BitmapData.  So, you can't do that coersion.

(The "usually" qualification is because if you apply Scale-9 to your
bitmap, you do get a Sprite-derived subclass.)

-rg

> -----Original Message-----
> From: [email protected]
> [mailto:[EMAIL PROTECTED] On Behalf Of quasimotoca
> Sent: Friday, February 10, 2006 8:22 PM
> To: [email protected]
> Subject: [flexcoders] Using Embed not working in Beta (worked
> in Alpha)
>
> Hi:
> I used to do this in Flex alpha:
>
>             [Embed(source="images/mypicture.png")]
>                 private var MyPicture:Class;
>                 .....
>             public function MySprite()
>             {
>                     var c:UIComponent
>                   var s:Sprite
>                        
>                   MyButton = new UIComponent()
>                   MyButton.visible = false
>                   s = Sprite(new MyPicture())
>                   MyButton.addChild(s)
>                 .....
>                 }
>
> In the beta I get the following error:
>
> TypeError: Error #1034: Type Coercion failed: cannot convert
> [EMAIL PROTECTED] to flash.display.Sprite
>       at ..... [lots of stuff]
>
> Anyone else having similar trouble?  Any solutions greatly welcome!
> Cheers,
> Dave
>
>
>
>
>
>
> --
> 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
>
>
>

>
>
>




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




SPONSORED LINKS
Web site design development Computer software development Software design and development
Macromedia flex Software development best practice


YAHOO! GROUPS LINKS




Reply via email to