I found the mistake. I set the id in linkage properties to
"SectionButton" and the base class to
"de.formDivision.fdCD.view.slidePlayer.SectionButton" as well. If I
change the id to "SectionButton1" it compiles fine.
Thanks for your help everybody!
Robin
On 01/02/2008, at 3:41 PM, Juan Pablo Califano wrote:
the code works fine for me...
I just added the package declaration
package {
import SectionButton;
public class SomeClass
{
public function SomeClass()
{
trace (SectionButton.ON_PRESS)
}
}
}
package {
import flash.display.MovieClip;
public class SectionButton extends MovieClip
{
// events
public static const ON_PRESS:String = "onPress";
}
}
It compiles without errors and traces "onPress".
Cheers
Juan Pablo Califano
2008/2/1, Robin Burrer <[EMAIL PROTECTED]>:
Hi All,
I want do declare a constant in a class that extends the Movieclip
class.
That all works fine in Flexbuilder:
public class SectionButton extends MovieClip
{
// events
public static const ON_PRESS:String = "onPress";
}
Referring to this constant from another class seems o be fine as
well
(Felxbuilder does not give me a syntax error.):
import SectionButton;
public class SomeClass
{
public function SomeClass()
{
trace (SectionButton.ON_PRESS)
}
}
But if I try to compile my fla file in Flash CS 3 I get the following
error Message:
1119: Access of possibly undefined property ON_PRESS through a
reference with static type Class.
Any Ideas?
Robin
_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders