Skip to main content
Inspiring
October 18, 2008
Question

ReferenceError: Error #1065

  • October 18, 2008
  • 4 replies
  • 779 views
I have been working on changing code from as2 to as3 to scroll my movie clip based on the location of my mouse. I have gotten all of the compiler errors to go away, but I have been getting ReferenceError: Error #1065: Variable resizeHandler is not defined. The line that I am getting the error from is:

stage.addEventListener(contentClip.RESIZE,resizeHandler);

I am thinking it doesn't like contentClip (which is the instance name for the movie clip I want to scroll. Let me know if you see anything else that might not work for as3.
This topic has been closed for replies.

4 replies

Itasca123Author
Inspiring
October 19, 2008
Sorry for the confusion. I am new with Flash and just try things to see if they work and hope I get lucky. I had tried the resizeHandler() without knowing what it really means or where it is. There isn't any resizeHandler in the library or stage of my file. I had seen addEventListener in some other forums, but hadn't been able to figure out how to apply it to my code. Are there any ideas on how to effectively apply addEventListener to the code?
kglad
Community Expert
Community Expert
October 19, 2008
you're confused. try:

kglad
Community Expert
Community Expert
October 19, 2008
you're going to be more confused if you substitute one problem for another and fail to solve any of them.

addListener is as2 code. use addEventListener in as3.

and that doesn't help solve the problem: where is resizeHandler().

HINT: that's THE problem. you don't have a resizeHandler() defined and you need to define one.
Itasca123Author
Inspiring
October 18, 2008
That line of code was taken from another forum that I had read. The original as2 code that I need to update for as3 is:

Stage.addListener(myListener);

The error that I had received when I used that was:
TypeError: Error #1006: addListener is not a function.

Anys ideas on how to make that line of code work for as3?
kglad
Community Expert
Community Expert
October 18, 2008
where's resizeHandler()?