Posted by Paritosh Bisi on September 22, 2008
Tired of seeing the dull looking default flex alert box…? Need to show some alert box somewhat like this below? This can be achieved by applying styles. The code is as follows…

Inside script tab function:-
<mx:Script>
<![CDATA[
import mx.controls.Alert;
private function alertTest():void{
var alert:Alert;
alert = Alert.show("Designed by Paritosh Bisi","Heloo...!!!");
alert.styleName = "myalertstyle";
}
]]>
</mx:Script>
Inside style tag:-
<mx:Style>
.myalertstyle
{
background-color: #00FFFF;
cornerRadius: 0;
creationCompleteEffect: myEffect;
title-style-name:alertTitle;
color:#000000;
font-family:verdana;
font-size:11;
area-fill:#000000;
border-color:#000000;
border-style:solid;
drop-shadow-enabled:true;
shadow-direction:center;
shadow-distance:0;
drop-shadow-color:#000000;
button-style-name:mybuttonstyle;
fill-colors:#000000;
}
.mybuttonstyle
{
cornerRadius: 0;
color:#000000;
background-color: #330000;
}
</mx:Style>
We have to put the above code in the main application.
Instead of putting this style codes inside style tag, we can create a .css file and put these style codes. in style tag we need to refer the .css file with the source propery as follows…
<mx:Style source=”myCss.css”/>
Please note that, it is better to put the .css file reference in the main application file. Refering from some other places may result in different looking styles.
This code will give us some different looking, colorful and stylish alert box.
Happy Flexing…:-)
Posted in Flex Builder | Tagged: Alertbox, Flex Builder, Styles | Leave a Comment »
Posted by Paritosh Bisi on September 20, 2008
The default time for executing actionscript file is 15 sec’s and if the the file takes more that 15 sec’s it throws an Runtime Exception, Error #:1502, as below.

If you want Script to execute more than the default time then we need to specify the time limit at the main Application tag .
The property to use is: scriptTimeLimit as follows, in application tag we have to add,
<mx:Application xmlns:mx=”http://www.adobe.com/2006/mxml” layout=”absolute” scriptTimeLimit=”50″>
It takes the value for sec’s specification, in the above code I have set the execution time limit to 50 sec’s. And the max value it can have is 60 sec. It means that the Script can be executed for maximum 60 sec’s.
Happy Flexing…:-)
Posted in Flex Builder | Tagged: Debugging, Flex Builder | Leave a Comment »
Posted by Paritosh Bisi on September 15, 2008
To Organize Import statements in Flex Builder , click on Source > Organize Imports to organize imports alphabetically.
The shortcut keys for it is : CTRL + Shift + o
Please note that that imports can only be organized in this manner in ActionScript files only. We can not Organize Imports in MXML files.
In Flex Builder 3, the above action will remove Unwanted Import Statements also.
Happy Flexing…:)
Posted in Flex Builder | Tagged: Flex Builder | Leave a Comment »
Posted by Paritosh Bisi on September 14, 2008
The FlashTracer addon tool for Firefox 2 which is a very useful tool to debug Flex and Flash applications is not directly available for Firefox 3. But we can now install FlashTracer for Firefox 3. Please check the following link.
http://www.sephiroth.it/firefox/flashtracer/
Happy Flexing…:)
Posted in Firefox | Tagged: Firefox 3, Flashtracer | Leave a Comment »
Posted by Paritosh Bisi on September 14, 2008
Posted in Flash Player | Tagged: Flash Player 10 | Leave a Comment »
Posted by Paritosh Bisi on September 13, 2008
I wrote my first post today.
Posted in Blogging | Tagged: First post | Leave a Comment »