Hi Stephen,
You are incrementing nCounter without ever initializing it. In Flash 6
and earlier if you incremented an undefined value it treated it as 0,
but in Flash 7 and later it remains undefined. Set nCounter to 0 first
and all should be well.
Jake
On 11/12/06, Stephen Ford <[EMAIL PROTECTED]> wrote:
Why does the following work when published as Flash 6 Actionscript 2, but not Flash 7 actionscript 2 (or
Flash 8 Actionscript 2).var nInt:Number;var oMain:Object = {};var nCounter:Number;var sClipName:String;var
nClipDepth:Number;function spawnClip():Void{ var mcTemp:MovieClip = this.attachMovie("mcCircle",
"mcCircle"+nCounter, nCounter, oMain); mcTemp._x = Math.random()*600; mcTemp._y =
Math.random()*400; nCounter++;}nInt = setInterval(this, "spawnClip",
500);Thanks,Stephen._______________________________________________
[email protected]
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
_______________________________________________
[email protected]
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