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

Error #1065 Every Time Event Listener Is Added

New Here ,
Dec 27, 2011 Dec 27, 2011

Copy link to clipboard

Copied

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

TOPICS
ActionScript

Views

6.1K

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
LEGEND ,
Dec 27, 2011 Dec 27, 2011

Copy link to clipboard

Copied

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 {

}

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
New Here ,
Dec 27, 2011 Dec 27, 2011

Copy link to clipboard

Copied

I'm sure that will help later on, but I'm still getting the same exact error message.

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 ,
Dec 28, 2011 Dec 28, 2011

Copy link to clipboard

Copied

Change TLFTextFields to normal TextFields

--

Kenneth Kawamoto

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

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
New Here ,
Dec 28, 2011 Dec 28, 2011

Copy link to clipboard

Copied

I just tried that, and the change is making some of my text invisible and other text change sizes and move. Is there any way to stop that from happening so I can try to preview the animation?

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 ,
Dec 28, 2011 Dec 28, 2011

Copy link to clipboard

Copied

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/

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
LEGEND ,
Dec 28, 2011 Dec 28, 2011

Copy link to clipboard

Copied

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.

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
New Here ,
Dec 28, 2011 Dec 28, 2011

Copy link to clipboard

Copied

I fixed those typos earlier today and was still ggetting the same error so those did not fix everything. I'm going to change all of the TLFText. To see If that fixes it, but seeing as most of the animation is text it is going to take some time. What do you mean by comment out 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
LEGEND ,
Dec 28, 2011 Dec 28, 2011

Copy link to clipboard

Copied

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
New Here ,
Dec 28, 2011 Dec 28, 2011

Copy link to clipboard

Copied

Ok I went back through and changed al of my text fields to classic text and I am still recieving the error. I also tried commenting all of the code like you suggested and the error went away.

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
LEGEND ,
Dec 29, 2011 Dec 29, 2011

Copy link to clipboard

Copied

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.

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
New Here ,
Dec 29, 2011 Dec 29, 2011

Copy link to clipboard

Copied

I posted all of my code in the original question. The stop(); has not errors in it. I went through and split the rest of the code into commented sections by lines and all three sections, including the }, gave me the same error.

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
LEGEND ,
Dec 29, 2011 Dec 29, 2011

Copy link to clipboard

Copied

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.

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
New Here ,
Dec 30, 2011 Dec 30, 2011

Copy link to clipboard

Copied

I moved the actionscript to the same layer as the button which I want to cause the animation to go to the specified frame and play, and I am still getting the same error message. My text is all still set to classic and those two typos are fixed. I am wondering no if I am realy using the right code for what I want to do. I want this button to cause the animation to go to a specified frame, then play a few frames, and stop on a specified frame. Is this the right code to do this?

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
LEGEND ,
Dec 30, 2011 Dec 30, 2011

Copy link to clipboard

Copied

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.

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
New Here ,
Dec 30, 2011 Dec 30, 2011

Copy link to clipboard

Copied

Do you know what my code would have to be to do this? All of my text objects have instance names.

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
LEGEND ,
Dec 30, 2011 Dec 30, 2011

Copy link to clipboard

Copied

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

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
New Here ,
Jan 01, 2012 Jan 01, 2012

Copy link to clipboard

Copied

Rob, I would be glad to if I knew how. I can post the .swf on a website if that is any help. A.Liebscher, I don't know how to do that either, but if you can tell me how I will definitely 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
LEGEND ,
Jan 02, 2012 Jan 02, 2012

Copy link to clipboard

Copied

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.

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
New Here ,
Jan 02, 2012 Jan 02, 2012

Copy link to clipboard

Copied

Ok I tried embedding my text and that did not solve the error so I have linked the .zip file to www.nichbdesigns.com. The .fla file that is in the .zip is the original file with embedded TLF text and the lines of code that are being problematic commented out so you can see what I want the animation to do in the beginning. The bad code is on the layer with the biography button.

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
LEGEND ,
Jan 02, 2012 Jan 02, 2012

Copy link to clipboard

Copied

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.

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
New Here ,
Jan 02, 2012 Jan 02, 2012

Copy link to clipboard

Copied

Alright, I will restart and use only classic text, and let you know how that works.

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
New Here ,
Jan 02, 2012 Jan 02, 2012

Copy link to clipboard

Copied

When I re-create the animation is it ok if I copy some of the lines from the old .fla file to the new one? I will still start fresh on all of the text fields, but it will save me a bunch of time if I can just copy the rest over from the original animation.

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
LEGEND ,
Jan 02, 2012 Jan 02, 2012

Copy link to clipboard

Copied

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

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
New Here ,
Jan 06, 2012 Jan 06, 2012

Copy link to clipboard

Copied

Ok, I finally had time to finish re-making the animation. The scene is complete and redesigned a little, but it still has the same basic concept. Now I just need to write the actionscript to make a white screen fade in and then text to fade in on top of that when each of the buttons is clicked. Can somebody help me with this?

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