pre-loading background image in table

liunx

Guest
I'm trying to preload a background image in a table to create the illusion that the flash file that is actually loading in the forground is already there. My flash file is simply a media player up front with a 2+ meg sound file loading behind the scenes. Due to the size of the sound file the media player graphic buttons do not display until the sound file is loaded. To create the illusion that the media player buttons are already there while the file loads, I placed the flash object inside a <TABLE> so I could include a background image of the player w/i the <TABLE> code. Strangely enough, the background image isn't loading any quicker than the actual flash file, so I wanted to see if I could preload the background image in the table.<br />
<br />
I tried using a standard preloading script in the header, an onload code in the body but I can't seem to get the syntax right when using the preloading code in the table tag.<br />
<br />
Suggestions?<!--content-->..... I'm VERY new and most of my mistakes would just never happen to an expert!<br />
<br />
One mistake I made, in similar circs, was to leave the image as a .fla file - so it needed Flash to load! Presumably you've used an image editor to convert it to a gif or a jpg.<br />
<br />
I also had some trouble with preloading. But I'd missed out a comma :rolleyes:<br />
The other thing is to make sure your table is in front of the other stuff - I only know how to do this using layers, but it sure makes a difference! You could set a timeline to keep the image in front until your application has loaded.<br />
<br />
Hope you've got it sorted by now, anyway.<br />
CAA<!--content-->I've been developing web sites for a number of years and have been using flash with audio for about one year. I thank you so much for taking the time to reply, but I used a gif file for the background, and my flash is swf. I didn't want to post my code, as it includes a lot of text, but maybe I should to assist folks in their efforts to assist me. :-)<br />
<br />
SCRIPT:<br />
<br />
<script language="JavaScript"><br />
<!--<br />
function loader(){<br />
document.getElementById('image1').style.visibility = 'visible';<br />
}<br />
//--><br />
</scipt><br />
<br />
___________________________<br />
<br />
BODY:<br />
<br />
<body BGCOLOR="#DCDBA3" onload="loader();"><br />
<br />
___________________________<br />
<br />
TABLE w/ FLASH and BACKGROUND: <br />
<br />
(currently w/o preloader code because I don't know how to structure it - see below code for more info)<br />
<br />
<br />
<!-- beg audio --><br />
<br />
<table align=left valign=top background="http://www.internetsuccessfast.com/images/audio_home.gif"><tr valign=top><td valign=top><br />
<font face="Arial" size="1"><center>Listen to Barbara!</center><br />
<br />
<center><table><tr><td><br />
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"<br />
codebase="http://active.macromedia.com/flash4/cabs/swflash.cab#version=4,0,0,0"<br />
id="welcome" width="60" height="28"><br />
<param name="movie" value="http://www.internetsuccessfast.com/audio/welcome.swf"><br />
<param name="loop" value=false><br />
<param name="quality" value="high"><br />
<param name="bgcolor" value="#FFFFFF"><br />
<embed name="welcome" src=http://www.webdeveloper.com/forum/archive/index.php/"http://www.internetsuccessfast.com/audio/welcome.swf" loop="false" quality="high" bgcolor="#FFFFFF"<br />
width="60" height="28"<br />
type="application/x-shockwave-flash"<br />
pluginspage="http://www.macromedia.com/shockwave/Download <!--more-->/index.cgi?P1_Prod_Version=ShockwaveFlash"><br />
</embed><br />
</object><br />
</td></tr></table></center><br />
<br />
<br />
<center><font color="slategray" face="arial narrow"><br />
runtime 2 min 24 sec</font></font></center><br />
<br />
</td></tr></table><br />
<!-- end audio --><br />
<br />
~~~~~~~~~~~~~~~~~~~~<br />
If it were a straight image file load the code I'd use would be:<br />
<br />
<img src=http://www.webdeveloper.com/forum/archive/index.php/"http://www.internetsuccessfast.com/images/audio_home.gif" id="image1" style="visibility: hidden"><br />
~~~~~~~~~~~~~~~~~~~~<!--content-->Check out the thread named "image swap without using JavaScript" in the HTML section of this forum. You'll find your answer here. Make sure you don't use JavaScript if the image swap is important, because some 13% of all users have it disabled! Choose CSS in stead.<br />
<br />
Cheers, Jochem :cool:<!--content-->
 
Back
Top