-
Getting Some …rest
Thought I’d blog about this since I haven’t seen this posted before and it comes up from time to time. With AS3, we got access to a new function parameter, the …rest parameter, which allows us to pass in a dynamic list of parameters for usageREAD MORE
-
Flex 2 and Flash 9 SWFs
A question popped up on flexcoders recently about whether these two could play together and here’s my response. Yes, it’s possible using SWFLoader. The 9 SWF will be accessible/programmable through the content property of the loader. Here’s a very basic example:
Flex =======
import flash.events.Event; private function initSWF( event:Event ):void { loadedSWF.content.addEventListener( "clicked", clickHandler ); } public function clickHandler( event:Event ):void { var button:String =READ MORE
-
StringUtils Class
Came up with this idea after perusing proto.layer51.com. It’s basically a sub-class of String and the 1st method is a reduction method that let’s you feed in a string, a limit and a “there’s more” indicator. Anyways, here’s the code:
class org.thesourcecode.utils.StringUtils extends String { public var theString:String; public function StringUtils( string:String ) { super(); theStringREAD MORE
-
Get to Know Your Sanitation Worker!!
If you plan on doing any serious AS3 development for Flash or Flex, make sure you become intimate with the Garbage Collector (GC). In previous Flash Player versions, the GC worked silently and intuitively behind the scenes. With AS3 though, you have to put more thoughtREAD MORE
-
Flex :: Custom ComboBox Part 2
Last time we looked @ creating a custom ComboBox that could be reused for displaying states/countries. This time will wrap up by looking @ how that ComboBox can be used as an itemRenderer in a DataGrid. Since DataGrids use TextInputs as their default renderers when theREAD MORE
-
Flex :: AMFPHP Login
The subject pops up a lot about reusable Flex components. Here’s one to handle multi-user logins via AMFPHP / MySQL:
< ?xml version="1.0" encoding="utf-8"?> <mx :Canvas xmlns:mx="http://www.adobe.com/2006/mxml" xmlns="*" width="355" height="213"> </mx><mx :Script> < ![CDATA[ import flash.net.Responder; public var gateway:RemotingConnection; public function checkLogin( service:String, params:Array ):void { gateway = new RemotingConnection( "http://yourwebserver.com/flashservices/gateway.php" ); gateway.call( service,new Responder(onResult,onFault),params ); } public function onResult( result:Array ):void { if (result[0]!="VALID") { lResponse.textREAD MORE
-
The Joy of E4X!
Prior to AS3, working with XML was a drag. The semantics of manipulating an XML object definitely left much to be desired. Well, AS3 changed all that by bringing us E4X. If you don’t already know, E4X stands for ECMAScript for XML and it introducesREAD MORE
Posts tagged as "AS3"