| Home | Tutorials | Forums | Articles | Blogs | Movies | Library | Employment | Press | Buy templates |
|
|
#1 |
|
Registered User
Join Date: Mar 2001
Location: seattle
Posts: 4
|
New to Flash, but we have created a very satisfactory piece. Immediatedly encountered a problem which must be common, but can find no resolution. Since the swf is at the top of the page, it often plays and ends before the rest of the page is completely loaded. Can anyone recommend a method (java?) of delaying play until page load is complete?
thanks |
|
|
|
|
|
#2 |
|
New Member
Join Date: Mar 2001
Location: eastcoast
Posts: 42
|
Code:
<HTML>
<HEAD>
<TITLE>play</TITLE>
<script language="javascript">
function done(){
var movie = window.document.yourMovieName;
movie.Play();
}
</script>
</HEAD>
<BODY bgcolor="#FFFFFF" onLoad="done()">
<!-- URL's used in the movie-->
<!-- text used in the movie-->
<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0"
WIDTH=550 HEIGHT=400 id=yourMovieName>
<PARAM NAME=movie VALUE="play.swf">
<PARAM NAME=quality VALUE=high>
<PARAM NAME=bgcolor VALUE=#FFFFFF>
<EMBED src="play.swf" name=yourMovieName
swLiveConnect="True" quality=high bgcolor=#FFFFFF
WIDTH=550 HEIGHT=400 TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/shockwave/download/
index.cgi?P1_Prod_Version=ShockwaveFlash"></EMBED>
</OBJECT>
</BODY>
</HTML>
|
|
|
|
|
|
|
|
|
#3 |
|
Registered User
Join Date: Mar 2001
Location: seattle
Posts: 4
|
thanks very much.
|
|
|
|
|
|
#4 |
|
Registered User
Join Date: Mar 2001
Location: seattle
Posts: 4
|
I believe this routine merely preloads the swf. Am I missing something?
|
|
|
|
|
|
#5 |
|
New Member
Join Date: Mar 2001
Location: eastcoast
Posts: 42
|
if you put a stop action in the first frame of your movie, it will not play until after the html page has loaded. if you feel that the timing is still off, you could use a setTimeOut Event:
<script language="javascript"> function done(){ var movie = window.document.yourMovieName; //this will tell the movie to play 3 sec. after the page has loaded. setTimeout('movie.Play()',3000); } </script> </HEAD> <BODY bgcolor="#FFFFFF" onLoad="done()"> |
|
|
|
|
|
#6 |
|
Registered User
Join Date: Mar 2001
Location: seattle
Posts: 4
|
Sure! Sorry to be slow.. just started working with flash. thanks
|
|
|
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Repeating ActionScript code for each page | Getnoldfast | Simple Stuff (Newbies) | 2 | 05-11-2006 03:31 AM |
| SharedFont reloading everytime new page loads | broD | ActionScript 1.0 (and below) | 0 | 04-09-2006 11:03 PM |
| HTTP html page loads .swf from HTTPS address: are swf - server posts secure? | jrda | ActionScript 2.0 | 1 | 05-20-2005 06:00 PM |
| How can I add more buttons? | diggz | ActionScript 1.0 (and below) | 0 | 03-31-2004 07:14 AM |
| Dynamically Loading Page Headers...... Please Help! | Deadhands | ActionScript 1.0 (and below) | 1 | 02-08-2003 06:26 PM |