Dinesh- Flex/AIR Blog

Archive for October 2008

Removing whitespace characters from String

without comments

var str:String=”  123456789    “;

Trace(str.length); //15
Trace(StringUtil.trim(str).length); //9

StringUtil.trim method removes all whitespace characters from the beginning and end of the specified string.

The StringUtil utility class has some more methods that will be more useful when you work with String objects within Flex:-)

Written by dineshblog

October 30, 2008 at 1:29 pm

Posted in Flex

Detect the Installed Flash Player Version

with 2 comments

Alert.show(“You are using flash version”+flash.system.capabilities.version.tostring());

this will give you the Flash Player Version installed in your system:-)

Written by dineshblog

October 21, 2008 at 8:47 am

Posted in Flex

Hiding Windows Default Cursor

without comments

Mouse.hide()—–use this method when ever you want to hide windows default cursor

Mouse.show()—-use this method to display the hidded windows default cursor

These methods are commonly used when user mouseover any video player,where we can hide the default window cursor:-)

Written by dineshblog

October 21, 2008 at 8:38 am

Posted in Flex

Setting handCursor

without comments

<mx:Label text=”change cursor” useHandCursor=”true” mouseChildren=”false” buttonMode=”true”/>

same property can be applied for setting handcursor in canvas,button..

Written by dineshblog

October 21, 2008 at 8:33 am

Posted in Flex