problem with arrays


hi , how you,i hope fine

 

i have problem arrays objects , want create fireball after clicking

 

i tried 1 fireball(only fireballobject dont wanna move @ time , want on stage) , easy addchild(new fireball())  because errors if dont check object "if (objectname.stage){}" before adding or removing stage couldn,t ,

iam trying arrays display 1 object

here

 

if (event.keycode==keyboard.w) {
 
  fireballindex.push(new fireball())
if(fireballindex[0].stage)
addchild(fireballindex[0])
trace("if statement works")

    }

 

got message " if statement works" afte clicking w object not on stage??!!

 

in otherwise

it works

if (event.keycode==keyboard.w) {

addchild(new fireball())

}

but errors #2025 or 1009 (i dont remembe) iam sure , solution if(objectname.stage)      

 

thank you

show of code relevant problem.  include complete error messages well, before do, go flash publish settings , select option permit debugging error message might have additional helpful info.



More discussions in ActionScript 3


adobe

Comments

Popular posts from this blog

How to change text Component easybook reloaded *newbee* - Joomla! Forum - community, help and support

After Effect warning: A problem occurred when processing OpenGL commands

Preconditions Failed. - Joomla! Forum - community, help and support