Flash Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsWeb DesignFlash Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old January 12th, 2004, 03:02 PM
needafixx needafixx is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2003
Location: Richmond, Va
Posts: 40 needafixx User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 6
Flash to load last on a web page?

Is it possible to delay the loading of a flash movie without adding frames to the front end of your movie?

The client wants the entire web page to load and then the flash movie to kick off.
__________________
Thanks!

Reply With Quote
  #2  
Old January 12th, 2004, 04:30 PM
jmichels's Avatar
jmichels jmichels is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2003
Location: Orlando, FL
Posts: 177 jmichels User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 5 h 18 m 12 sec
Reputation Power: 6
I bet some JavaScript in your html would do the trick. I've seen some scripts by running a search on yahoo.com that allow you to input the preloading order of your images. If you substituted the image for an .swf file and then put it last in line, it would probably get the job done.

Last edited by jmichels : January 12th, 2004 at 06:05 PM.

Reply With Quote
  #3  
Old January 13th, 2004, 07:57 AM
needafixx needafixx is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2003
Location: Richmond, Va
Posts: 40 needafixx User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 6
I'll do a search.. thanks.....

Reply With Quote
  #4  
Old February 10th, 2004, 10:28 PM
plexofoam plexofoam is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2004
Location: Miami, FL
Posts: 1 plexofoam User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Did you find anything?

Reply With Quote
  #5  
Old February 11th, 2004, 08:22 AM
needafixx needafixx is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2003
Location: Richmond, Va
Posts: 40 needafixx User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 6
Yep, you have to put an onload in the body tag and then surround your flash movie with <div> tags:

<body bgcolor="#5A5A5A" text="#000000" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" onload="document.getElementById('image').style.display = 'block'; ">

<div id="image">

Your flash code here

</div>

See it in action here: http://www.suntrust-racing.com/

Good luck, happy to share!

Reply With Quote
  #6  
Old February 12th, 2004, 01:24 PM
mguerriero mguerriero is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2004
Posts: 3 mguerriero User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 m 53 sec
Reputation Power: 0
ok but what about when you have the javascript that checks for the flash plugin? Is it different then? I know this method didn't work for me any way I tried with the flash detect....I didn't even try it without it. I know that racing site link you provided has a flash detect AND the flash loading last code. I tried to look at their code and can;t seem to figure out how they set it up. I noticed the on load code within the body tag, but no DIV tags anywhere around the flash code.

Reply With Quote
  #7  
Old February 12th, 2004, 01:36 PM
needafixx needafixx is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2003
Location: Richmond, Va
Posts: 40 needafixx User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 6
you won't be able to see the div tags when you view source.. just put your <div> tags on either side of your flash tag:

<div id="image">

Your flash code here

</div>


see the posts above

the flash detect code is separate from the "last to load" thing. In the case of the above mentioned site, the flash detect code exists on the same page, if user does not have flash, a jpg goes in it's place... we also have some code (I can't share) that allows the user to see an alternate movie when the user revisits the home page, that's why you may see two flash tags in the code... I really haven't tried viewing the source so I'm not sure if both flash tags show up....

Last edited by needafixx : February 12th, 2004 at 01:40 PM.

Reply With Quote
  #8  
Old February 12th, 2004, 01:39 PM
binkyboo binkyboo is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Dec 2003
Posts: 114 binkyboo User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 5
Code:
<script language="javascript">
  function loadFlash(){
       //use document.write() to insert flash object tags now
  }
</script>
<body onLoad="loadFlash">

Reply With Quote
  #9  
Old February 12th, 2004, 01:43 PM
binkyboo binkyboo is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Dec 2003
Posts: 114 binkyboo User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 5
Here's a more indepth example I used on a project.

