I am trying to insert a small flash animation at the top of a webpage. The webpage is here www.idroidrandp.com/mbz. At the very top of the page you can see where the animation shows for an acheivement. Well the issue I have is when I insert it as a .swf file it just loops the first 1.5 seconds instead of playing the entire animation. I took the same animation with the same attributes and made it into a .flv file and that is what is up there now. I don't mind keeping the .flv style one up, I just hate having the little control box there (play, pause, stop, etc.) and I can't get that to go away. I tried everything I could think of and that google had to offer to get the full .swf file to play but it still only played the first 1.5 seconds instead of the entire 8 and then go away. Any ideas?

Dani AI

Generated

Short summary and focused checklist based on ’s examples and ’s request for code: the FLV wrapper plays the full clip but shows controls, while the raw SWF you tried only loops the first ~1.5s. That pattern usually means either (A) the SWF itself contains timeline/ActionScript that stops or waits for an external trigger, or (B) the page is loading a different clip/loader (an FLV player or skin) instead of the full SWF. Here are concrete steps to pinpoint and fix it.

  1. Confirm the SWF file itself. Open the .swf in a standalone player or an emulator (Ruffle) to verify it actually contains the full 8s outside the browser wrapper. If it plays fine standalone, the embed/wrapper is the problem. (ruffle.rs)

  2. If the SWF still shows only the short loop, inspect the SWF for frame scripts, stop() calls, or ExternalInterface/FlashVars triggers. Use a SWF decompiler (JPEXS/FFDec) to view timeline frames and ActionScript so you can find (and remove or change) any code that prevents the timeline from reaching later frames. (github.com)

  3. If you want to avoid the FLV player controls entirely, convert the animation to a small MP4 and use HTML5 video (no controls) with autoplay and muted (modern browsers block audible autoplay). You can hide the element after play using onended. Example:

<video autoplay muted playsinline width="396" height="98" preload="auto" onended="this.style.display='none'">
  <source src="achievement.mp4" type="video/mp4">
</video>

See browser autoplay guidance for details on when autoplay is allowed. (developer.mozilla.org)

Longer-term: Flash is end-of-life and blocked in modern browsers, so moving to an HTML5 approach (video, CSS/JS animation) or a vector animation workflow like Lottie/Bodymovin is safer and smaller than maintaining SWFs. For quick testing of legacy SWFs use an emulator like Ruffle; for production, replace with a non-Flash asset. (adobe.com)

Recommended Answers

All 2 Replies

Please do show us how you code.

Here is the coding for the .flv file.

<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="396" height="98" id="FLVPlayer">
          <param name="movie" value="FLVPlayer_Progressive.swf" />
          <param name="quality" value="high" />
          <param name="wmode" value="transparent" />
          <param name="scale" value="noscale" />
          <param name="salign" value="lt" />
          <param name="FlashVars" value="&amp;MM_ComponentVersion=1&amp;skinName=Corona_Skin_1&amp;streamName=grey1&amp;autoPlay=true&amp;autoRewind=false" />
          <param name="swfversion" value="8,0,0,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="FLVPlayer_Progressive.swf" width="396" height="98">
            <!--<![endif]-->
            <param name="quality" value="high" />
            <param name="wmode" value="transparent" />
            <param name="scale" value="noscale" />
            <param name="salign" value="lt" />
            <param name="FlashVars" value="&amp;MM_ComponentVersion=1&amp;skinName=Corona_Skin_1&amp;streamName=grey1&amp;autoPlay=true&amp;autoRewind=false" />
            <param name="swfversion" value="8,0,0,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" /></a></p>
            </div>
            <!--[if !IE]>-->
          </object>
          <!--<![endif]-->
        </object>

Here is the code for the .swf file

<object id="FlashID" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="395" height="97">
          <param name="movie" value="AchievementUnlockedTemplate.swf" />
          <param name="quality" value="high" />
          <param name="wmode" value="opaque" />
          <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="AchievementUnlockedTemplate.swf" width="395" height="97">
            <!--<![endif]-->
            <param name="quality" value="high" />
            <param name="wmode" value="opaque" />
            <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>

All coding is done by dreamweaver, I am just choosing to add these files within it.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.