• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

ReferenceError: Error #1065

Explorer ,
Oct 18, 2008 Oct 18, 2008

Copy link to clipboard

Copied

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.
TOPICS
ActionScript

Views

695

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Oct 18, 2008 Oct 18, 2008

Copy link to clipboard

Copied

where's resizeHandler()?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Oct 18, 2008 Oct 18, 2008

Copy link to clipboard

Copied

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?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Oct 18, 2008 Oct 18, 2008

Copy link to clipboard

Copied

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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Oct 18, 2008 Oct 18, 2008

Copy link to clipboard

Copied

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?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Oct 19, 2008 Oct 19, 2008

Copy link to clipboard

Copied

LATEST
you're confused. try:

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines