čtvrtek 4. února 2010

Flex: Setting 'source' property of Image object in CSS

By default, source property of Image class cannot be set in CSS file. But there is a workaround:

Define new class (StyledImage.mxml):

<mx:Image xmlns:mx="http://www.adobe.com/2006/mxml" source="{this.getStyle('source')}">
</mx:Image>


Now, you can insert an image with source defined in CSS file into your application:

<components:StyledImage styleName="messagesIcon"/>


And set the source in CSS file:

.messagesIcon {
source: Embed(source='image.png');
}


Inspiration: http://old.nabble.com/Can-I-set-the-image-source-in-CSS--td18968426.html

středa 9. prosince 2009

Problem running Eclipse Europe (and Adobe Flex Builder 3 Alpha Linux version) in Ubuntu

There is a problem running Eclipse Europe (3.3) in Ubuntu (Karmic Koala). Once Eclipse starts, JVM crashes and workspace does not appears. You can solve this issue simply by inserting following directive into eclipse.ini file.

-Dorg.eclipse.swt.browser.XULRunnerPath=/dev/null

If you are using Adobe Flex Builder 3 (Alpha version), you must put this directive to the last line of file Adobe_Flex_builder.sh:

"${ECLIPSE_LOCATION}"/eclipse -vmargs -Xmx512M -Dorg.eclipse.swt.browser.XULRunnerPath=/dev/null