Ask a Question related to Macromedia Flex General Discussion, Design and Development.
-
javawebgrrl #1
Action Script Array Question
Hi,
Is there an object in ActionScript which will behave something like a
java.util.HashMap ? I am trying to store some data into an array using
var myArray:Array=new Array();
myArray.push(strKey,Object);
I am storing multiple keys object pairs this way, but now I am wondering how
to get the object from the array using the key like with a hashmap? Can I do
something like
Object obj = myArray.get(strKey);
I am trying to avoid looping through the array.
Thanks for any advice.
javawebgrrl Guest
-
CF Grid / Java Script / Action Script
Hi, Does anyone know of a good reference for the attributes CFgrid exposes in a flash form? eg. I would like to select the first row on load. ... -
action script help
im trying to load an external swf file using the gotoAndPlay(_root.emptyClip.loadMovie("grey_bars.swf")); is it possible to load the same movie... -
Action script??!!?!
HI, Im kinda new to this action script stuff and a friend of mine gave me some code a while back to look at. Basically its a menu system with... -
Action Script Sound Object vs Drag-on-stage question
Until recently, I have always been a 'drag the sound on stage' designer. All the current reading I have done, however, seem to encourage going the... -
Need Help with action script.
I am working on a project for one of my classes, and in it I want to be able to click on an apple (which is a button) and make it fall. I have tried... -
theShtorm #2
Re: Action Script Array Question
I don't think something like that exists in ActionScript.
You could write your own class that would do same thing as HashMap. But
you'll need to do looping anyway, internally. Externally it would behave as a
normal java HashMap.
theShtorm Guest
-
javawebgrrl #3
Re: Action Script Array Question
Thank you very much for your reply. In case anyone was interested in this
topic . . .
I was able to code what I needed using the generic Flex Object as follows:
Put actionscript object named "theObject" into Flex Object named "map"
var map:Object = new Object();
map[strKey] = theObject;
get the object from the map using the key.
theObject = map[strKey];
javawebgrrl Guest
-
ntsiii #4
Re: Action Script Array Question
You figured it out. That is what is called an "associative array". It was a new concept for me, but is very useful. I just have to assume that it is optimized for for access.
Tracy
ntsiii Guest



Reply With Quote

