Groups | Blog | Home
all groups > flash actionscript > august 2005 >

flash actionscript : 'new' and obj.attachMovie() not returning references!! WHY?


ivanko_98
8/15/2005 9:30:57 PM
Has anyone run into a 'new' operator or obj.attachMovie() not returning a
reference, even though the object is successfully created? I can see the MC on
the screen, or the effects of the object, and yet the vars into which I stored
the references are tracing as 'null' (which is the value to which I initialized
them)
Any help would really be appreciated since the whole project is in a full-stop
right now because of this, and I can?t figure it out why it?s happening. The
worst thing is that the code was working until it just stopped functioning,
don?t know why, at the time I was working on a completely separate module from
the one that?s causing problems.

I would really appreciate it if someone even suggested something.
Thank you

Rothrock
8/15/2005 10:33:34 PM
On line 37 you've got a typo.





You are going to have to give us an example of your code. Also I don't see
attachMovie being a method of the object class so I'm not sure. And isn't new a
constructor, not an operator. It could also be a scoping problems.
digital_monkey
8/15/2005 10:42:04 PM
Hi,

If you're saying it used to work and now it doesn't, it might be some new
piece of code that you haven't even thought could cause the problem. Try
commenting out large portions of unrelated code and see what works and what
doensn't. Also, try using the debugger to get lists of variables both before
and after the movies are loaded (use breakpoints in the code).

Hope this helps.

AddThis Social Bookmark Button