Code:
<html>
<head><title>dynamic flash test</title>
<script language="javascript">
<!--//hide

	//function to write in flash object when page loads.
	function writeFlash(){
		//place your flash object tags inside a variable
		// i'm gonna split it up a bit here, just for my own purposes of ledgability, and checking for errors... not really necessary.
		var flashOut='<OBJECT classid="clsid27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" WIDTH="550" HEIGHT="100" id="javascripttest" ALIGN="">';
		flashOut=flashOut+'<PARAM NAME=movie VALUE="javascripttest.swf">';
		flashOut=flashOut+'<PARAM NAME=quality VALUE=high>';
		flashOut=flashOut+'<PARAM NAME=bgcolor VALUE=#CC6600>';
		flashOut=flashOut+'<EMBED src="javascripttest.swf" quality=high bgcolor=#CC6600  WIDTH="550" HEIGHT="100" NAME="javascripttest" ALIGN="" TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/go/getflashplayer">';
		flashOut=flashOut+'</EMBED></OBJECT>';
		//create a layer tag to place your flash object into, and to position your flash object
		//document.write("<layer name='flashLayer' top=300 left=100>"+flashOut+"</layer>");
		//the above didn't seem to work... so i'll try:
		//document.write("<layer name='flashLayer'>"+flashOut+"</layer>");
		//document.layer.flashLayer.top=500;
		//still no go... maybe try it wil div... and style:
		document.write("<div name='flashLayer' style='position:absolute; left:100px; top:300px;'>"+flashOut+"</div>");
		//this one seems to work in ie... don't know about other browsers, but play around with it and see what you get.

	}


//-->
</script>
<body onLoad="writeFlash()">

</body>
</html>

Reply With Quote
  #10  
Old February 12th, 2004, 01:45 PM
needafixx needafixx is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2003
Location: Richmond, Va
Posts: 40 needafixx User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 6
Hi binkyboo, what does that code do?.... that's okay, you posted while I was posting....

Last edited by needafixx : February 12th, 2004 at 01:47 PM.

Reply With Quote
  #11  
Old February 12th, 2004, 01:46 PM
binkyboo binkyboo is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Dec 2003
Posts: 114 binkyboo User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 5
It'll load your Flash object last.

Reply With Quote
  #12  
Old February 12th, 2004, 01:48 PM
needafixx needafixx is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2003
Location: Richmond, Va
Posts: 40 needafixx User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 6
cool you were posting as I was posting... thanks!

Reply With Quote
  #13  
Old February 12th, 2004, 01:55 PM
mguerriero mguerriero is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2004
Posts: 3 mguerriero User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 m 53 sec
Reputation Power: 0
Quote:
Originally posted by binkyboo
Here's a more indepth example I used on a project.

Code:
<html>
<head><title>dynamic flash test</title>
<script language="javascript">
<!--//hide

	//function to write in flash object when page loads.
	function writeFlash(){
		//place your flash object tags inside a variable
		// i'm gonna split it up a bit here, just for my own purposes of ledgability, and checking for errors... not really necessary.
		var flashOut='<OBJECT classid="clsid27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" WIDTH="550" HEIGHT="100" id="javascripttest" ALIGN="">';
		flashOut=flashOut+'<PARAM NAME=movie VALUE="javascripttest.swf">';
		flashOut=flashOut+'<PARAM NAME=quality VALUE=high>';
		flashOut=flashOut+'<PARAM NAME=bgcolor VALUE=#CC6600>';
		flashOut=flashOut+'<EMBED src="javascripttest.swf" quality=high bgcolor=#CC6600  WIDTH="550" HEIGHT="100" NAME="javascripttest" ALIGN="" TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/go/getflashplayer">';
		flashOut=flashOut+'</EMBED></OBJECT>';
		//create a layer tag to place your flash object into, and to position your flash object
		//document.write("<layer name='flashLayer' top=300 left=100>"+flashOut+"</layer>");
		//the above didn't seem to work... so i'll try:
		//document.write("<layer name='flashLayer'>"+flashOut+"</layer>");
		//document.layer.flashLayer.top=500;
		//still no go... maybe try it wil div... and style:
		document.write("<div name='flashLayer' style='position:absolute; left:100px; top:300px;'>"+flashOut+"</div>");
		//this one seems to work in ie... don't know about other browsers, but play around with it and see what you get.

	}


//-->
</script>
<body onLoad="writeFlash()">

</body>
</html>


Thanks to both of you for responding, and that code seems like it WOULD work, but I can't use a layer. It needs to be in a table. Actually, what's weird is the layout of that racing site is EXACTLY the layout of my site, well pretty close.

Last edited by mguerriero : November 30th, 2004 at 12:26 PM. Reason: page deleted

Reply With Quote
  #14  
Old February 12th, 2004, 02:14 PM
mguerriero mguerriero is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2004
Posts: 3 mguerriero User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 m 53 sec
Reputation Power: 0
Soooooo basically, I'm being a big pain in the A$$ because I don't want to use a layer, and I want flash detection. Is that too much to ask?????LOL

Reply With Quote
Reply

Viewing: Dev Shed ForumsWeb DesignFlash Help > Flash to load last on a web page?


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |