Skip navigation
Currently Being Moderated

Error #1065 Every Time Event Listener Is Added

Dec 27, 2011 2:50 PM

Tags: #error #as3 #actionscript #as3.0

Hi,

 

I am new to flash and having playing around to figure out what I can on my own, but this problem is really bugging me and I can't seem to solve it. I am trying to make an animation with three seperate buttons that when clicked on make one set of text disappear and new text appear in its place. My code so far looks like this:

 

stop();

 

 

//---Bio Button Text---\\

 

 

go.addEventListener (MouseEvent.CLCIK, bioplay);

function bioplay event:MouseEvent) :void {

 

}

 

Everything plays fine until I add the "go.addEventListener (MouseEvent.CLCIK, bioplay);     function bioplay event:MouseEvent) :void {          }." When this bit of code is added I get the error message:

 

ReferenceError: Error #1065: Variable TCMText is not defined.

 

I don't know what this means and I can"t seem to figure it out on my own so any help would be much appreciated.

 

Thanks,

Nick

 
Replies
  • Currently Being Moderated
    Dec 27, 2011 3:25 PM   in reply to NichB4411

    You have a couple of typos. The event CLICK is misspelled and you are missing an opening paren before event:

     

    Your code might work if it looks like this:

     

    go.addEventListener (MouseEvent.CLICK, bioplay);

    function bioplay (event:MouseEvent) :void {

     

    }

     
    |
    Mark as:
  • Currently Being Moderated
    Dec 28, 2011 6:12 AM   in reply to NichB4411

    Change TLFTextFields to normal TextFields

     

    --

    Kenneth Kawamoto

    http://www.materiaprima.co.uk/

     
    |
    Mark as:
  • Currently Being Moderated
    Dec 28, 2011 7:30 AM   in reply to NichB4411

    It depends on what you're doing with your text fields... anyway the error you're getting is TLFTextField related, hence my post.

     

    --

    Kenneth Kawamoto

    http://www.materiaprima.co.uk/

     
    |
    Mark as:
  • Currently Being Moderated
    Dec 28, 2011 1:05 PM   in reply to kennethkawamoto2

    Those two typos that I showed to you are critical to your code working. You've specified a mouse event in your listener, there is no CLCIK event, so Flash will throw an error. Additionally, that missing opening parenthesis will cause Flash to throw an error. The Error #1065 may be erroneous and may be the best that Flash can give you based on the two typos that I listed.

     

    There may indeed be a problem with a TLFText field in your movie, but if you don't fix everything, including the Actionscript, you'll never know. A simple solution is to comment out the code and see if you still get an error.

     
    |
    Mark as:
  • Currently Being Moderated
    Dec 28, 2011 3:14 PM   in reply to NichB4411
     
    |
    Mark as:
  • Currently Being Moderated
    Dec 29, 2011 4:41 AM   in reply to NichB4411

    I don't know how much code you have. The best next step is to uncomment the code one section at a time until you find the part that is throwing the error. Then you can dig into that chunk of code to find the problem.

     
    |
    Mark as:
  • Currently Being Moderated
    Dec 29, 2011 7:22 AM   in reply to NichB4411

    If you fixed those two typos and you are still getting an error, then the only thing left is to find out if the object "go" in available in the same frame as the code. Your function has nothing in it so there's nothing there to cause an error.

     

    If your code is in frame 1, then you need to have the object with the instance name of "go" also in frame 1, for instance.

     
    |
    Mark as:
  • Currently Being Moderated
    Dec 30, 2011 11:24 AM   in reply to NichB4411

    The code that you show in the first message doesn't really do anything. The body of the function is empty. I have seen this error message about TLFText fields many times. If you place a TLFTextField on the stage and don't set it up correctly, in this case by not giving the object an instance name, you will get this error. Even if you change the existing text field to a classic text field, the error can persist.

     

    You may need to either start over with a fresh new movie, or, delete all of the existing text fields in the movie and place new text fields.

     
    |
    Mark as:
  • Currently Being Moderated
    Dec 30, 2011 4:42 PM   in reply to NichB4411

    Can you put your movie .fla file up on a server so that I can take a look at it?

     
    |
    Mark as:
  • Currently Being Moderated
    Dec 30, 2011 6:30 PM   in reply to NichB4411

    Try embedding your font, this seems like a problem I once had.

     
    |
    Mark as:
  • Currently Being Moderated
    Jan 2, 2012 7:22 AM   in reply to NichB4411

    Take your original .fla file and zip it. Then upload it to your server and post the link. If your textfields are input or dynamic then there is an option to embed the font that you select for your text. Just click on the embed button next to the font selection in the Properties window.

     
    |
    Mark as:
  • Currently Being Moderated
    Jan 2, 2012 11:35 AM   in reply to NichB4411

    The title NICK BREITWIESER, BIOGRAPHY, CONTACT, GOAL are all TLFTextFields. All of the characters in  NICH B DESIGNS are all still TLFTextFields.

     

    One of the problems is that you made all of the animations out of many, many, keyframes. Since you didn't use movieClips in a lot of those animations, each of the objects in each of those keyframes is unique. This means that you have to go into each keyframe and change the textField from TLF to classic.

     

    You will be far ahead if you just throw this movie away and start over with a fresh new movie using Classic text.

     
    |
    Mark as:
  • Currently Being Moderated
    Jan 2, 2012 6:38 PM   in reply to NichB4411

    Yes, you should be able to copy the line animation over to the new movie.

     
    |
    Mark as:
  • Currently Being Moderated
    Jan 8, 2012 4:26 PM   in reply to NichB4411

    Sounds like you got it fixed, but for future reference, to embed a font: Open up the properties panel for your text box. Under the "Character" tab, there is a button next to "Style". If you click on that button, Flash pops up a window, there you can select the font you want. The font that was previously selected is default. There are several checkboxes, check only the ones you will be using in your application. It then shows up in your library, done!

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points