1 Reply Latest reply on Dec 19, 2008 3:07 PM by chopTheWood

    calling actionscript from within hyperlinks

    gigasaurus Level 1
      I have an application which currently loads a long html list (of names) into a scrollable textfield. The client now wants these names to be clickable, and onClick he wants me to jump to a new frame and display data for the specific name that was clicked. Its a lot of work for me to move to a new mechanism, so I'd like to add hyperlinks within the html that make calls to flash. Could someone please help me figure out the syntax for doing this?

      I'm going to make up fake syntax, but I am basically looking for something like this:

      <a href="FlashCall: gotoAndStop(2); selected=John">John</a><br />
      <a href="FlashCall: gotoAndStop(2); selected=Jane">Jane</a>

      Or the syntax may have to be in the form of calling a function with arguments.

      Thankyou
        • 1. Re: calling actionscript from within hyperlinks
          chopTheWood Level 1
          You can look more into the asfunction in Flash help

          asfunction protocol

          asfunction:function:Function, parameter:String

          A special protocol for URLs in HTML text fields that allows an HREF link to call an ActionScript function. In HTML text fields, you can create links using the HTML A tag. The HREF attribute of the A tag contains a URL that uses a standard protocol such as HTTP, HTTPS, or FTP. The asfunction protocol is an additional protocol that is specific to Flash, which causes the link to invoke an ActionScript function.