all groups > flash actionscript > november 2006 >
You're in the

flash actionscript

group:

Re: Action script



Re: Action script kglad
11/4/2006 12:00:00 AM
flash actionscript: i think i misunderstood your question and while my answer is correct, it
doesn't apply to your situation.

if the code you posted works when run in its own swf and fails when that swf
is loaded into another swf, the problem is probably due to the _root reference
(which refers to the main timeline in the external swf when it's run alone and
refers to the main timeline in the loading swf when its loaded.)

to remedy, use



this._lockroot=1; // in your external
Re: Action script kglad
11/4/2006 2:55:02 AM
Re: Action script mymar
11/4/2006 4:15:57 AM
Thanks for the response Kglad.
That's too bad because I created a clever arcade game that i wanted to post to
my website.

What I have noticed in most basic arcade games is when a bullet hits a moving
target it sends the target back to it's beginning to follow a new trajectory
(Random) but howdo they get on stage in the first place?
How do they get arcade games to work with out attaching movies. I mean how do
you get something on stage from the library???

onClipEvent(enterFrame){
for(i in _root.enemies){
if(_root.enemies[i].hitTest(_parent)){
removeMovieClip(_root.enemies[i]);
_root.shooting=false;
removeMovieClip(_parent);
enemies1.attachMovie("enemyDummy1","f"+enemyDepth,enemyDepth);
enemies1["f"+enemyDepth(20)]._x = 100;
enemies1["f"+enemyDepth(20)]._y = 250;
AddThis Social Bookmark Button