Packagecom.pcthomatos.swfseo.swfResources
Classpublic class SWFSEONavBtnEvent

The SWFSEONavBtnEvent class contains all the Event Types to be used be used in each of your navigation button swfs.

The parent of the navigation button swf controls the dispatch of these Events to the navigation button swf.

*Note: Do not use standard Event Types like: MouseEvent.MOUSE_OVER, because they will conflict with the parent.


Example
This code would be included in the first frame of your navigation button swf. Alternatively, this code can be placed inside a document class.
        import com.pcthomatos.swfseo.swfResources.SWFSEONavBtnEvent;

        // ###################################################################
        // below is the standard way to activate all the mouse state listeners
        addEventListener(SWFSEONavBtnEvent.BTN_READY, setParentListeners_Listener);

        function setParentListeners_Listener(e:Event):void{
            removeEventListener(SWFSEONavBtnEvent.BTN_READY, setParentListeners_Listener);
            addEventListener(SWFSEONavBtnEvent.BTN_ON, btnOn_Listener);
            addEventListener(SWFSEONavBtnEvent.BTN_OFF, btnOff_Listener);
            addEventListener(SWFSEONavBtnEvent.BTN_OVER, btnOver_Listener);
            addEventListener(SWFSEONavBtnEvent.BTN_OUT, btnOut_Listener);

            setButtonText();
            gotoAndPlay("mouseoff");
        }

        function setButtonText():void{
            var buttonText:String = (parent as Object).btnText;

            var navText:TextField = new TextField();
                navText.autoSize = TextFieldAutoSize.CENTER;
                navText.defaultTextFormat = new TextFormat("Helvetica", 35);
                navText.text = buttonText;
                navText.embedFonts = true;
                navText.mouseEnabled = false;

            addChild(navText);
        }

        function btnOn_Listener(e:MouseEvent):void{
            gotoAndStop("mouseon");
            e.updateAfterEvent();
        }

        function btnOff_Listener(e:MouseEvent):void{
            gotoAndPlay("mouseoff");
            e.updateAfterEvent();
        }

        function btnOver_Listener(e:MouseEvent):void{
            gotoAndPlay("mouseovr");
            e.updateAfterEvent();
        }

        function btnOut_Listener(e:MouseEvent):void{
            gotoAndPlay("mouseoff");
            e.updateAfterEvent();

        }
        stop();
        



Public Constants
 ConstantDefined by
  BTN_OFF : String = "navBtnOff"
[static] The SWFSEONavBtnEvent.BTN_OFF constant defines the value of the type property of the event object for a navBtnOff event.

Once this Event is dispatched you can display the off state in your navigation button swf.
SWFSEONavBtnEvent
  BTN_ON : String = "navBtnOn"
[static] The SWFSEONavBtnEvent.BTN_ON constant defines the value of the type property of the event object for a navBtnOn event.

Once this Event is dispatched you can display the on state in your navigation button swf.
SWFSEONavBtnEvent
  BTN_OUT : String = "navBtnOut"
[static] The SWFSEONavBtnEvent.BTN_OUT constant defines the value of the type property of the event object for a navBtnOut event.

Once this Event is dispatched you can display the off state in your navigation button swf.
SWFSEONavBtnEvent
  BTN_OVER : String = "navBtnOver"
[static] The SWFSEONavBtnEvent.BTN_OVER constant defines the value of the type property of the event object for a navBtnOver event.

Once this Event is dispatched you can display the over state in your navigation button swf.
SWFSEONavBtnEvent
  BTN_READY : String = "navBtnReady"
[static] The SWFSEONavBtnEvent.BTN_READY constant defines the value of the type property of the event object for a navBtnReady event.

Once this Event is dispatched your navigation button swf can:
  • Access the parent for the btnText property which contains the button text included in the <ol><li> tag on the html page relevant to this navigation button swf.
  • Mouse state listeners can be added.
SWFSEONavBtnEvent
Constant detail
BTN_OFFconstant
public static const BTN_OFF:String = "navBtnOff"

The SWFSEONavBtnEvent.BTN_OFF constant defines the value of the type property of the event object for a navBtnOff event.

Once this Event is dispatched you can display the off state in your navigation button swf.

See also

BTN_ONconstant 
public static const BTN_ON:String = "navBtnOn"

The SWFSEONavBtnEvent.BTN_ON constant defines the value of the type property of the event object for a navBtnOn event.

Once this Event is dispatched you can display the on state in your navigation button swf.

See also

BTN_OUTconstant 
public static const BTN_OUT:String = "navBtnOut"

The SWFSEONavBtnEvent.BTN_OUT constant defines the value of the type property of the event object for a navBtnOut event.

Once this Event is dispatched you can display the off state in your navigation button swf.

See also

BTN_OVERconstant 
public static const BTN_OVER:String = "navBtnOver"

The SWFSEONavBtnEvent.BTN_OVER constant defines the value of the type property of the event object for a navBtnOver event.

Once this Event is dispatched you can display the over state in your navigation button swf.

See also

BTN_READYconstant 
public static const BTN_READY:String = "navBtnReady"

The SWFSEONavBtnEvent.BTN_READY constant defines the value of the type property of the event object for a navBtnReady event.

Once this Event is dispatched your navigation button swf can:

See also