How to detect end of flash movie (SWF file) in Javascript

I have used Dreamweaver CS4 to integrate my SWF file as shown
below. So far so good. See GoToNext()
my website
What I wouldd like to do is have the SWF movie trigger a
javascript function in my html page when the video is stopped
playing (i.e. when it is finished) There are no controlls in that
SWF file - it is basically am add banner. I would think this would
be easiest done by rasinng an event in SWF that is communicated to
javascript, where I can add an event listener, and thus trigger my
function.
How can this be done in the simplest way?
<div id="bodyFlash"
class="clearfloat"><p> </p>
<object
classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="760"
height="150" id="FlashID" title="Chillifire Banner">
<param name="movie" value="flash/chillifire.swf" />
<param name="quality" value="high" />
<param name="wmode" value="transparent" />
<param name="swfversion" value="6.0.65.0" />
<!-- This param tag prompts users with Flash Player 6.0
r65 and higher to download the latest version of Flash Player.
Delete it if you don’t want users to see the prompt. -->
<param name="expressinstall"
value="Scripts/expressInstall.swf" />
<!-- Next object tag is for non-IE browsers. So hide it
from IE using IECC. -->
<!--[if !IE]>-->
<object type="application/x-shockwave-flash"
data="flash/chillifire.swf" width="760" height="150">
<!--<![endif]-->
<param name="quality" value="high" />
<param name="wmode" value="transparent" />
<param name="swfversion" value="6.0.65.0" />
<param name="expressinstall"
value="Scripts/expressInstall.swf" />
<!-- The browser displays the following alternative
content for users with Flash Player 6.0 and older. -->
<div>
<h4>Content on this page requires a newer version of
Adobe Flash Player.</h4>
<p><a href="
http://www.adobe.com/go/getflashplayer"><img
src="
http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif"
alt="Get Adobe Flash player" width="112" height="33"
/></a></p>
</div>
<!--[if !IE]>-->
</object>
<!--<![endif]-->
</object>
</div>
...

on the last frame in the banner file you can use the
ExternalInterface class to call a specific JS method, and even pass
data if needed.

