Author Archives | Sherif

Sherif - who has written 67 posts on Flex & AIR.


Contact the author

Creating Customs Tags in Coldfusion; An example

Monday, October 20, 2008

Comments

In this example I will show you how to create a Custom tag in ColdFusion. The idea of a Custom tag is to allow you to package chunks of code into reusable modules that you can then reuse through out your project. They are similar to UDF (User Defined Functions) with the exception that Custom [...]

Continue reading...

Reloading a Flex Application Via URLRequest and application.url

Monday, September 22, 2008

Comments

Here is how you can reload a Flex Application Via a Click of a button using the Application.application.url property <code> <?xml version="1.0" encoding="utf-8"?> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="vertical" backgroundColor="0xFFFFFF"> <mx:Script> <![CDATA[ private function onReloadFlexApp():void { var urlRequest:URLRequest = new URLRequest(Application.application.url); navigateToURL(urlRequest,"_self"); } ]]> </mx:Script>     <mx:Button label="Click Here to Reload" click="onReloadFlexApp()"/>     </mx:Application> </code>

Continue reading...

Adding History Management to Components in Flex

Monday, September 22, 2008

Comments

Say You want to have the states of your Components in Flex save themselves so a user can navigate using the back and forward buttons of the browser. This is a possible by implementing the mx.managers.IHistoryManagerClient and supplying the saveState and loadState Methods with what property of the component you would like to save. This [...]

Continue reading...

Using the ImageSnapshot Class in Flex to take a Snap Shot of a component

Monday, September 22, 2008

Comments

This Example shows you how to take a Snap Shot/Screen Shot of a flex Component using the ImageSnapShot.captureBitmapData() method. It is pretty simple so look at the example and click the button to take a snap shot. Source View is Enabled. Click Here for the Example Technorati Tags: Component SnapShot, Flex, SnapShot Flex

Continue reading...

Passing Paramaters using HTTPService in Flex to ColdFusion

Sunday, September 21, 2008

Comments

This Example involves passing parameters from Flex to ColdFusion and then having ColdFusion Process what we need and sending it back to flex via flashvars. The HTTPService class is much slower than say using the RemoteObject class or even the WebService class but If you are not doing any heavy lifting like this example then [...]

Continue reading...

RemoteObject Class in Flex and ColdFusion Example

Sunday, September 21, 2008

Comments

This Example uses the RemoteObject Class/MXML Tag in Flex to send some parameters to a ColdFusion CFC file, the ColdFusion CFC file then processes the parameters that Flex sent it then sends the results back which we display in Flex.  The Example is simple and straightforward and you can use this as a stepping stone [...]

Continue reading...

1000: Ambiguous reference to setStyle

Sunday, September 14, 2008

Comments

The error is 1000: Ambiguous reference to setStyle. It took me a while to find a solution, It happens when you are trying to set a style, for example: setStyle(”w”,50) in Flex and at the same time you are using the mx_internal namespace. For Example use namespace mx_internal; private function dummyTest():void { var mainSelector:CSSStyleDeclaration [...]

Continue reading...

Flash Player Text Engine Examples For Flex 4 (Gumbo)

Sunday, September 14, 2008

Comments

So the New Flash Player 10 will be coming out with a Text Engine that is a significant improvement over what we have right now as of Player 9. There are around 32 new classes that you have so far, give or take a few. The Example that I have provided is pretty simple [...]

Continue reading...

Creating a Link to the Context Menu In Flash Player 10 for Flex 4 (Gumbo)

Wednesday, September 10, 2008

Comments

So Here is How you can add a link to the ContextMenu in Flash Player 10 for Flex 4, Now The Example is pretty straight forward and simple. However, I have not figured yet a purpose or what the use for it could be. To test the example, right click on the image. Click on [...]

Continue reading...

Flex 4 (Gumbo) Using FileReference to Upload & Download without a Server

Wednesday, September 10, 2008

Comments

So in Flash Player 9, You couldn’t upload Files/save the files and have some sort of interaction with it without sending it to Server side scripts. Now, for example in Flash Player 10, a user can upload his/her word document and then be able to save it to his computer after he/she is done editing [...]

Continue reading...