Posted by easow83 on September 14, 2008
Here is the source for undgragable alert ….set “isPopUp” property “true” to make it dgragable.
<?xml version=”1.0″ encoding=”utf-8″?>
<mx:Application
xmlns:mx=”http://www.adobe.com/2006/mxml“
layout=”
vertical”
verticalAlign=”middle”
backgroundColor=”white”>
<mx:Script>
<![CDATA[
import mx.controls.Alert;
private var myAlert:Alert;
private function showAlert():void
{
title =
"Undraggable Alert"
;
myAlert = Alert.show("My undgragable alert!!",title);
myAlert.isPopUp = false;
myAlert.status = Capabilities.version;
}
]]>
</mx:Script>
<mx:Button id=”btn”
label=”Show Alert”
click=”showAlert()”
/>
</mx:Application>
Posted in Flex, Flex 2.0.1, Flex 3 | Leave a Comment »
Posted by easow83 on September 11, 2008
Here is the sample code were you can display the system time..its like a digital clock..usually the timer we can use to update the time ,running a an application similar to stop watch ,alarm and lot more ..
<mx:Application xmlns:mx=”http://www.adobe.com/2006/mxml” layout=”absolute” creationComplete=”init()”>
<mx:Script>
<![CDATA[
[Bindable]
private var sec:String;
private function init():void {
var ti:Timer = new Timer(1000);
ti.addEventListener(TimerEvent.TIMER,timerFun);
ti.start();
}
private function timerFun(e:TimerEvent):void{
var dt:Date = new Date();
sec = dt.getHours() +’:'+dt.getMinutes()+’:'+dt.getSeconds();
}
]]>
</mx:Script>
<mx:HBox>
<mx:Label id=”lbl” text=”{sec}”/>
</mx:HBox>
</mx:Application>
Posted in Flex, Flex 2.0.1, Flex 3 | Leave a Comment »
Posted by easow83 on September 11, 2008
Here is a sample that should help demonstrate the approach.
click here
Posted in Flex, Flex 2.0.1, Flex 3 | Leave a Comment »
Posted by easow83 on September 9, 2008
Application.application.scrollPolicy = “no” that can be overrided by individual containers..
Posted in Flex, Flex 2.0.1, Flex 3 | 1 Comment »
Posted by easow83 on September 9, 2008
Generally what makes a flex app big in size
1.Try to load your assets (images/animations) at runtime.
2. Try not to embed fonts. If you don’t really need a special font, or advanced anti-aliasing and you are not applying any effects and transformations (alpha, rotation etc.) to your text, you don’t need to embed fonts.
3.Another important concept is that of modular applications. Here are the docs:
http://livedocs.adobe.com/flex/3/html/help.html?content=modular_1.html
4.make sure you are looking at a “production” compile and not a debug compile. There is significant difference in swf size.
5.not forget the Runtime Shared Libraries. If you can offload the Flex Framework into and RSL that will significantly decrease your swf’s size. The initial load will be the full 1mb, unless the user has been to another site that loaded the RSLs already into the flash player cache. Every subsequent load will be reduced by about 500kb if you’re using the full flex framework.
Posted in Flex, Flex 2.0.1, Flex 3, GeneralDiscussion, RIA | Leave a Comment »
Posted by easow83 on June 5, 2008
Posted in Flex, Flex 2.0.1 | Leave a Comment »
Posted by easow83 on April 7, 2008
Posted in Flex, Flex 2.0.1 | Leave a Comment »
Posted by easow83 on April 6, 2008
You have a user click on a link ,button, label
whatever… from within a Flex application and have it take the user to a
non-Flex, regular web page within their browser.. It’s probably a
simple answer but I’m still getting up to speed your Flex!!!…….
try this
<mx:Button label=”Click Here” click=”navigateToURL(new
URLRequest(‘htp://mathewjacob.wordpress.com’),’_mine)” />
Posted in Flex, Flex 2.0.1, Flex 3 | 4 Comments »
Posted by easow83 on April 2, 2008
First lets go over what events there are for an application creation life cycle. These include preinitialize, initialize, creationComplete, and applicationComplete. Below is a diagram that explains when each happens and shows the order. 
Looking at the code below we see that all that is done in the example is that when each event is fired I call a small function. This function, recordEvent, takes in a FlexEvent and adds some text to our report string. Also you see that not only is a little bit of text added, the time from flash.utils.getTimer() is printed. This getTimer() function returns the amount of milliseconds that have gone by since the start of the application. So what we get printed out is event.type and the time at which the event occurred.
<?xml version=“1.0″ encoding=“utf-8″?>
<mx:Application xmlns:mx=“http://www.adobe.com/2006/mxml”
layout=“absolute” width=“349″ height=“319″
viewSourceURL=“../files/LifeCycleEventsTutorial.mxml”
preinitialize=“recordEvent(event)”
initialize=“recordEvent(event)”
creationComplete=“recordEvent(event)”
applicationComplete=“recordEvent(event)”>
<mx:Script>
<![CDATA[
import mx.events.FlexEvent;
import flash.utils.getTimer;
[Bindable]
private var reportTxt:String = “”;
private function recordEvent(event:FlexEvent):void
{
reportTxt += (event.type + ” event occured at “
+ flash.utils.getTimer() + “ms” + “\n“);
}
]]>
</mx:Script>
<mx:Panel x=“0″ y=“0″ width=“349″ height=“319″
layout=“absolute” title=“Life Cycle Events”>
<mx:TextArea x=“10″ y=“10″ width=“309″ height=“259″
editable=“false” id=“txtReport” text=“{reportTxt}”/>
</mx:Panel>
</mx:Application>
Now once the last event applicationCreation is fired all other events can start firing, such as click events and so on. Understanding how the application is created is an important aspect to any program but it is especially so in Flex because of its event driven nature.
I hope this quick run through helps you out when trying to figure out what starup event(s) you should hook into. If you would like more info on these check out the Adobe livedocs and a special thanks to Ted Patrick, who has great info on all aspects of Flex.
Posted in Flex, Flex 2.0.1, Flex 3 | Leave a Comment »
Posted by easow83 on March 16, 2008
FluorineFx provides an implementation of Flex/Flash Remoting, Flex Data Services and real-time messaging functionality for the .NET framework.
check the following links.
http://www.fluorinefx.com/
Fluorine Projector is an open source SWF2Exe Framework based upon Fluorine Remoting Gateway, Macromedia Flash® and Microsoft .NET Framework.
http://fluorine.thesilentgroup.com/projector.htm
Posted in Flex, Flex 2.0.1, Flex 3 | Leave a Comment »