actionscript-3

How to check if an XMLList is empty in Flex

If I have an XMLList object in Flex, what is the proper way to check to see if the list is empty? Should I just compare the result of myList.length() > 0, myList.toString() != "" or try another method altogether? ...

ActionScript 3 TextArea htmlText styling using <span> tag

According to this webpage, the htmlText property in TextArea can handle CSS text style if using span tag. I want to format multiple tags in my code. Something like: var tags:TextArea = new TextArea(); tags.htmlText = "<span style='color: rgb(165, 150, -90); font-size: 0.955882610016677em'>street</span>, <span style='color: rgb(168...

Absolute Coordinates in AS3

What is the simplest way to determine absolute object coordinates in AS3? ...

How to start Application from a simple AS file?

I want to use vkontakte's new wrapper feature, that enhances your application abilities by running under SWF wrapper. This is a sample application that uses this mechanism. It uses pure action script to display it's contents rather than an mx:Application. Using the wrapper on my mx:Application failed due to the following error: TypeE...

How to create HBox with only the top corners rounded in Flex?

I'm trying to create an HBox in flex that has only the top corners rounded. HBox (and all the other flex containers) have a cornerRadius style, but it applies to all corners. I'm not seeing a way to specify the style of individual corners. Is there any built-in way to do this, or will I need to write my own custom drawing code to draw...

Php ming: How to load and access assets from a ming-created swf in Flash/Flex?

Hi! I'm using Ming to create an library swf, using the first code example below. How can I access the embedded png from my Flex application? Here's the php/ming code: <?php // Ming to create Library.swf //----------------------------------- // Create background... Ming_setScale(20.0000000); $movie = new SWFMovie(); ming_useswfversion(7)...

What should I put on my programming cheat sheets/flash cards?

The cards are specifically for ActionScript 3, though anything programming related would probably still be helpful. I can think of a lot of things to put on them, but I know if I rush into it they won't be coherent and difficult to search through. Class Hierarchies? Function Names? Example code? Any insight at all? ...

Sound visualization in ActionScript 2.0

I need to create a basic bar chart distribution in ActionScript 2.0 based on sound output. I realize that ActionScript 3.0 has a very nice sound visualizer class SoundMixer.ComputeSpectrum but the limitations of my project require me to use ActionScript 2.0. Im wondering if you know of A. Any third party libraries that I can use or ...

Referencing static variables from frame scripts in AS3

Got some external classes, say MyClass.as MyClass.as has a static variable called foo So, ordinarily in other AS files I can call this with MyClass.foo = bar; However, this seems to be different in timeline scripts. Every time I try this I get the reference with a static type error 1119: Access of possibly undefined property foo th...

Flex DataGrid, Row Group Headers.

I am trying to extend the DataGrid to allow headers for different groups of rows. However, I cannot figure out which method to extend from DataGrid that would allow me to accomplish this. I do not want the headers to be included in the dataProvider, only the rows. I want to specify indexes to insert the headers at using a property of th...

Actionscript error

I have a flex application which is configured with blazeds sever and i am pulling images from remote database from my flex application, but as soon as i click the get image button to pull images it is giving some action script error. TypeError: Error #2007: Parameter bytes must be non-null. at flash.display::Loader/_loadBytes() a...

How to "go back"

I'm creating a learning application in Flash and am trying to figure out how to program a "back" button using ActionScript 3. I'm guessing that I need to set a variable to find the previous frame and then set an Event Listener to listen for the back button, but I don't know how to program the variable to find the previous frame, especial...

AS3 Instantiate Class From External SWF

Hi, I was chatting with my buddy about this, he is convinced you can do this and says he has done it, but I cannot get this to work. I am wondering if it is even possible at all. I tried typing a var as a Class that is within the externally downloaded SWF and then making an instance but no can do. some code private static function on...

AS3 Compiler error 1083: problem with else syntax

Hey there, I'm creating a simple click and scroll for a future menu for my personal site. I have a box, I called it thing_mc, and I have 3 positions for it. I have a next and prev. button that will control thing_mc position. I'm using TweenLite to animate thing_mc, if that makes a difference. I get a 1083 error (...else is unexpected) a...

Removing loop MC inside array

How to remove the movieclip by removeChild and later on clean the array for refresh purposes? for (var t:int=0; t<8; t++) { circlesArray[2][t].removeChild(MovieClip) } ...

How do you reset an AS3 list component so that nothing is selected (NOT selectedIndex=0)

I have a list component on the stage in an AS3 movie. I populate it with values at runtime and the user can select multiple values. When a button is clicked I want the list to reset to a state where nothing is selected, all I can figure out is to set the selected index to 0 and have the first position on the list either blank or readin...

What is the syntax to pass an array of Sprites into the Tweener Class in Actionscript 3?

This works: Tweener.addTween( [ _fee, _fye, _fum ] , { alpna:1, time:10 }); But this does not: var _myArray:Array = new Array( [ _fee, _fye, _fum ] ); Tweener.addTween( _myArray , { alpna:1, time:10 }); How can I pass the an array straight into the tweener? ...

Flex / Air sqlite async issue

Hi, I am writing an app that parses a csv file to an array and then insert the array into a sqlite database. I am having issues with Async connection to the sqlite database, I get a 3106 error...... I think the problem is that it executes the next statement before the previous is finished but I can't find a way to deal with this. Any he...

Axis labels are all dropped in the chart at times

Hi, I am setting 'dropLabels' property to true for the charts. When there are many data points on x axis (which is date time in my case) no label is displayed.This is probably because it needs a lot of space tp display all the labels which chart don't have. Is there some way where intermediate labels can be displayed if not all. If any b...

Able to hitTestObject Stage?

Can a MovieClip hitTestObject a Stage, or it need to have a MovieClip BG above the Stage in order run a hitTestObject on a fake stage? ...