A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: Detect via javascript if swf is done playing

Hybrid View

  1. #1
    Member
    Join Date
    Apr 2000
    Posts
    74
    Anyone know how to detect (via javascript) if a swf file is done playing or is at the last frame? I need to run a javascript function once a swf is done playing and I don't have control of the authoring of the flash file. Because I don't have access to the flash source file I can't put code in the swf to pass to the javascript.

    I thought about loading the swf inside my own swf, but the files I need to do the detect on will be on another domain, so I can't load the swf in my file since they are not on the same domain. As I've found the file will not display if I call it outside the domain.

    If no one knows how to detect the status via javascript,
    has anybody found a way around the seperate domain issue?

    Thanks in advance,
    Hyper

  2. #2
    Registered User
    Join Date
    Feb 2001
    Posts
    13,039
    Hi,

    according to macromedia security docs, loading a swf from another domain inside your swf should still work with the new player, but actionscripts inside your movie should not be able to access variables on the loaded movie.

    What about changing the swf? Sure, you dont have access to the fla files... but if your server can load them from the other domain, and they dont rely on loading vars from that domain, a server script could add code to the very last frame

    Musicman

  3. #3
    Angkor-What? Gekke_Hollander's Avatar
    Join Date
    Jun 2000
    Location
    Netherlands
    Posts
    234
    http://www.webreference.com/js/tips/....html?cat=0106

    Maybe you can find a thing here

    Cheers,
    Gekke_Hollander

Posting Permissions

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




Click Here to Expand Forum to Full Width

HTML5 Development Center