Stacey,

Honestly I havn't tried this but, looking at the source of Image awhile ago, I would say it is not possible with that class. The Image wants to scale not call setActualSize().

Why don't you try loading as 'backgroundImage' of a VBox or HBox. I am not to sure but, something tells me that this would work.

Peace, Mike

On 5/25/06, Tobias Patton <[EMAIL PROTECTED]> wrote:

Here's a little application I wrote to test 9-slice scaling. Replace the .png image with one of your own and see if it works for you.

 

<?xml version="1.0" encoding="utf-8"?>

<mx:Application

            xmlns:mx=" http://www.adobe.com/2006/mxml"

            xmlns="*"

            layout="vertical"

            color="0xcccccc">

           

            <mx:Button id="but1"

                        width="{slider.value}"

                        label="Search"

                        upSkin="@Embed( 'resources/DSHB_But_search_up.png',

                                                scaleGridTop='2',

                                                scaleGridLeft='20',

                                                scaleGridBottom='19',

                                                scaleGridRight='76' )"

                        />

                       

            <mx:Button id="but2"

                        width="{slider.value}"

                        label="Search"

                        upSkin="@Embed( 'resources/DSHB_But_search_up.png' )"/>

                       

            <mx:HSlider id="slider"

                        minimum="20"

                        maximum="200"

                        value="84"

                        liveDragging="true"

                        showDataTip="false"/>

</mx:Application>

 


From: flexcoders@yahoogroups.com [mailto: flexcoders@yahoogroups.com] On Behalf Of Stacey Mulcahy
Sent: Thursday, May 25, 2006 2:55 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Image scale 9 having fun

 

Alrighty, I'll take one for the team and post the stupidest question of the day, in fact its Stacey++ since I accidentally posted this to the Flashcoders list….

 

- I have the following (flex 2b3)

 

  [Embed(source='assets/header.png',scaleGridTop='20', scaleGridLeft='10',

        scaleGridBottom='30', scaleGridRight='20')] [Bindable] var headerImage:Class;

 

and

 

<mx:Image source="{headerImage}" height="51" width="100% id="header_mc"></mx:Image>

 

Basically it should be a header that expands width wise use the scale grid.

Its definitely NOT working for me regardless of how I set it up. Does it need to be within a container ( tried that, didn't get the results I wanted)

 

Ultimately the left has to be like 200 pixels in rather than those numbers, but whatever.

 

Also the docs are inconsistent, some examples show the scale properties assigned to strings, some show numbers..

 

Anyone got a simple example of this that I could try using, this is driving me nuts, just trying to get an expanding header...




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






--
What goes up, does come down.

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