Solved

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

Posted on 2009-05-15
1
1,293 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
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

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

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

Nothing in an HTTP request can be trusted, including HTTP headers and form data.  A form token is a tool that can be used to guard against request forgeries (CSRF).  This article shows an improved approach to form tokens, making it more difficult to…
Any business that wants to seriously grow needs to keep the needs and desires of an international audience of their websites in mind. Making a website friendly to international users isn’t prohibitively expensive and can provide an incredible return…
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
The goal of the tutorial is to teach the user how to use the auto adjust feature and what the different options do. When your video is not working right you can choose the auto adjust feature to help choose your settings.

773 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