  | |  | Array constructor problem | Array constructor problem 2004-04-06 - By ryanm
Back I'm trying to extend the Array class, but I've run into a problem. Because the constructor takes an unlimited number of parameters, I need to be able to pass those parameters to the superclass to generate a usable array. I tried using the arguments collection, like this:
class MyArray extends Array{ function MyArray(){ super(arguments); } }
...but what happens is all of the arguments are concatenated into a single string, kind of like array.join() was used to pass them. I need to take an unlimited number of arguments and turn around and pass all of those arguments as individual arguments to the super class. Any insight on how I might do this?
ryanm
-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- -- Server geeks, take heart! If you're sick of wading through animation & graphics instruction for relevant info., then Nate Weiss' Macromedia Flash MX Professional 2004 for Server Geeks is for you. Leave designing to designers and dig into core concepts to create rich user interfaces, online advertising, and more. See www.peachpit.com for more info. Yahoo! Groups Links
<*> To visit your group on the web, go to: http://groups.yahoo.com/group/FLASHmacromedia/
<*> To unsubscribe from this group, send an email to: FLASHmacromedia-unsubscribe@(protected)
<*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
Earn $52 per hosting referral at Lunarpages.
|
|
 |