Skip to main content
Participating Frequently
March 3, 2009
Answered

CS3 - CS4 Migration, ReferenceError: Error #1065:

  • March 3, 2009
  • 6 replies
  • 1417 views
Hi! I have been trying to migrate a CS3 based Flash project to the new CS4 IDE for some days, but it has been impossible. All the conponents of the library throw the same error at building time:

ReferenceError: Error #1065: Variable <Class> is not defined.

I have changed the name of all clases with the same name as the package,
I have also changed the name of the main class,
I have created a new empty .fla to copy and paste all the elements of the library,
BUT I DO NOT STILL GET TO SOLVE THE PROBLEM.

I have tried all solutions I have found on the Internet, but the error is still there. Could you please tell me what I am doing wrong? I would be very grateful if you could help me! thanks.
This topic has been closed for replies.
Correct answer kglad
hopefully you have no code on the timelines of any of your library objects. if that's that case:

create a new fla in cs4.

copy your library objects from your cs3 fla and paste them into the library of your cs4 fla and publish. are there any error messages?

if yes, delete about 1/2 the library objects and repeat until you narrow the problem to as few library objects as possible. ideally one library object will cause the error message. save that cs4 fla and post a link here.

if there are no error messages, the problem is not caused solely by library objects.

6 replies

kglad
Community Expert
Community Expert
March 5, 2009
you're welcome.
kglad
Community Expert
kgladCommunity ExpertCorrect answer
Community Expert
March 4, 2009
hopefully you have no code on the timelines of any of your library objects. if that's that case:

create a new fla in cs4.

copy your library objects from your cs3 fla and paste them into the library of your cs4 fla and publish. are there any error messages?

if yes, delete about 1/2 the library objects and repeat until you narrow the problem to as few library objects as possible. ideally one library object will cause the error message. save that cs4 fla and post a link here.

if there are no error messages, the problem is not caused solely by library objects.
ognzAuthor
Participating Frequently
March 5, 2009
Hi kglad! thanks again for your reply! I found the error and I solved the problem.I followed your steps, and there were no library errors when I copied all library elements into the new fla file. However, I tested the components one by one as you did, and ..... the problem was caused by GoogleMapsLibrary component!! It was an old version of the component. I updated it today, and all works fine now!! incredible! Thank you very much for your attention kglad!
kglad
Community Expert
Community Expert
March 4, 2009
does your project work in cs3 when publishing for as3 and fail in cs4 when publishing for as3?
ognzAuthor
Participating Frequently
March 4, 2009
Yeah! that's the problem! In CS3 it worked fine using as3 configuration, and fails in CS4. this is very exasperating!Thanks!
kglad
Community Expert
Community Expert
March 3, 2009
so you're trying to convert an as2 project to an as3 project, correct?

if so, among other things, you'll need to declare all your variables. in as2, the following is ok

num=2;

but it's not ok in as3. you need to declare the variable no later than the first time it's used:

var num:Number=2;
ognzAuthor
Participating Frequently
March 4, 2009
Thanks for your reply kglad, but is not entirely correct. The code of the .as files is AS3, but some library elements were programmed in AS2. I did some tests yesterday and I can discard problems like missed "var". I think the problem is in the library elements. I don't understand what I'm doing wrong. In many forums, the people report a lot of problems with CS3 -> CS4 migrations, it can be a bug in CS4?(the project works fine in CS3) Any idea? Thank you very much!

(Downgrade to CS3 is not an option, I need the new graphic acceleration features of the CS4 (FP10) in my project).

kglad
Community Expert
Community Expert
March 3, 2009
that doesn't make sense.

if your publish settings are for as3, the only components available are as3 components.

unless you opened an fla that had as2 publish settings and dragged components from that as2 panel into your as3 project or you changed publish settings after after some components, you shouldn't be able to add the wrong components to your project.
ognzAuthor
Participating Frequently
March 3, 2009
Ups, I think we have a misunderstanding, sorry. When I talk about components, I refer to library elements I add, not to predefined AS3 components. Thanks for your patient!
kglad
Community Expert
Community Expert
March 3, 2009
do your cs3 and cs4 projects use different actionscript versions? ie, what are the as versions of the cs3 and the cs4 projects.
ognzAuthor
Participating Frequently
March 3, 2009
Hi, I used the AS3 compiler in CS3, but components used AS2. when migrating, some errors related to that code appeared. Anyway, these were solved (problems with evets), and now the code of the library components is compatible with AS3 (I think so, there are no compiling errors). The buttons only contain code like stop();
Any idea? thanks!!!