Flash Builder 4 Network Monitor

Flash Builder 4: Network Monitor and new debugger options from Mihai Corlan on Vimeo.

0 Comments

Flex Array Performance: For vs. ForEach

We made a little test to see the flex performance on parsing an large array.

Here is the experiment:

var size:Number = 10000000;
var arr:Array = [];
for (var i:int=0; i
var time:Number, o:Object;
 
// for()
time = getTimer();
for (i=0; i=0; i--) { arr[i]; }
trace("for reversed test: "+(getTimer()-time)+"ms");
 
// for..in
time = getTimer();
for each(o in arr) { o; }
trace("for each test: "+(getTimer()-time)+"ms");

And here are the results:

for test: 124ms
for reversed test: 110ms
for each test: 261ms

We wish you to use this results wisely !

————————
The TiMeister Team

[ad]

1 Comment

Flex: Unable To Open locale en_US or fr_FR

If you want to create a localized application you may find yourself in a strange situation when you did all the steps like in the book, but you continue to receive the “Unable to open locale xx_XX” error messages.

To simulate a fix on this issue we will take the example of adding French to your app.

Basic steps:
- The first step is to create a fr_FR folder under the /locale/ one exactly like in the Flex documentation and then add the translated bundle.properties file.
- The second step is to add the compiler options: -locale en_US,fr_FR

Extra steps you need to make in order to get rid of the ugly “unable to open locale” error message:

1. goto the following path :

<flex-install-folder>/sdks/<current-sdk-folder>/bin/

for windows it’s: C:\Program Files\Adobe\Flex Builder 3\sdks\3.2.0\bin\

2. Execute the following command:

> copylocale.exe en_US fr_FR

That’s all, hope we helped you!
————————-

The TiMeister Team

1 Comment

FLEX: Why is stage == null?

Hello,

If you are trying to access the stage of your application right when your app is completed then you’re doing something wrong.

BAD CODE Most of the cases programmers make the following mistake:

&lt;?xml version="1.0" encoding="utf-8"?&gt;
<mx:WindowedApplication xmlns:mx="http://www.adobe.com/2006/mxml" creationComplete="init()">
    <mx:Script>
        <![CDATA[
            import flash.display.StageDisplayState;
            private function init():void
            {
                var s:Stage = this.stage; // this.stage = null   ...why??
                s.scaleMode = StageScaleMode.EXACT_FIT;
            }
        ]]>
    </mx:Script&gt>
</mx:WindowedApplication>

GOOD CODE : The correct approach is the following:

<?xml version="1.0" encoding="utf-8"?>
<mx:WindowedApplication
       xmlns:mx="http://www.adobe.com/2006/mxml"
       creationComplete="init()">
    <mx:Script>
        <![CDATA[
            import flash.display.StageDisplayState;
            private function init():void
            {
                this.systemManager.stage.scaleMode = StageScaleMode.EXACT_FIT;
            }
        ]]>
    </mx:Script>
</mx:WindowedApplication>

Hope we helped you with this issue we also had in our beginning as Flex Developers

1 Comment

Top Flex Blogs and Resources

Hello,

We would like to share with the list with our preferred blogs on adobe flex news , and also the top flex resource websites that could came handy anytime

NEWS and Cool Stuff:

* Mihai Corlan’s personal blog
http://corlan.org – Mihai is a flash platform evangelist at Adobe Inc. and one of the most interesting peoples we meet

* Doug McCune
http://dougmccune.com/blog/ – Doug is a pretty big name in the Flex community (he gives presentations all over the country at Flex events), most of the items you are going to find on his site are examples of cool applications built using Flex.

* CFLEX: Community Flex

http://www.cflex.net/

* Dzone
http://www.dzone.com/links/index.html – Dzone is a great community based site for sharing developer links. The site is setup in a similar fashion as popular sites such as Digg or Reddit.

* Flex.org
http://flex.org/ – Flex.org is the main community site for Flex developers, which includes a showcase and resources for everything from PHP to .Net.

Resources & Examples:

* Adobe Flex Developer Center
http://www.adobe.com/devnet/flex/ – The Adobe Developer Center is great resource for complete tutorials and articles on how to get started with Flex or any of the other Adobe products. The other Adobe resource is the Cookbook which is built off of community code snippets that solve small programming tasks.

* Flex Examples
Peter deHaan currently works for Adobe on the Flex SDK QA team. He writes so many small tutorials that it’s hard to even keep up with this man on any level.

* Alex Harui
http://blogs.adobe.com/aharui/ -Alex writes short posts that are usually nice Flex examples solving common and uncommon problems people run across in Flex. He works with the Adobe Flex core team in San Francisco.

* ScaleNine
http://www.scalenine.com/ – Skins and Themes for Flex and AIR

* Flex SDK

http://opensource.adobe.com/wiki/display/flexsdk/Flex+SDK

* Flex Showcase

http://flex.org/showcase/

* Flex Developer Center

http://www.adobe.com/devnet/flex/

* Franto.com
http://www.franto.com/ – Flex, AIR, Flash, ActionScript Tutorials, Tips, Tricks.

* The Flex Show

http://www.theflexshow.com/blog/

* Marco Casario

http://casario.blogs.com/mmworld/

[ad]

0 Comments

Flex and Silverlight: What Will the Next Five Years Look Like

0 Comments

RTMP specification is out

The Real-Time Messaging Protocol (RTMP) was designed for high-performance transmission of audio, video, and data between Adobe Flash Platform technologies, including Adobe Flash Player and Adobe AIR. RTMP is now available as an open specification to create products and technology that enable delivery of video, audio, and data in the open AMF, SWF, FLV, and F4V formats compatible with Adobe Flash Player.


View Adobe RTMP Specification License

Mihai Corlan:

“We announced earlier this year that we’d open up the specifications for Real-Time Messaging Protocol (RTMP is the protocol used by Flash Media Server and LiveCycle Data Services). We did it today, and you can read the details here.

Basically you can download the specifications and start implementing your own servers that make use of this highly efficient protocol for sending data between Adobe Flash Player or Adobe AIR apps and various servers.

It is worth noting that we didn’t open up anything related to RTMPe – Adobe’s implementation to secure the content. While you as a developer don’t have access to our implementation, you are free to implement your own secure implementation on top of RTMP.”

—————-
TiMeister Team
Online Timesheet Software

[ad]

0 Comments

Call function from Flex to Flash

[ad]

How to call a flash function from flex?

  1. Load the AS3 swf file using an instance of SWFLoader.
  2. Call the function like this:
mySWFLoader.content.functionName();

How to listen for flash events from flex?

  1. // In your Flex app
    /* called when your SWFLoader finishes loading the SWF */
    private function onMySWFLoaded( p_event:Event ) :void
    {
          mySWFLoader.content.addEventListener( “clicked”, onSWFClick );
    }

    /* callback for the clicked event */
    private function onSWFClick( event:Event ) :void
    {
          mx.controls.Alert.show( ‘Click event raised!’ );
    }

  2. // In Flash Movie
    /* called when the button in your flash movie is clicked */
    private function onButtonClick( p_event:Event ) :void
    {
          dispatchEvent( new Event( “clicked” );
    }

How to call a flex function from flash at a specific frame?

Embed(source=“../assets/swf/myFlashComponent.swf”, symbol=“Preloader”)]
private var FlashPreloaderSymbol:Class;
private var clip:MovieClip;

clip = new FlashPreloaderSymbol();
addChild(clip);

private function onFlexInitComplete( event:FlexEvent ):void
{
clip.addFrameScript(47, callMyFunction);
}



[ad]

2 Comments

Create applications with Adobe Catalyst

[ad]
We wanted to share with you a great video tutorial about how to use Adobe Flash Catalyst and create Flex Applications starting just with an image.
The tutorial explains in details how you can create a Flex button and a scrollbar using Catalyst.

0 Comments

TOP 10 Twitter AIR Applications

Twitter -  My favorite AIR  Applications for Twitter

[ad]

0 Comments