|
-
_root.attachMovie HELP!!
Hello! I have a problem, I can`t find anything on it anywhere! I have a code to spawn enemies using _root.attachMovie, but whenever it spawns it just disappears shortly after spawning. Here is the code.
Actionscript Code:
onClipEvent (load) { var a = 100; } onClipEvent (enterFrame) { function goblinspawn() { a++; var newname = "goblin" + a; _root.attachMovie ("goblin", gob, this.getNextHighestDepth()) if (this._xscale == +scale) { _root[gob]._x = 1400; _root[gob]._y = 250; }else{ _root[gob]._x = 1400; _root[gob]._y = 250; } _root[gob].onEnterFrame = function() { if (_root.knight._x < this._x) { this._x -= 8 } if (_root.knight._x > this._x) { this._x += 8 } } } function goblinspawn1() { var newname = "goblin" + a; _root.attachMovie ("goblin", gob, this.getNextHighestDepth()) if (this._xscale == +scale) { _root[gob]._x = 100; _root[gob]._y = 250; }else{ _root[gob]._x = 100; _root[gob]._y = 250; } } //nonfunction //nonfunction if (a == 100) { goblinspawn(); a++; } if (a == 101) { goblinspawn1(); a++; } if (a == 102) { goblinspawn(); a++; } }
-
Bump, anyone have a solution?
-
Prid - Outing
I am back, guys ... and finally 18 :P
BRING BACK THE OLD DESIGN!! OR AT LEAST FIX THE AS TAGS
-
Designer, Programmer, Musician
Yeah! Post FLA so we can help you
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|