Ask a Question related to Macromedia Flash Actionscript, Design and Development.
-
Brad Heathman #1
Custom objects in an array
I have tried to store instances of a custom class in an array. When I
retrieve the object
actionScript seems to have forgotten what type of object it was.
In the sample code below: Result is a custom class to hold test results.
Details is an array of
test result objects. The code creates an new instance (r), initializes it
(init) and pushes it into
the array details. The first trace command returns true. The second trace
reads the same object
from the array (details) and performs the same test. The test on the array
element is false.
var r = new Result();
r.init(arguments.length,tcase,expected,actual);
var i = details.length;
this.details.push(r);
trace("Group.testcase r = "+( r instanceof Result )); // RETURNS TRUE
trace("Group.testcase details = "+( details[i] instanceof Result )); //
RETURNS FALSE
trace( r );
I am new to Flash. I have a strong Java background. Is there some little
Flash trick I am missing?
I am using Flash MX.
Confused,
Brad Heathman
HeathmanB.com - Helping small Christian businesses
Independent Associate of Pre-Paid Legal, Protection for families, business
and benefits.
Identity Theft consultation, protection and restoration.
InHISsite - Domain registration and hosting solutions
Brad Heathman Guest
-
Array out of Objects
Back in the old days of Flash, I was able to walk through all of the objects on the stage, and filter them by the type of object. I could then... -
How to represent an array of objects?
If I have the following class declaration and then need to be able to provide a way to access a collection of PartyRecords, how would I accomplish... -
How to control the root name with which an array of a custom class objects are serialized????
Hello, is there a way of controlling the name with which an array of objects of a custom class is serialized??? public class MyClass {... -
array of objects
I currently have a number of buttons, which have image icons and when clicked, will display th associated image in a large viewing fram I would... -
What is this objects name in the array?!
I have this code sniplet.. function dragalong() { this.startDrag(); } function dropper() { this.stopDrag(); }



Reply With Quote

