AS2 Add more movieclips to var
Clash Royale CLAN TAG #URR8PPP AS2 Add more movieclips to var This question may be weird, but it's a big problem for me. onClipEvent (load) { var ground:MovieClip = _root.bottomground1; var grav:Number = 0; var gravity:Number = 2; var speed:Number = 10; var maxJump:Number = -17; var touchingGround:Boolean = false; } So, the thing i want to do is to add more movieclips to var ground, such as var ground:MovieClip = _root.bottomground1,_root.bottomground2...; I tried this also: var ground:MovieClip = _root.bottomground1, MovieClip = _root.bottomground2...; None of it is working. Any reply would be very helpful. 1 Answer 1 A variable can only have one value :) What you need is an array. Might not be a valid AS2, it's been a while: Create an array: var groundArray:Array = new Array(_root.bottomground1, _root.bottomground2); OR something like // add objects with instance na...