prettymuchbryce
04-12-2007, 11:49 PM
Sorry I've posted so may threads in this forum. I just am trying very hard to learn actionscript and thus far you all have been very helpful.
Ok heres my question. I have an event handler function in which i declare a new movieclip() class referece inside of it, however; when I try to access the reference from another function it tells me its undefined. If I declare the reference outside of the function everything works fine though. Why does it do this and how can I fix it?
EDIT: I figured out that if I just make an array and store my movieclips in tehre that it doesnt matter which funciton I create them in. I guess that is the problem but I am still curious as to why this happens.
Ok heres my question. I have an event handler function in which i declare a new movieclip() class referece inside of it, however; when I try to access the reference from another function it tells me its undefined. If I declare the reference outside of the function everything works fine though. Why does it do this and how can I fix it?
EDIT: I figured out that if I just make an array and store my movieclips in tehre that it doesnt matter which funciton I create them in. I guess that is the problem but I am still curious as to why this happens.