Archive for the ‘Action Script 3.0’ Category

Determining a DataGridColumn object’s current sort order – callLater()

No Comments »

The callLater() method queues an operation to be performed for the next screen refresh, rather than in the current update. Without the callLater() method, you might try to access a property of a component that is not yet available. The callLater() method is most commonly used with the creationComplete event to ensure that a component has finished being created before Flex proceeds with a specified method call on that component.

Read More »


Fade effect in Flex – fadeIn fadeOut

No Comments »
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="vertical"
    backgroundGradientAlphas="[1.0, 1.0]" backgroundGradientColors="[#FFFFFF, #0C3404]" viewSourceURL="srcview/index.html">

<mx:Style>
       @font-face {
            src: local("Arial");
            fontFamily: ArialEmbedded;
       }

       .captionText {
            fontFamily: ArialEmbedded;
            color : #ffffff;
            fontSize : 16pt;
       }
</mx:Style>

<mx:Script>
    <![CDATA[
        private function showCaption():void{
            fadeIn.play([caption]);
        }
        private function hideCaption():void{
            fadeOut.play([caption]);
        }
    ]]>
</mx:Script>
    <mx:Canvas rollOver="showCaption()" rollOut="hideCaption()" >
        <mx:Image id="img" source="1.jpg" width="320" height="240" />
        <mx:Box id="caption" height="30" width="320"
            alpha="0" backgroundColor="#000000" backgroundAlpha=".5"
            bottom="10" horizontalCenter="0" horizontalAlign="center">
            <mx:Label text="Cheetah beauty @ Cologne zoo" styleName="captionText" />
        </mx:Box>
    </mx:Canvas>
    <mx:Label text="(Rollover the image to see the caption)"
        color="#000000" fontStyle="italic" fontSize="10" fontFamily="Arial"/>

    <mx:Fade id="fadeIn" alphaFrom="0.0" alphaTo="1.0" />
    <mx:Fade id="fadeOut" alphaFrom="1.0" alphaTo="0.0" />
</mx:Application>

Read More »


Create custom tooltip – toolTipCreate

No Comments »

CustomToolTip.mxml

Read More »


Build a Drag-and-Drop XML Image Viewer – DragManager

No Comments »

All of the informations about the images showcased in the gallery are stored in an XML file. Create an xml file that follows this structure and save it as datas.xml in the src directory :

Read More »


How to add system Fonts in your application – Font.enumerateFonts()

No Comments »

How to add system Fonts in your application

Read More »