#1007 Array
I have these puzzle symbols in library. I want to add instances with array and work with them through a class. So I wrote this but I’m constantly getting
TypeError: Error #1007: Instantiation attempted on a non-constructor.
at puzzle_fla::MainTimeline/frame1()
TypeError: Error #1007: Instantiation attempted on a non-constructor.
at puzzle_fla::MainTimeline/frame1()
is this even legal?
ActionScript Code:
var allElements:Array = new Array (a1_spr, a2_spr, a3_spr, b1_spr, b2_spr, b3_spr, c1_spr, c2_spr, c3_spr); for (var i:uint; allElements.length; i++){ var element:Sprite = new allElements[i]; addChild(element); Puzzle.polozaj(element); }
Help me please.
Original post by shinenot