Flexcomps’s Weblog

Archive for September 2008

The post contains a solution for a case where you need to attach a Library symbol and you have to pass that class name as a string to the function.
The approach followed here is by using the getDefinitionByName utility which interprets the string and convert it into a Class. Then you can use a new [...]

Enabling Handcursor on a MovieClip having dynamic TextField in AS3

Posted by: Yogesh Puri on: September 25, 2008

You can enable the hand cursor on a MovieClip by defining the following statement
MovieClip.buttonMode = true;
However the solution does not work in-case you have a dynamic textField in that movieclip. To enable hand in this case you have to additionally write the following statement
MovieClip.mouseChildren = false;
The reason is that the mouseChildren property determines whether or [...]

Adobe FLASH CS4 Professional has been released

Posted by: Yogesh Puri on: September 23, 2008

Adobe had released the Flash CS4 professional edition at a preorder price of $699. Following are the Some of highlighted features

Object-based animation
3D transformation
Procedural modeling with Deco and Spray Brush
Metadata (XMP) support
Authoring for Adobe AIR
XFL support
Inverse kinematics with the Bones tool
Motion editor
Motion presets
H.264 support

Check here for more details
http://www.adobe.com/products/flash/features/?view=topnew&promoid=DRHWS

Tags:

AS3 XML Loader Utility Class

Posted by: Yogesh Puri on: September 23, 2008

I have developed this XMLUtility class in conjunction with a CustomEvent Class which returns me the loaded XML/String Data along with the complete event firing. You can download the sources from here. Following is the code you need to write when you want to load this class

//———— Import Classes
import com.flexcomps.utils.CustomEvent;
import com.flexcomps.utils.XMLLoaderUtil;

//——– Create instance of loader [...]

Datagrid : Sorting Numeric data having commas

Posted by: Yogesh Puri on: September 22, 2008

The post is regarding a solution in case you have some numeric data with commas, which is going to be shown in a datagrid with sorting enabled. If you use the Array.NUMERIC as an option on the DataGridColumn.sortOptions with values having comma the results are not as desired. So what we have done is use [...]

AS3 Scrollbar component for MovieClip

Posted by: Yogesh Puri on: September 15, 2008

Here is a ScrollBar component class. The class takes a movieClip as a parameter and then attach the scrollbar to it. Following is the snapshot of same
You can download the sources from here

AS3 Undocumented Method Date(String)

Posted by: Yogesh Puri on: September 9, 2008

The Date class constructor is documented with the following parameters in Adobe Docs

Date(yearOrTimevalue:Object, month:Number, date:Number = 1, hour:Number = 0, minute:Number = 0, second:Number = 0, millisecond:Number = 0)

However today i just tried out and found that there is also a undocumented calling of Date constructor with a Date in a string format. I have [...]

Finding and changing BG color of all input TextField Instances

Posted by: Yogesh Puri on: September 8, 2008

Following is the code for finding and changing BackGround color of all the Input textfields in a perticular scope

//—- Import classes ———-
import flash.utils.getQualifiedClassName;
import flash.text.TextField;
import flash.text.TextFieldType;
//——— initialize variables —-
var temp:Array;
trace(this.numChildren)
for(var k:int=0;k < this.numChildren;k++){
var child:* = this.getChildAt(k);
if(getQualifiedClassName(child) == “flash.text::TextField”){
var childIns:TextField = child as TextField;
if(childIns.type == TextFieldType.INPUT){
changeBGColor(childIns);
}
}
}
//—- function to change BG color of input boxes ——
function changeBGColor(textFieldObj:TextField){
textFieldObj.background = [...]

AS3 – calling myFunction() on main timeline from loaded SWF

Posted by: Yogesh Puri on: September 1, 2008

The post is about loading an external swf in a main swf file with some function on main timeline and calling those functions from loaded swf file.
Now the problem is when you try to compile the external swf file with any reference to the main timeline using parent.parent or loader.parent etc. it gives error in [...]


 

September 2008
M T W T F S S
« Aug   Oct »
1234567
891011121314
15161718192021
22232425262728
2930  

Blog Stats

  • 132,942 hits