Results 1 to 5 of 5

Thread: Xul + Swf

  1. #1
    Join Date
    Jun 2008
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Xul + Swf

    hi, how detect end of *.swf files?
    test.xul
    <?xml version="1.0"?>
    <?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
    <window
    title="Test"
    xmlns:html="http://www.w3.org/1999/xhtml"
    xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
    style="width:750px;height:550px;margin:0px;padding:0px;">
    <html:embed
    src="test.swf"
    width="750"
    height="550"
    loop="false"
    play="true"
    swLiveConnect="true"
    allowScriptAccess="sameDomain"
    />
    </window>

  2. #2
    Join Date
    Mar 2007
    Location
    Currently: New York/Philadelphia
    Posts
    2,735
    Thanks
    3
    Thanked 519 Times in 507 Posts

    Default

    What do you mean by the end of the .swf? Is it an animation and you want to know when it's done playing?

    Well, you could use the External API to send a javascript command to the page. I don't know if there are any XUL implications here, I haven't ever used XUL.

  3. #3
    Join Date
    Jun 2008
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    hi,
    yes its animation i would like to know how to detect when is done, or duration time.
    thx

  4. #4
    Join Date
    Mar 2007
    Location
    Currently: New York/Philadelphia
    Posts
    2,735
    Thanks
    3
    Thanked 519 Times in 507 Posts

    Default

    Quote Originally Posted by figipoll View Post
    hi,
    yes its animation i would like to know how to detect when is done, or duration time.
    thx
    Right...
    Like I said you would need to use the External API to send a javascript call on the last frame of the movie.

    If your movie is going to have a static length (i.e. you know the length ahead of time), you can figure out the length by dividing the number of frames in your .fla by the frame rate. But beware that this length will not take into account the loading time.

  5. #5
    Join Date
    Jun 2008
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    thx for help
    i couldnt get to swf file propertes. ifind this and its works

    swf=document.getElementById("flashapp");
    var a = swf.TGetProperty('/', 5); // max num frames

    before i tried just swf.GetProperty -- not in XUL

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
  •