Keith Salisbury
>
> Slightly confused....
>
> I have a super class:
>
> package com.ktec.timeline
> {
> protected var labelClass:String = "default";
> public class AbstractMarker {
> public function AbstractMarker ()
> {
> labelClass = "default";
> }
> public function showTitle (title:String):void
> {
> trace("<span class=\"" + labelClass + "\"> + title + "</span>")
> }
> }
> }
>
> and a subclass:
>
> package com.ktec.timeline
> {
> public class DateMarker extends AbstractMarker
> {
> public function DateMarker ()
> {
> super();
> labelClass = "date"
> }
> }
> }
>
>
> Then i use:
>
> var marker:DateMarker = new DateMarker()
>
> marker.showTitle("hello world") # <span class="default">hello
world</span>
>
>
> This isnt what i would expect?
>
> Can anyone enlighten me where i'm going wrong?
>
> thanks
> keith
Hi Keith,
Little question: what r u working under: Flash 9 Beta or Flex 2? I
wonder your code even compiled. Move this line:
protected var labelClass:String = "default";
inside your class definition. It's outside the scope of the class. I
tried it out, worked fine for me.
Cheers,
Petro
_______________________________________________
[email protected]
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com