Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

button to replay a .swf file 1

Status
Not open for further replies.

Fris

Programmer
Jun 23, 2003
22
US
Good morning!

I have an swf file that is embedded into an asp. Once it stops its animation, I want the reader of the asp to be able to click a button to "Replay" the animation if they wish. I have no clue how to call this procedure using a button. Any ideas on what code I could use to accomplish this? Here is the code that plays the animated file:

<tr>
<td align=&quot;center&quot;><object classid=&quot;clsid:D27CDB6E-AE6D-11cf-96B8-444553540000&quot; codebase=&quot; width=&quot;400&quot; height=&quot;400&quot;>
<param name=&quot;movie&quot; value='Condenser4.swf'>
<param name=&quot;quality&quot; value=&quot;high&quot;>
<embed src='Condenser4.swf' quality=&quot;high&quot; pluginspage=&quot; type=&quot;application/x-shockwave-flash&quot; width=&quot;400&quot; height=&quot;400&quot;></embed></object>
</td>

Thanks in advance for your time and efforts!

Christine
 
add to your object tag:
&quot;><object classid=&quot;clsid:D27CDB6E-AE6D-11cf-96B8-444553540000&quot; codebase=&quot; width=&quot;400&quot; height=&quot;400&quot;>
<param name=&quot;movie&quot; value='Condenser4.swf'>
<param name=&quot;quality&quot; value=&quot;high&quot;>
<embed src='Condenser4.swf' quality=&quot;high&quot; pluginspage=&quot; type=&quot;application/x-shockwave-flash&quot; width=&quot;400&quot; height=&quot;400&quot;NAME=&quot;myMov&quot;></embed></object>


on your button put: onclick=&quot;myMov.Play();&quot;

[conehead]
 
Thanks, ConeHead....what appears to be a very simple solution isn't working for me. I'm sure it's something I'm doing, as I am SO inexperienced. This is the whole page, minus all of the text...What am I doing wrong?

<table border=&quot;0&quot; cellpadding=&quot;2&quot; cellspacing=&quot;0&quot; class=&quot;bees&quot;>
<td>
<tr>
</tr>
</td>
<tr>
<td>TEXT GOES HERE</td>
</tr>
<tr>
<td align=&quot;center&quot;><object classid=&quot;clsid:D27CDB6E-AE6D-11cf-96B8-444553540000&quot; codebase=&quot; width=&quot;400&quot; height=&quot;400&quot;>
<param name=&quot;movie&quot; value='Condenser4.swf'>
<param name=&quot;quality&quot; value=&quot;high&quot;>
<embed src='Condenser4.swf' quality=&quot;high&quot; pluginspage=&quot; type=&quot;application/x-shockwave-flash&quot; width=&quot;400&quot; height=&quot;400&quot; NAME=&quot;myMov()&quot;></embed></object>
</td>
</tr>
<TD><input type=&quot;button&quot; value=&quot;Replay&quot; onclick=&quot;myMov.Play();&quot;>

</table>
 
hmmm you might need to reset your movie to frame one... you could try to do that via the .fla ... at the end reset it back to the beginning... or maybe this:

<input type=&quot;button&quot; value=&quot;Replay&quot; onclick=&quot;myMov.GotoFrame(0); myMov.Play();&quot;>


[conehead]
 
Shoot...that didn't work either. Does it help to know that the error message is: 'myMov' is undefined. This I don't understand, since it clearly is.....does it need to be defined somewhere else?
 
add this also:

<object classid=&quot;clsid:D27CDB6E-AE6D-11cf-96B8-444553540000&quot; codebase=&quot; width=&quot;400&quot; height=&quot;400&quot; id=&quot;myMov&quot;></>
<param name=&quot;movie&quot; value='Condenser4.swf'>
<param name=&quot;quality&quot; value=&quot;high&quot;>
<embed src='Condenser4.swf' quality=&quot;high&quot; pluginspage=&quot; type=&quot;application/x-shockwave-flash&quot; width=&quot;400&quot; height=&quot;400&quot;NAME=&quot;myMov&quot;></embed></object>


sorry...


[conehead]
 
Hurray for ConeHead! Has anyone told you lately that you are AWEsome! That did it! Thank you ever-so!!!

Christine
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top