10 Replies Latest reply on Oct 17, 2008 3:02 AM by Peter Lorent

    Use a swf as a button?

    cdub Level 1
      I'm trying to load a swf using SWFLoader and then use it as a button. I can't seem to get it to fire off any events, such as mouse over. Here's what I did:

      <mx:SWFLoader id="home" source="../home.swf"/>

      then use:
      home.addEventListener(MouseEvent.MOUSE_OVER, overHandler); (in the initApp function) to execute this function:

      private function overHandler(event:MouseEvent):void
      {
      theLabel.text="over the button";
      }

      And nothing happens.

      but if I use: <mx:LinkButton id="home" label="HOME" /> it works just fine.

      What do I need to do to make my swf fire off the function?