You could also do:
var myArray:ArrayExtension = new ArrayExtension();
myArray.push("Hello", "Goodbye", "World");
same result as doing them separately.
[EMAIL PROTECTED] wrote:
Thanks, that will work. So there is no definitive way to add the values all at
once, i.e. [1,4,5,76,3] when extending an Array?
Thanks again.
Ian Thomasn wrote:
Hi there (whoever you are!)
Your problem is that the [1,2,3] initialiser syntax is actually a
short cut for creating a new Array() object, not an ArrayExtension().
So you're replacing the object you just created with new().
What you need to do is to _modify_ your ArrayExtension() object, not replace it.
If you try:
var myArray:ArrayExtension = new ArrayExtension();
myArray.push("Hello");
myArray.push("Goodbye");
myArray.push("World");
That should sort your problem.
HTH,
Ian
_______________________________________________
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com
--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Bob Leisle
Headsprout Software & Engineering
http://www.headsprout.com
Where kids learn to read!
_______________________________________________
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com