Solved

playing different swf files using using AC_FL_RunContent  with out reloading the page

Posted on 2009-05-15
1
1,298 Views
Last Modified: 2012-05-07
I need to be able switch which swf file is being played by clicking a link and with out the page reloading . I have 2 swf files both are in the same directory. movie1 & movie2.
I have seen similar questions solved by using an embeded object, this will not work for me.
the swf file must be called from AC_FL_RunContent.
Also I can not modifiy the swf files.

here is a mock up of my current code

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<script language="javascript">AC_FL_RunContent = 0;</script>
<script src="AC_RunActiveContent.js" type="text/javascript"></script>
</head>
<body>
<table width="1000" border="0" align="center" cellpadding="0" cellspacing="0">
    <tr>
        <td  colspan="3" align="LEFT">
            <script name="productVideo" type="text/javascript">AC_FL_RunContent( 'codebase','https://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0','width','640','height','390','src','flash/movie1','quality','high','pluginspage','https://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash','movie','flash/movie1, 'FlashVars', 'lscore=', 'wmode', 'transparent' );</script>
            <br><br>
        </td>
    </tr>
    <tr>
        <td width="100">
          <a href="javascript:playvid('movie1);">PLAY VID 1</a>             
        </td>
      <td width="200">
      </td>
      <td width="100">
          <a href="javascript:playvid('movie2);">PLAY VID 2</a>             
        </td>
</table>
</body>
</html>
0
Comment
Question by:UseeMe
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 22

Accepted Solution

by:
rascalpants earned 500 total points
ID: 24414630

you have two options, I believe...    use a shell.swf file to load in the proper SWF when you click a link, or you can use AJAX and innerHTML to switch out the content of a DIV.

you CANNOT load a new SWF into the embed code without reloading the page though...  it is client side code, and you would need to use AJAX to reload the content.


I would recommend using the one SWF file that loads in the movie1 or movie2 SWFs based on the link clicked...  you can easily setup External Interface for Flash to communicate with the shell SWF to load in the other SWFs...

your call...


rp / ZA
0

Featured Post

Secure Your WordPress Site: 5 Essential Approaches

WordPress is the web's most popular CMS, but its dominance also makes it a target for attackers. Our eBook will show you how to:

Prevent costly exploits of core and plugin vulnerabilities
Repel automated attacks
Lock down your dashboard, secure your code, and protect your users

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Because your company can’t afford for you to make SEO mistakes, you’ll want to ensure you’re taking the right steps each and every time you post a new piece of content. This list of optimization do’s and don’ts can help you become an SEO wizard.
When crafting your “Why Us” page, there are a plethora of pitfalls to avoid. Follow these five tips, and you’ll be well on your way to creating an effective page.
The viewer will learn how to count occurrences of each item in an array.
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…

717 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question