SitePoint Sponsor

User Tag List

Results 1 to 2 of 2

Hybrid View

  1. #1
    SitePoint Zealot
    Join Date
    Sep 2006
    Posts
    145
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Restart Flash animation with Javascript

    Does anyone know if there's a way to restart (or reload?) a Flash animation with Javascript?

    Rich

  2. #2
    runat="server" Golgotha's Avatar
    Join Date
    Nov 2001
    Location
    Colorado
    Posts
    2,085
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    explore ExternalInterface. That will do it...

    ActionScript looks like this:
    Code:
    /////////////////////////////////////////////////////////////////////
    // JavaScript calls this function via ExternalInterface
    /////////////////////////////////////////////////////////////////////
    import flash.external.*;
    ExternalInterface.addCallback("loadAdNow", this, loadAd);
    function loadAd(fromjavascript:String) {
        var imgPath:String = "http://localhost/Extanse/InStoreKioskWeb/flashkiosk/imageresponse.aspx?Type=7&AdID="+ fromjavascript;
        debugger.text = imgPath;
        image_mcl.loadClip( imgPath, imageHolder );
    }


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •