Solved

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

Posted on 2009-05-15
1
1,291 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
Comment Utility

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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Password hashing is better than message digests or encryption, and you should be using it instead of message digests or encryption.  Find out why and how in this article, which supplements the original article on PHP Client Registration, Login, Logo…
Boost your ability to deliver ambitious and competitive web apps by choosing the right JavaScript framework to best suit your project’s needs.
The goal of the tutorial is to teach the user how to live broadcast using Flash Media Live Encoder and connecting it to YouTube to broadcast. Log into your Youtube account, choose live stream settings, start live stream from Flash Media Live Enc…
Any person in technology especially those working for big companies should at least know about the basics of web accessibility. Believe it or not there are even laws in place that require businesses to provide such means for the disabled and aging p…

772 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now