Similar Messages

  • How can I save a Flash or .swf file in AVI format without losing quality?

    How can I save a Flash or .swf file in AVI (or another video) format without losing quality?

    As long as you don't have code in your animation then just hit File->Export->Export Movie, then configure the options.
    Here's an article on exporting sound, images and video. Just skip on down to exporting AVI and it explains the process. The codec is in the Video Compression section. When you click Settings for Video Compression, the codec is in the drop-down at the top. There's various kinds but to get lossless quality AVI you'll have to choose Uncompressed / None for full quality. Again, the file will be huge and you'll need to use another program (like Adobe Media Encoder) or Microsoft Windows Media Encoder, etc, depending on what format you intend to compress it ultimately.
    http://helpx.adobe.com/flash/using/exporting.html#exporting_video_and_sound

  • Playing Flash Movie .swf files in iWeb

    This is my second post. The first was about generally not being able to publish my website in iWeb in Argentina. Discovered it was due to the 12 kilobytes a second upload speed!
    This query is about trying to get a flash movie with .swf extension to play on my homepage in iWeb
    www.edgold.co.uk
    Ive made a flash movie on my girlfriends PC. Why? Because she has Flash installed.
    Ive transferred it to my Mac and it plays with a programme I downloaded called SWF & FLV Player - no problem there. For the love of trying I cant get it to play.
    Ive gone to 'Insert' in iWeb, clicked on Choose and selected the swf file. Ive put it in position on my homepage and published it. Then Ive opened the HTML page thats found in iDisk using TextEdit so that I can change the html to get the flash plug in to play it.
    I found all the details on website by 'Vertical Moon'
    http://www.verticalmoon.com/tutorials/general/iweb/iweb.htm
    Ive followed every step to the letter but where they seem to slip up is that the swf file isnt played by QuickTime. QuickTime on my Mac doesnt want to know! If it was played by QT then I'd have a chance to change the html from 'writeMovie1()' to writeflash1() but there is no sign of that code in the html file let alone having to change it in JavaScript.
    At the end of the day Ive got an swf file (Flash) that I want to stiuck on the front page of my website to play over and over. Ive spent over 18 hours on this non-stop and its time I called it a day.
    Please can someone tell me how to get iWeb to make friends with it!
    Ive looked at lost of other sites about free Video code generating but none of them work!
    Cheers
    Ed
    (Im in Patagonia - documentary photographer...sorting a good site helps me secure sponsorship and future exhibition venues. Your help is appreciated!

    Alancito
    Thanks for replying and the great info on getting a QuickTime to play automatically.
    Please can you continue to help as Im having no luck.
    I will write below briefly whats happening.
    I made a QuickTime in iPhoto as was suggested. I dropped it into iWebs 'Media' button under the 'Movies' tab, in a folder. I then dropped the QT file onto my web home page. It shows with a control bar at the bottom of its window for playing it.
    I published it OK. The live website shows the QuickTime movie BUT you have to click play to start it. So I then I opened the html file in iDisk in TextEdit.
    I tried and tried to find the html code for the QT Movie. I read and re-read the whole html file from top to bottom and found no sign of the QT Movie. Then I went to 'Edit' and 'Find' in TextEdit and typed Movie. It came up with a bit of code which says writeMovie1();
    I guess that this means it is talking about THE movie in question but there is no more code to
    do with 'true' or 'false'. If it said false Id change to true but writeMovie1(); just looks like this:
    <script type="text/javascript"><!--
    writeMovie1();
    --></script>
    stuck almost at the bottom of the html file page.
    Please help...remember Im using iWeb 06
    Thanks...I hope Im close to solving this now. All I want is to play the QT automatically.
    Ed

  • Title for Flash movie (Swf file)

    Hi
    I want to add any title for my flash movie, As we can add any
    title in HTML page with "title tag".
    Usually the file name of flash file show as title like
    "abc.swf"
    but i want here another title like " Welcome to my xyz"
    anything else....
    Can anybody help me getting its solution....
    Alok

    Wishing to do the same thing, I've explored this with Macromedia. It appears to be a licensing problem for the Flash 5 engine. Macromedia wants a commitment of several thousand dollars (like close to 6 figures) to license the engine for an application. That's for a single applicaiton, and not a generic toolkit like JMF. I assume Sun found the same thing and balked, understandably.

  • Right click on flash movie / SWF file

    Why we get flash default menu when i right click on a flash
    movie?.
    When i enable video bookmark (videomark). user is suppose to
    right click on flash movie and select videomark.
    is the flash default menu is customizable?. Please let me
    know.

    Here is a sample script to customize the right-click menu.
    Put it in frame 1 of your movie.
    var myContextMenu = new ContextMenu();
    myContextMenu.hideBuiltInItems();
    var thisTitle:ContextMenuItem = new ContextMenuItem("My
    prison movie", bla);
    var thisCredit:ContextMenuItem = new ContextMenuItem("created
    by Paris Hilton", bla, separatorBefore=true);
    var thisCopyright:ContextMenuItem = new
    ContextMenuItem("© My Intelligence Is Ltd.", bla);
    myContextMenu.customItems.push(thisTitle);
    myContextMenu.customItems.push(thisCredit);
    myContextMenu.customItems.push(thisCopyright);
    function bla() {
    //insert your function here
    this.menu = myContextMenu;
    The function can be anything: getURL, load a movie clip, turn
    sound on/off, etc. You can add as many ContextMenuItems as you
    want. Each one can have a separate function assigned. It seems that
    some sort of function is required by the class, so I use an empty
    function like in this example if I want nothing to happen when the
    user clicks the menu item.

  • How can I save a flash or swf file to flv file?

    I've created a flash banner and I need to send it by email as a flv file. Does any one knows how to convert from swf or fla files to flv?
    Thanks

    Only accept FLVs at 40 KB? Yikes... Well, I'll say this, I never work on ads or banners, etc., so I don't have to deal with such stringent file size parameters. But, when it comes to video, you only have one option to reduce the file size: Compress compress compress.
    You have to choose a very low bit rate (aka data rate) for your FLV video file when you compress the MOV file. And, likely, it's going to make it look pretty crumby... You're going to have to set your data rate down tot he absolute lowest setting.
    Data rate is measure in kbps (kilobits per second), such as 700 kbps (a current, typical data rate for video that is suitable for broadband Internet speeds).
    As an aside, I find it pretty odd that they require a video file, versus a simple, small Flash SWF animation (that's more to do with my banner ad / bandwidth limits un-awareness than anythings, though). It makes your job a little harder and adds seemingly unnecessary steps... They really require that ALL banner animations be video, and not Flash SWF animations? Be sure you know 100% what their specs are, AND also ask to see other banner ad examples so you can see proof that other animations have been given tot hem with the same spec. I just can't belive that a video file is going to be < 40KB...
    Get more familiar with using the Adobe Media Encoder. If you're not that confortable using it, just search online for tutorials about it, which will be easy to find.
    See the attached image. I did a 60 frame (30 fps, total runtime of 2 seconds only) SWF animation of a box animated from the upper-left to the lower right, stage size of 300x200 (per your spec). Simple, basic, nothing crazy. From Flash, I exported the MOV file, and brought this into Adobe Media Encoder CS5. Setting the format of the new video to FLV, and setting the data rate to 5 (crazy low setting). The file size came down to ~ 110 KB.
    Good luck!

  • How can I publish my flash movie in one swf file in V.2

    Hi
    When I publish my movie to flash format , skin swf file is
    segregated from main movie swf file . How can I publish my movie
    only in one swf file ? I want to merge skin and main movie files
    together in one swf file .

    Hi Corona,
    The screen size is whatever you captured or specified during
    the recording or new movie setup process. This will cause the
    playback control to be placed "on top of" some portion of the
    captured background, but there are two ways around that problem.
    1) When you set the red recording area before recording, drag
    the bottom of the recording area downward about 35 pixels below the
    application window (assuming you are capturing an area that
    includes a "bottom" or even an application window - grin). For this
    to work, it is best if you do your recording against a
    solid-one-colored desktop background, so the "extra" area at the
    bottom doesn't include desktop images that you don't want in the
    capture (even though that area will not be visible in the end ...)
    OR...
    2) Use the Project > Resize Project dialog to increase the
    palette size on the bottom, taking care to leave the original movie
    the same size. This will effectively do the same thing as
    Suggestion #1, create a "blank" area at the bottom of the movie on
    which there is room to mount the playback control bar.
    Best of luck, Corona, and omid02. Hope this helps, in
    conjunction with the advice that Rick has already offered.
    .

  • How do I center my flash movie in dreamweaver

    Hi!!
    I currently have a behavior assigned to a slice I made in
    imageready. In dreamweaver I assigned a pop up browser
    window to it...it will be a link to a flash movie(.swf) I
    made, but I don't know how to alter the code to make the browser
    window centered on the screen!! Right now it opens on the top of
    the screen.
    Any help will be greatly appreciated.
    thanks in advance!!

    Thanks Gorka,
    I looked it up and found this useful summary:
    http://probertson.com/articles/2006/12/14/deep-linking-flash-application-states/
    However, I'm now trying to figure out how write the flahs
    vars so it can see what section / folder the page is in so that the
    swf knows to play the same frames for both
    swinsidelodge-hotel.co.uk/pages/hotel/awards.php and
    swinsidelodge-hotel.co.uk/pages/hotel/guest-comments.php. So
    basically it doesn't look at the last bit of the url but the first
    bit... I would like the flash vars to be dynamic so that when the
    client adds a new subpage in one of the sections the swf will still
    know which frames to play.
    Any suggestions?
    Thanks,
    Konrad

  • Embed Animated Flash Objects (*.swf file) in Oracle Forms.

    Hello All,
    To Embed Animated Flash Object (Shockwave *.swf File) in Oracle Forms, Please Follow the Steps Below.
    1. Draw "ActiveX Control" Item on Canvas with the Name "OCXITM".
    2. Select "ActiveX Control" Item & Go to its Properties (By Pressing F4).
    3. Select "ShockwaveFlash.ShockwaveFlash" in "OLE Class" Property of "ActiveX Control" Item.
    4. Come again to the Canvas.
    5. Right Click on "ActiveX Control" Item, Select "Insert Object...".
    6. In Control Type List, Select "Sockwave Flash Object" and Press "OK".
    7. On Canvas, Select "ActiveX Control" Item, Go to "Program" Menu, Select "Import OLE Library Interfaces...".
    8. Select All "Method Package(s)" & "Event Package(s)" for "ShockwaveFlash.ShockwaveFlash.X" & Press "OK".
    9. Go to "Object Nevigator" (By Pressing F3) & Expand "Program Unit" to verify that the Packages are Successfully Imported.
    10. Compile All the Objects (By Pressing "Ctrl+Shift+K").
    11. In "WHEN-NEW-FORM-INSTANCE" Trigger Write the Below Code.
    ** Author   : Muhammad Waseem Haroon                        *
    ** Dated    : 07-Apr-2005                                   *
    ** Purpose  : To Call Macromedia Flash Object (*.swf File)  *
    ** Module   : Logo                                          *
    DECLARE
         oleitm OLEOBJ;
    BEGIN
         oleitm := :item('OCXITM').INTERFACE;
         ShockwaveFlash_IShockwa_0.Movie(oleitm,'d:\movie.swf');--it can be dynamic.
    END;12. Compile, Save & Run Your Form.... and... See the Beauty.
    Thanks & Regards
    Muhammad Waseem Haroon
    [email protected]
    [email protected]
    [email protected]

    Mark Striekwold did an effort to put flash into forms
    http://mark-oradev.blogspot.com/2010/02/flash-inside-oracle-forms.html
    http://mark-oradev.blogspot.com/2010/02/flash-test-inside-oracle-forms-part-2.html
    http://mark-oradev.blogspot.com/2010/04/flash-test-inside-oracle-forms.html

  • How can I download and read a SWF file on IPad 2? The message returned is that Safari cannot download that file

    How can I download and read a SWF file on IPad 2? The message returned is that Safari cannot download that file

    SWF files are flash files, which are not supported on the iPad : http://www.apple.com/hotnews/thoughts-on-flash/
    If you want to play the file then the iSwifter or Skyfire browser apps might work (they don't work on all flash sites) but you won't be able to download it

  • How to get the content in embed swf file in Swf Loader on run time

    How to get the content in embed swf file in Swf Loader on run time
    [Bindable]
    [Embed(source="assets/index.swf")]
       private var SWFSRC:Class;
    <mx:SWFLoader id="_swfloader" source="{SWFSRC}" />

    Hi Flex harUI,
    Throw the error.
    Access of undefined property content

  • How can I import or convert a .swf file into iMovie 8

    I've been searching with no luck for a way to convert a flash animation (.swf) file into a format that I can import into iMovie 8. Ideally, this would involve freeware or very inexpensive software. It is important that I maintain the quality (and audio) of the original swf file.
    Can anyone suggest a route?
    Many thanks.

    The easiest method is to use screen capture software to "record" the .swf file as it plays.
    Since .swf files use vector graphics you can scale it up in dimension (to fit your iMovie Project needs) without any loss in quality.
    I'm a happy user of SnapzProX http://www.ambrosiasw.com/utilities/snapzprox/ as it records in QuickTime formats.

  • How do I save adobe flash professional cc file (fla.) as adobe flash professional cs5 file (fla.)?

    how do I save adobe flash professional cc file (fla.) as adobe flash professional cs5 file (fla.)?
    hi, I'm a college boy.
    at college, i need to summit adobe flash professional files (fla) for asignment.
    I use adobe flash professional cc at home, but at school it use cs5.
    so I have to save fla. file to cs5 version.
    how do I save adobe flash professional cc file (fla.) to adobe flash professional cs5 file (fla.)?
    in cs6 version, you can see whether to save as cs5 or cs6       but I can't see those thing in cc !!
    please help!

    there's only
    flash document (fla)
    flash uncompressed document (xfl)
    when you click 'save as'.
    abobe says you can load cc files on previous version, but I don't know how to save as previous version.

  • Is this possible to package flash 8 swf file with AIR

    Hi All,
    Is this possible to package flash 8 swf file with AIR
    packager or load flash 8 swf file in AIR?
    Any info on AIR would be greatful.
    Thanks,
    Shailesh

    Yes.
    -ted

  • How can I make my external loaded .SWF file smoothly disappear after 15 seconds?

    Hi,
    How can I make my external loaded .SWF file smoothly disappear after 15 seconds? The following is the code to load an external .SWF file:
    var K:Loader=new Loader();
    addChild(K);
    K.load(new URLRequest("clock.swf"));
    K.x = 165;
    K.y = 247;
    K.contentLoaderInfo.addEventListener(Event.INIT, growLoader);
    function growLoader(evt:Event):void {
         K.width = 130;
         K.height = 130;
    I want to make clock.swf file disappear from the page after 15 seconds using some smooth disappear effect.
    Please help.
    Thanks.

    Something even better:
    http://www.greensock.com/
    Check out TimelineMax I LOVE it...
    The guy that made this (and gives it away for free!) is a saint.

Maybe you are looking for

  • How do I delete duplicate songs

    A while back I when I opened iTunes I was prompted to do something relating to how my library was organized.  Unfortunatley I didn't read it very closely and just click OK and it began to duplicate almost every song in my library so now I have 3 copi

  • Can I use StyleWriter II with my notebook?

    I have got an old printer StyleWriter II, can I use it with my notebook(not Mac, Windows System XP, AMD Turion Processor)? if can, where can I get the drives and which kind of cables to use to connect to computer and also the power cable?

  • Anyone else unable to post gift cards or purchase from istore?

    System says due to a problem my credit balance is unavailable. Will not let me purchase or post gift cards received to my account... Is this a general problem?

  • Import Java Class

    How do you add a class to be available in the Java Importer Classes of Oracle Forms Builder?

  • My mac has been stolen

    my MacBook Air has been stolen. I am not install 'Find MyIphone' on my Mac. Now i just use this app via ICloud after my Mac has been stoled. Is this possible to track my Mac if someone reformat my Mac or reset admin account password, is that possible