Aaron
Aaron

Reputation: 541

Any reason editing an ActionScript 3 file in Flash wouldn't actually edit it?

For the life of me, no matter how I edit this ActionScript 3 file (Main.as) it doesn't actually change anything. It's linked to my Flash document as "Main" class. Everything works just fine, but I have to change one line of code, but it always runs at the original code I saved it at, even if I changed something and save it.

Is there any reason this could be possible? I've even tried just deleting the Main.as file and everything still works, so it seems as if it's embedded in Flash, but I can't find it!

If anybody knows if/why this would happen, any help would be great, because this is a true head banger for me. Thanks!

Aaron

Upvotes: 3

Views: 575

Answers (4)

crooksy88
crooksy88

Reputation: 3851

I've experienced this before.

Just make sure if that if you have the class referenced as Main.as, Main.as is sat right next to your .fla file.

Or, if Main.as is within a sub directory such as com, make sure the base class is referenced as com.Main within your .fla's property panel.

If that still doesn't work I would change the class name in the .fla properties panel to Main2, click the pencil button to create a new .as file, then immediately save the file right next to your .fla file. This should create the linkage correctly and you can then copy/paste your original AS3 into your new Main2.as file.

Upvotes: 1

spender
spender

Reputation: 120380

I don't know if it still applies to AS3 compilation but you could try clearing your ASO file:

http://help.adobe.com/en_US/AS2LCR/Flash_10.0/help.html?content=00000187.html

Upvotes: 2

Emin A. Alekperov
Emin A. Alekperov

Reputation: 1067

It is matter how you editing your Main.as. If you open file for editing by clicking on the button with a pencil near the Class textfield, you will open a really linked file. If you edit your Main.as by a third-party editor, it is possible that you edit a wrong file. Look at paths in the "ActionScript Settings...". Maybe you have another Main.as.

Upvotes: 0

Cornel Ghiban
Cornel Ghiban

Reputation: 902

You probably edit the wrong AS3 file. Check the classpath of the flash movie. I don't have a Flash handy, but this guy tells you how to set/change the classpath.

Upvotes: 2

Related Questions