Playing swf file by onclick in html web page

First time poster so please forgive any protocol lapses.  I'm trying to play an  AS3 swf embedded in my web page by an onclick javascript function in my page.  Have tried many different ways, including the ExternalInterface class but no luck. Any help or suggestions would be appreciated.  I have a feeling that I'm overlooking something very basic.
javascript :
function playCorrectMovie() {
          var getSwfObj = swfobject.getObjectById("FlashID2");
          if(getSwfObj)
                    getSwfObj.play();
<script type="text/javascript">
swfobject.registerObject("FlashID");
swfobject.registerObject("FlashID2");
</script>
html:
<div id="answer1" class="answer_box">
  <ul>
    <li><a href="#" id="gifted" onclick="MM_effectShake('answer1'); return false;">gifted musicians who trace their genealogy back to Monteverdi.</a></li>
    <li><a href="#" id="wealthy" onclick="MM_effectShake('answer1'); return false;">successful entrepreneurs (the folks who brought us the original Bazooka bubble Gum.</a></li>
    <li><a href="#" id="slackers" onclick="playCorrectMovie();" >slackers, swindlers and ne'er do wells.</a></li>
  </ul>
</div>
flash:
<div id="popupswf">
  <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="300" height="200" id="FlashID2" title="Your answer was correct!">
    <param name="movie" value="correct.swf" />
    <param name="quality" value="high" />
    <param name="wmode" value="transparent" />
    <param name="play" value="false" />
    <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="correct.swf" width="300" height="200">
      <!--<![endif]-->
      <param name="quality" value="high" />
      <param name="wmode" value="transparent" />
      <param name="play" value="false" />
      <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>

No need to be sorry...  one other thing... the url to the swf uses the "public_html" directory as a lead-in.
<param name="movie" value="public_html/our nations.swf" />
The public_html directory of a web site is typically where a web site's content is placed as the base for a web site on a host server.  Unless you have a directory named public_html within what is probably already the public_html folder, then you do not want to specify that.  It is more probably supposed to be...
<param name="movie" value="our nations.swf" />
If you look at the various images that are specified in the html code, they do not specify that directory.  So if the swf is in the same folder as them, you do not want to be specifying the public_html part of that address.

Similar Messages

  • How can I stop the swf file from repeating on different web pages

    I have my entire website built and am using a flash
    navigation bar that also has a movie presentation attached to it. I
    uploaded it to every page in my site because it is required for
    navigation. My problem is that the movie plays every time you
    switch to a different page, I only want it to play once on the home
    page, and then just have the flash navigation work on the rest of
    them. I know that there is a way to use cookies to tell the
    computers IP address that is viewing the site not to replay the
    movie if it has already played within the specified time frame. But
    I am not very good with actually inputting code into flash, I am
    new to it. I have seen sample code on another website but I think
    it was referring to the wrong flash version, and it did not specify
    exactly where to put it in. Please help!

    Well I am actually using a template. And the flash video that
    was created is way beyond my ability. So I tried initially to
    separate the two, the intro video, and the navigation. But they are
    intertwined in a way that I do not understand. I do need to do the
    variable thing. I took a flash class in school, and my book does
    not touch anywhere close to this. I know its probably too
    complicated to explain through a forum, but can you recommend any
    resources online or books that would go more in depth with this
    sort if thing. If I can just see the way it works on another site,
    I know that I can do on mine.
    Thank you!!!
    :)

  • How to play swf files in quicktime

    I have recently upgraded from Leopard to Snow Leopard on my MBP. Before I could play swf files (with no associated html files) in Quicktime okay, but in Snow Leopard you cannot select the swf to play. Is there a plug in that I now need to play this?

    Perian is definitely not the route. Frrom http://perian.org :
    File formats: AVI, DIVX, FLV, MKV, GVI, VP6, and VFW
    SWF is a special container made by Adobe Director and can be played back with streaming software, such as a Web page that has the Adobe Shockwave plugin. Open an SWF file in Safari or other browser after installing the latest Shockwave Player, free from Adobe. Some other software that is designed for streaming playback can play SWF media, but not a typical video player like QuickTime Player.
    The contents of an SWF container might include an FLV video file or bitmap images either alone or with other data. Shockwave Player has 3D graphics and interaction options (can capture video, sound, mouse movements etc. from your system by default and send them to a remote server if you don't turn off these permissions).
    http://www.actionscript.org/resources/articles/728/1/Anatomy-of-a-SWF-File/Page1 .html
    http://www.macromedia.com/support/documentation/en/flashplayer/help/settings_man ager02.html#118539

  • Insert a .SWF file into a Index.html

    Im making a website which is all in flash and now I have to
    insert the Master.swf file in dreamweaver Index.html so i can
    upload it on the web. Ive done all that but when I try and run the
    Preview in Safari it just shows up blank.
    In Dreamweaver i can play the master.swf file and it works
    but not in Preview mode.
    I looked all over the net for answers but nothing yet. Can
    anyone help me.......................Please!

    > Im making a website which is all in flash
    Too bad. You know what the downsides of this are, right?
    > In Dreamweaver i can play the master.swf file and it
    works but not in
    > Preview
    > mode.
    Upload your page so we can see the code, please.
    Murray --- ICQ 71997575
    Adobe Community Expert
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    http://www.projectseven.com/go
    - DW FAQs, Tutorials & Resources
    http://www.dwfaq.com - DW FAQs,
    Tutorials & Resources
    ==================
    "ParadoxSwitch" <[email protected]> wrote in
    message
    news:gan9kr$7tt$[email protected]..
    > Im making a website which is all in flash and now I have
    to insert the
    > Master.swf file in dreamweaver Index.html so i can
    upload it on the web.
    > Ive
    > done all that but when I try and run the Preview in
    Safari it just shows
    > up
    > blank.
    > In Dreamweaver i can play the master.swf file and it
    works but not in
    > Preview
    > mode.
    >
    > I looked all over the net for answers but nothing yet.
    Can anyone help
    > me.......................Please!
    >

  • How to play .swf files stored in database?

    Ok, i am pretty stuck with this...
    Here is the problem:
    I have upload form which upload file to the server folder and in the database insert path. That works fine. What is my problem? When i go to dreamweaver and make insert SWF and i give the path to that file in database, on my web page always stays:
    Content on this page requires a newer version of Adobe Flash Player.
    But i have installed that flash player... And when i change the path to file that is actualy stored in folder on the server, all plays nicely?
    Is this the way to solve this problem? I want to display dinamicaly .swf files into my web page. Please help. Thank you.

    Ok, i dont understand what you mean,
    sorry for my bad english... This is the link to the web page : http://casmedia.blog-media.net/admin/111.php
    And this is the structure of my site in dreamweaver, as you can c i have folder and file in it...
    And this is the page:

  • Problem in playing swf files in IE 6.0

    I am facing a big problem in playing swf files in IE 6.0 with
    the tags object and embed.
    In my current project their is option to upload the swf files
    to oracle db and when ever wants to view that swf file, reading
    that swf from db and displaying in browser, In win 2000 swf file is
    displaying very fine, but not in win 2003 and win xp. and that swf
    file, entire application is using asp.net, C#
    Can anyone tell the problem behind this situation.
    I feel great for any solution.
    Thanks in advance

    > Yes, I put it in the (2) posts above...
    No.. there is no URL in the two posts above .. if there was I
    would not have
    asked for it again
    But now you have, I can have a look (no promises though :))
    BTW: These are your posts in their entirety:
    >>
    Hi,
    I'm brand new to programing, so my knowledge is limited. But
    I'm having a
    similar problem where my swf appears but sits on frame 1. I
    have a
    preloader
    set up on fr2. But it just gets stuck there (fr1). I know the
    plugin is
    installed but not sure why it won't display my movie. I know
    it's
    happeneing
    only with IE and XP and XPpro. Any ideas?
    >>
    >>
    Sorry, I since realized that it's not getting stuck on fr1.
    It's just
    displaying the bg color in the html page while it's waiting
    for the swf to
    load. But the swf never loads. It just sits there. I've tried
    using
    different embed tags, etc. But no-go.
    Here's the first example-
    <body>
    <table width="100%" height="100%" border="0"
    cellpadding="0"
    cellspacing="0">
    <tr>
    <td><div align="center">
    <object
    classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
    codebase="
    http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#ve
    rsion=6,0,29,0" width="800" height="600">
    <param name="movie" value="NINA.swf">
    <param name="quality" value="high">
    <embed src="NINA.swf" quality="high"
    pluginspage="
    http://www.macromedia.com/go/getflashplayer"
    type="application/x-shockwave-flash" width="800"
    height="600"></embed>
    </object>
    </div></td>
    </tr>
    </table>
    </body>
    >>
    >>
    Here's another example which is part of the most current
    detection scripts
    from
    Adobe....
    <script language="JavaScript" type="text/javascript">
    <!--
    var hasRightVersion = DetectFlashVer(requiredMajorVersion,
    requiredMinorVersion, requiredRevision);
    if(hasRightVersion) { // if we've detected an acceptable
    version
    var oeTags = '<object
    classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"'
    + 'width="100%" height="100%"'
    +
    'codebase="
    http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab">
    + '<param name="movie" value="NINA.swf" /><param
    name="loop"
    value="false"
    /><param name="menu" value="false" /><param
    name="quality" value="high"
    /><param name="scale" value="noscale" /><param
    name="bgcolor"
    value="#46442c"
    />'
    + '<embed src="NINA.swf" loop="false" menu="false"
    quality="high"
    scale="noscale" bgcolor="#46442c" '
    + 'width="100%" height="100%" name="NINA" align="middle"'
    + 'play="true"'
    + 'loop="false"'
    + 'quality="high"'
    + 'allowScriptAccess="sameDomain"'
    + 'type="application/x-shockwave-flash"'
    + 'pluginspage="
    http://www.macromedia.com/go/getflashplayer">'
    + '<\/embed>'
    + '<\/object>';
    document.write(oeTags); // embed the flash movie
    } else { // flash is too old or we can't detect the plugin
    var alternateContent = 'Alternate HTML content should be
    placed here.'
    + 'This content requires the Macromedia Flash Player.'
    + '<a href=http://www.macromedia.com/go/getflash/>Get
    Flash</a>';
    document.write(alternateContent); // insert non-flash
    content
    // -->
    </script>
    >>
    > One is
    http://eliasencpa.com
    > The other is...
    http://www.eliasencpa.com/TEST_091606.html
    >
    > thanks a lot.

  • How can I have a Flash SWF file to load a HTML page?

    I'm looking for a way to have Flash (CS5) to load and display a very simple HTML web page. Basically, the SWF file would be a standalone document sent by e-mail (or people would post on their web pages), and this SWF would display the content of another web page (consisting mostly in a live video on a black background)
    How can I have Flash CS5 to do that??
    Thank you!
    -sv

    Yeah maybe I wasn't clear enough... Here's the big picture.
    I run a live TV station, broadcasting 24/7 on the web via a Flash application (a projector basically). The video feed is streaming on my site, as well as on numerous web sites across the net. A Flash projector is also available as a standalone application, people download and use it to watch the movies without opening a web page.
    I am currently changing the broadcast method, from Flash stream to HTTP stream. But since my TV is already posted and linked in many places, I want to change the Flash object on my server with a new one, that has a HTTP stream instead of the Flash stream. It seems that HTTP stream cannot be embedded in a SWF, but it can be displayed on a HTML web page. The solution I came up with is to have a HTML page to load in the Flash player. All I would need to do is to have that HTML page to display the HTTP stream.
    So from there, most of my audience would not need to change anything to watch my streaming TV, while those who downloaded the old Flash projector would need to download a new one.

  • Can CDHtmlDialog play swf file with audio component?

    Hello, I'm using CDHtmlDialog in our application to play swf that shows user how to do a workflow. It works fine if swf does NOT have audio; if the swf has audio component, then it does not play.
    Can CDHtmlDialog play swf with audio?
    If not, any suggestion on how to implement playing swf file with audio?
    Many thanks in davance.

    Hi PingHu,
    How do you play the swf file in a html. I tried play a swf file with audio in my CDHtmlDialog class. I just use this:
    Html code Play the SWF file.
    <!DOCTYPE html>
    <html>
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <body>
    <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="200" height="100">
    <param name="movie" value="filename.swf">
    <param name="wmode" value="transparent">
    <embed src="D:\html directory\swf filename.swf" width="400" height="500" type="application/x-shockwave-flash" />
    </object>
    </body>
    </html>
    Then my sample is able to play a SWF file with audio. Hope this helps some.
    Best regards,
    Shu Hu
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • OSX 10.5.2 and AR8.1.2 playing swf files

    After applying the latest Apple updates to OSX 10.5.2 I find that I can no longer play
    swf files from within a PDF file. I'm using AR8.1.2 with FP9,0,115,0 . Consider
    the example:
    http://www.amrita-cfd.org/4adobe/swf/swf.pdf
    It contains an /Annot "Click to activate SWF!" that is supposed
    to play the swf, but when I click it: a progress bar "buffering" appears
    in the bottom right corner of the screen and then hangs. The swf file
    is included as an attachment, shock-tube.swf, which can be
    opened in an external viewer and so I don't think the swf file
    is the problem.
    I have the same problem with the PDF available at:
    http://acrobat.timhuff.net/?p=92
    where the swf is embedded using Acrobat,
    rather than my homebrew approach.
    I would very grateful if anyone could shed light
    on this problem.
    Thanks,
    James Quirk

    James,
    I am seeing what you are seeing even on pdfs with swfs that I created
    that previously worked. I guess we will need to file a bug report.
    Mike

  • Flash CS6 cant open play SWF files without importing and destroying them, how can I get around this?

    Flash CS6 can't open play SWF files without importing and destroying them, how can I get around this?
    I'm just trying to preview an swf file in flash like I have with all previous versions.

    What if my SWF loads external content from an online server?
    Not only does the current flash player prohibit such activity, it doesn't even pop open an error anymore saying there was an error connecting to an online source.
    Normally, I would simply drag the SWF into Flash and all connections would go through.  I could see traces, errors, and experience no issues.
    Now I can't even do that.  So what then?  You have crippled a fundamental use of the program, but THANK GOD we have that deco brush that nobody asked for.
    And for the record, the nature of my work benefits from not necessarily allowing the Flash Player to connect to online content.  The error it pops up?  That's simply another method of error checking that I require.  Updating the Flash Player options is not an option.
    Why would you even remove this key feature from Flash anyways?  It's been there for years ... has the ratio of people importing SWFs (a rather useless gesture in an increasing OOP world) really outweighed the people using Flash as a testing environment that much?

  • API / Sdk to play swf files inside a Mac / Windows application

    Hi
    We have set of .swf movie files in our application.
    These .swf movie files has to be played inside the content
    area of
    the window.
    We want to know how to play .swf movie files through program
    inside
    our application.
    Is there any api / SDK to play .swf files in Mac and Windows
    Thanks
    Ram

    Hi
    we want to give some clarifications
    As per our requirement we need to play same swf file ( about
    5 in number) always.
    These swf files are kept in some folder and during run time
    we need to play these swf files inside our Mac / windows
    application using flash player.
    we don't need to play any swf file, but the same swf files
    we need a api / sdk to implement this
    Any help will be very well appreciated
    Sudesh

  • HT5271 Downloaded latest Apple updates that informed me old versions of Adobe Flash Player were disabled and advised me to go to Adobe and down load latest version of Flash Player. Did that, but Flash Player won't play swf files, which it did before.

    Downloaded latest Safari update that informed me that older versions of Adobe Flash Player were being disabled and then advised me to go to Adobe and down load latest version of Flash Player. Did that, but Flash Player won't play swf files, which it did before. (Instead of opening, it comes up as a page of code).

    Hi..
    Quit Safari.
    Open System Preferences > Flash Player then select the Advanced tab.
    Click:  Delete All
    Now select the Storage tab.
    Click Delete All
    Relaunch Safari to test.
    edited by:  cs

  • Is there a player for pc to play swf files

    Is there a official macromedia player for pc to play swf
    files ?

    The most simple thing to do is just run the .swf through your
    browser IE, Firefox etc.
    but if you have large amounts of files to manage, you may
    like
    Text

  • Making xml playlist to play swf files inside one swf

    Hi,
    I have made an swf file and xml playlist.
    I want to include swf filepaths in xml playlist so i would be able to choose from my the list, which file i want to play.
    My list-component reads data from the xml, but i cannot get the swf files open there.
    I will attach my .fla file so you understand what i'm talking about.
    the .fla:
    http://www.mediafire.com/file/m24dz0gmzwz/Untitled-1.fla
    xml file:
    http://www.mediafire.com/file/gdyzzymy5mn/swfList.xml
    would you guys look at my files? i know i can play .flv files but i want to know how to play swf files inside another swf. The swf files should be loaded to  by the xml list.

    Hi
    we want to give some clarifications
    As per our requirement we need to play same swf file ( about
    5 in number) always.
    These swf files are kept in some folder and during run time
    we need to play these swf files inside our Mac / windows
    application using flash player.
    we don't need to play any swf file, but the same swf files
    we need a api / sdk to implement this
    Any help will be very well appreciated
    Sudesh

  • Play swf file from sound clips

    Can someone help me please.
    I have 20 sound clips that I have embeded in Dreamweaver CS3
    using the Insert Plugin option.
    I also have 20 swf files.
    I would like to play swf file #1 when the user starts sound
    clip #1.
    When a new sound clip is activated, I want the current swf
    file to stop and the correscponding swf file # to load.
    Thank you
    Pete

    Hi,
    I understand this is quite old topic but the question is actual for a lot of developers.
    The problem is that Flash ActiveX doesn't contain a method that plays movie from any source except file path or URL.
    So there are two approaches are possible:
    1. Emulate file by creating a fake file that provides data from your array. You may BoxedApp SDK for that, look here: BoxedApp SDK Features
    2. Use special .net component that provides this feature: http://f-in-box.com/dotnet/
    Hope this helps.

Maybe you are looking for