all groups > flash actionscript > july 2004 >
You're in the

flash actionscript

group:

Bug ???


Bug ??? ShimiGates
7/31/2004 1:04:42 PM
flash actionscript:
I built a class for my project and i needed to use the dynamic keyword for this
class
i forgot to put it (im so idiot lol) and kept with the work on the project
and used a variable that aint decleared on the class
and i didnt got any error
(i created the variable on the class not on the instance)
if i tryed to create on the instance then i get an error

example:

//Class file
class myClass {
function myClass() { }
}

//Fla file
var cls:myClass = new myClass();
myClass.testvar = "Test"; // no error here
cls.testvar2 = "Test2"; // ERROR
Re: Bug ??? wadearnold
7/31/2004 5:56:22 PM
There is no variable for testvar or testvar2 in your class. You must define the
variables inside the class. The only way around this is to make a dynamic
class. A little about dynamic classes can be found at the below link to the
live docs.

http://livedocs.macromedia.com/flash/mx2004/main_7_2/00001065.html

This may be more of a work around of your problem rather than the best
solution. Hope that this helps!
Wade

Re: Bug ??? ShimiGates
8/1/2004 11:00:45 AM
I knew what the problem is and i knew it cuz the class aint dynamic
AddThis Social Bookmark Button