lexcio
asked on
Load Flash file after page load
Hello,
I have a page that contains a .swf file & it loads & plays before the rest of the page...i need to prevent it from loading or at least playing until the rest of the page has been downloaded.
Thanks,
Jais
I have a page that contains a .swf file & it loads & plays before the rest of the page...i need to prevent it from loading or at least playing until the rest of the page has been downloaded.
Thanks,
Jais
Stretch:
Something like this:
function makemovie() {
var ebd = document.createElement("em bed");
ebd.src = "yourfile.swf";
ebd.height = "100%";
ebd.width = "100%";
document.getElementById("m yflash").a ppendChild (ebd);
}
...
<div id="myflash"></div>
Then call makeMovie() when you are ready for the movie to show.
Something like this:
function makemovie() {
var ebd = document.createElement("em
ebd.src = "yourfile.swf";
ebd.height = "100%";
ebd.width = "100%";
document.getElementById("m
}
...
<div id="myflash"></div>
Then call makeMovie() when you are ready for the movie to show.
call makemovie()
like this
<script>
makemovie();
</script>
</body>
</html>
like this
<script>
makemovie();
</script>
</body>
</html>
or something like this
<div id="movies" style = "display:none">
<object type="application/x-shockw ave-flash" data="yourflashfile.swf" id="start" name="start" width="100" height="100">
<param name="movie" value="yourflashfile.swf" />
</object>
</div>
<body onload="document.getElemen tById('mov ies').styl e.display = 'block'; ">
<div id="movies" style = "display:none">
<object type="application/x-shockw
<param name="movie" value="yourflashfile.swf" />
</object>
</div>
<body onload="document.getElemen
ASKER
Archrajan,
I have to admit... I am a little confused by the way you setup your answers into multiple responses. I'm not really sure what you are telling me to do. Please excuse my knowledge of Javascript.
Thanks,
Jais
I have to admit... I am a little confused by the way you setup your answers into multiple responses. I'm not really sure what you are telling me to do. Please excuse my knowledge of Javascript.
Thanks,
Jais
DO THIS ONE
<div id="movies" style = "display:none"> // this is where u want the file to load
<object type="application/x-shockw ave-flash" data="yourflashfile.swf" id="start" name="start" width="100" height="100"> // yourflashfile.swf is the name of the flash file u want to put in the page
<param name="movie" value="yourflashfile.swf" /> // yourflashfile.swf is again the name of ur file
</object>
</div> //close of the div tag, this div tag is the placeholder for your movie file
<body onload="document.getElemen tById('mov ies').styl e.display = 'block'; ">// Then in the body tag add this code.
<div id="movies" style = "display:none"> // this is where u want the file to load
<object type="application/x-shockw
<param name="movie" value="yourflashfile.swf" /> // yourflashfile.swf is again the name of ur file
</object>
</div> //close of the div tag, this div tag is the placeholder for your movie file
<body onload="document.getElemen
ASKER
I am currently using some code that pulls a random flash file from a folder on the server as well. I need to work the loading specs together with this code.
Relevant code:
========================== ========== ========== ====
<script language="JavaScript" src="mm_menu.js"></script>
<% Const IMGS_DIR = "/images/flash/"
Dim objFSO, objFolderObject, objFileCollection, objFile
Dim intFileNumberToUse, intFileLooper
Dim objImageFileToUse
Dim strImageSrcText
Set objFSO = Server.CreateObject("Scrip ting.FileS ystemObjec t")
Set objFolderObject = objFSO.GetFolder(Server.Ma pPath(IMGS _DIR))
Set objFSO = Nothing
Set objFileCollection = objFolderObject.Files
Set objFolderObject = Nothing
Randomize()
intFileNumberToUse = Int(objFileCollection.Coun t * Rnd) + 1
intFileLooper = 1
For Each objFile in objFileCollection
If intFileLooper = intFileNumberToUse Then
Set objImageFileToUse = objFile
Exit For
End If
intFileLooper = intFileLooper + 1
Next
Set objFileCollection = Nothing
strImageSrcText = objImageFileToUse.Name
Set objImageFileToUse = Nothing
%>
</head>
<body bgcolor="#829999" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" onLoad="MM_preloadImages(' images/por tfolio_ove r.gif','im ages/servi ces_over.g if','image s/aboutus_ over.gif', 'images/cl ients_over .gif','ima ges/contac t_us_over. gif')">
<script language="JavaScript1.2">m mLoadMenus ();</scrip t>
<table class="unnamed1" width="100%" height="100%" border="0" cellpadding="0" cellspacing="0">
<td align="left" valign="top" background="images/portfol io/feature 1.jpg"><ob ject classid="clsid:D27CDB6E-AE 6D-11cf-96 B8-4445535 40000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="270" height="180">
<param name="movie" value="images/flash/<%=str ImageSrcTe xt%>">
<param name="quality" value="high"><param name="LOOP" value="false">
<embed src="images/flash/<%=strIm ageSrcText %>" width="270" height="180" loop="false" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockw ave-flash" ></embed>
</object></td>
</body>
Relevant code:
==========================
<script language="JavaScript" src="mm_menu.js"></script>
<% Const IMGS_DIR = "/images/flash/"
Dim objFSO, objFolderObject, objFileCollection, objFile
Dim intFileNumberToUse, intFileLooper
Dim objImageFileToUse
Dim strImageSrcText
Set objFSO = Server.CreateObject("Scrip
Set objFolderObject = objFSO.GetFolder(Server.Ma
Set objFSO = Nothing
Set objFileCollection = objFolderObject.Files
Set objFolderObject = Nothing
Randomize()
intFileNumberToUse = Int(objFileCollection.Coun
intFileLooper = 1
For Each objFile in objFileCollection
If intFileLooper = intFileNumberToUse Then
Set objImageFileToUse = objFile
Exit For
End If
intFileLooper = intFileLooper + 1
Next
Set objFileCollection = Nothing
strImageSrcText = objImageFileToUse.Name
Set objImageFileToUse = Nothing
%>
</head>
<body bgcolor="#829999" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" onLoad="MM_preloadImages('
<script language="JavaScript1.2">m
<table class="unnamed1" width="100%" height="100%" border="0" cellpadding="0" cellspacing="0">
<td align="left" valign="top" background="images/portfol
<param name="movie" value="images/flash/<%=str
<param name="quality" value="high"><param name="LOOP" value="false">
<embed src="images/flash/<%=strIm
</object></td>
</body>
THIS METHOD WILL WORK IN IE AND NETSCAPE
function makemovie() // a javascript function which u use to make the movie
{
var ebd = document.createElement("em bed");
ebd.src = "yourfile.swf"; // your swf file goes here
ebd.height = "100%";
ebd.width = "100%";
document.getElementById("m yflash").a ppendChild (ebd); // my flash is the id of the placeholder(where your flash resides in the html)
}
<div id="myflash"></div> --> just add this part of code in the html where you want the flash file to be present.
Then call makemovie() like this
in the body tag
<script>
makemovie();
</script>
</body>
</html>
function makemovie() // a javascript function which u use to make the movie
{
var ebd = document.createElement("em
ebd.src = "yourfile.swf"; // your swf file goes here
ebd.height = "100%";
ebd.width = "100%";
document.getElementById("m
}
<div id="myflash"></div> --> just add this part of code in the html where you want the flash file to be present.
Then call makemovie() like this
in the body tag
<script>
makemovie();
</script>
</body>
</html>
just place the div tag before this code
<div id = "movies" style = "display:none"> <object classid="clsid:D27CDB6E-AE 6D-11cf-96 B8-4445535 40000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="270" height="180">
<param name="movie" value="images/flash/<%=str ImageSrcTe xt%>">
<param name="quality" value="high"><param name="LOOP" value="false">
<embed src="images/flash/<%=strIm ageSrcText %>" width="270" height="180" loop="false" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockw ave-flash" ></embed>
</object>
</div>
and this line of code in the body tag
<script>
document.getElementById('m ovies').st yle.displa y = 'block';
</script>
</body>
<div id = "movies" style = "display:none"> <object classid="clsid:D27CDB6E-AE
<param name="movie" value="images/flash/<%=str
<param name="quality" value="high"><param name="LOOP" value="false">
<embed src="images/flash/<%=strIm
</object>
</div>
and this line of code in the body tag
<script>
document.getElementById('m
</script>
</body>
ASKER
Archrajan,
I did the following & it still plays the Flash file as soon as it loads...which is before the rest of the page.
-------------------------- -
<div id = "movies" style = "display:none">
<object classid="clsid:D27CDB6E-AE 6D-11cf-96 B8-4445535 40000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="270" height="180">
<param name="movie" value="images/flash/<%=str ImageSrcTe xt%>">
<param name="quality" value="high"><param name="LOOP" value="false">
<embed src="images/flash/<%=strIm ageSrcText %>" width="270" height="180" loop="false" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockw ave-flash" ></embed>
</object>
</div>
<script>
document.getElementById('m ovies').st yle.displa y = 'block';
</script>
</body>
</html>
-------------------------- ---------- --
Did I do something wrong?
Jais
I did the following & it still plays the Flash file as soon as it loads...which is before the rest of the page.
--------------------------
<div id = "movies" style = "display:none">
<object classid="clsid:D27CDB6E-AE
<param name="movie" value="images/flash/<%=str
<param name="quality" value="high"><param name="LOOP" value="false">
<embed src="images/flash/<%=strIm
</object>
</div>
<script>
document.getElementById('m
</script>
</body>
</html>
--------------------------
Did I do something wrong?
Jais
Try this then...
Goes in the head section
<script type="text/javascript">
var loaded = false;
var tmr = null;
function loadTimer() {
if (!loaded) {
var tmr = window.setTimeout('loadTim er()', 1000);
}
else {
window.clearTimeout(tmr);
// window is completely loaded
// do your stuff now
alert("Finished loading!");
}
}
</script>
//This goes in the body tag just before the </body>
<script type="text/javascript">
void(window.setTimeout('lo aded = true', 1000));
</script>
And your body tag looks like this
<body onload="loadTimer();">
Goes in the head section
<script type="text/javascript">
var loaded = false;
var tmr = null;
function loadTimer() {
if (!loaded) {
var tmr = window.setTimeout('loadTim
}
else {
window.clearTimeout(tmr);
// window is completely loaded
// do your stuff now
alert("Finished loading!");
}
}
</script>
//This goes in the body tag just before the </body>
<script type="text/javascript">
void(window.setTimeout('lo
</script>
And your body tag looks like this
<body onload="loadTimer();">
ASKER
The last post only makes it pause for a certain period of time... If I slow it down enough for dial up users -- it would make broadband users not see the flash b/c they would have already gone to next page.
I need a script that forces the flash to load last or wait until the page has loaded.
Thanks,
Jais
I need a script that forces the flash to load last or wait until the page has loaded.
Thanks,
Jais
you need two things:
1.set parameter play to "false"
example:
<param name="play" value="false">
2. Call movie with onload event:
example:
onload="myMovieObj.play()"
here example:
========================== ===
<html>
<head>
<script>
function startFlash()
{
alert("page loaded, now will start flash!");
document.getElementById("f lashfile") .play();
}
</script>
</head>
<body onload="startFlash()">
<object CLASSID="clsid:D27CDB6E-AE 6D-11cf-96 B8-4445535 40000"
CODEBASE="NEED%20NEW%20COD EBASE%20FR OM%20RAVEN " ID="flashfile" WIDTH="400" HEIGHT="150">
<param name="movie" value="http://www.echoecho.com/flashcolors.swf">
<param name="play" value="false">
<param name="quality" value="high"><embed NAME="flashfile" SRC="http://www.echoecho.com/flashcolors.swf" WIDTH="400" HEIGHT="150" PLAY="false"
SWLIVECONNECT="true" QUALITY="high">
</object>
</body>
</html>
1.set parameter play to "false"
example:
<param name="play" value="false">
2. Call movie with onload event:
example:
onload="myMovieObj.play()"
here example:
==========================
<html>
<head>
<script>
function startFlash()
{
alert("page loaded, now will start flash!");
document.getElementById("f
}
</script>
</head>
<body onload="startFlash()">
<object CLASSID="clsid:D27CDB6E-AE
CODEBASE="NEED%20NEW%20COD
<param name="movie" value="http://www.echoecho.com/flashcolors.swf">
<param name="play" value="false">
<param name="quality" value="high"><embed NAME="flashfile" SRC="http://www.echoecho.com/flashcolors.swf" WIDTH="400" HEIGHT="150" PLAY="false"
SWLIVECONNECT="true" QUALITY="high">
</object>
</body>
</html>
ASKER
Devic,
Not working yet. Please find the errors in my code.
Thanks,
Jais
relevant parts of the code:
-------------------------- ---------- ---------- -----
<% Const IMGS_DIR = "/images/flash/"
Dim objFSO, objFolderObject, objFileCollection, objFile
Dim intFileNumberToUse, intFileLooper
Dim objImageFileToUse
Dim strImageSrcText
Set objFSO = Server.CreateObject("Scrip ting.FileS ystemObjec t")
Set objFolderObject = objFSO.GetFolder(Server.Ma pPath(IMGS _DIR))
Set objFSO = Nothing
Set objFileCollection = objFolderObject.Files
Set objFolderObject = Nothing
Randomize()
intFileNumberToUse = Int(objFileCollection.Coun t * Rnd) + 1
intFileLooper = 1
For Each objFile in objFileCollection
If intFileLooper = intFileNumberToUse Then
Set objImageFileToUse = objFile
Exit For
End If
intFileLooper = intFileLooper + 1
Next
Set objFileCollection = Nothing
strImageSrcText = objImageFileToUse.Name
Set objImageFileToUse = Nothing
%>
<script>
function startFlash()
{
document.getElementById("f lashfile") .play();
}
</script>
</head>
<body bgcolor="#829999" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" onLoad="MM_preloadImages(' images/por tfolio_ove r.gif','im ages/servi ces_over.g if','image s/aboutus_ over.gif', 'images/cl ients_over .gif','ima ges/contac t_us_over. gif'), startFlash()"> ***Note I tried both "," & ";"
<object classid="clsid:D27CDB6E-AE 6D-11cf-96 B8-4445535 40000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" ID="flashfile" width="270" height="180">
<param name="movie" value="images/flash/<%=str ImageSrcTe xt%>">
<param name="quality" value="high">
<param name="play" value="false">
<param name="LOOP" value="false">
<embed name="flashfile" src="images/flash/<%=strIm ageSrcText %>" width="270" height="180" loop="false" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockw ave-flash" play="false"></embed>
</object>
Not working yet. Please find the errors in my code.
Thanks,
Jais
relevant parts of the code:
--------------------------
<% Const IMGS_DIR = "/images/flash/"
Dim objFSO, objFolderObject, objFileCollection, objFile
Dim intFileNumberToUse, intFileLooper
Dim objImageFileToUse
Dim strImageSrcText
Set objFSO = Server.CreateObject("Scrip
Set objFolderObject = objFSO.GetFolder(Server.Ma
Set objFSO = Nothing
Set objFileCollection = objFolderObject.Files
Set objFolderObject = Nothing
Randomize()
intFileNumberToUse = Int(objFileCollection.Coun
intFileLooper = 1
For Each objFile in objFileCollection
If intFileLooper = intFileNumberToUse Then
Set objImageFileToUse = objFile
Exit For
End If
intFileLooper = intFileLooper + 1
Next
Set objFileCollection = Nothing
strImageSrcText = objImageFileToUse.Name
Set objImageFileToUse = Nothing
%>
<script>
function startFlash()
{
document.getElementById("f
}
</script>
</head>
<body bgcolor="#829999" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" onLoad="MM_preloadImages('
<object classid="clsid:D27CDB6E-AE
<param name="movie" value="images/flash/<%=str
<param name="quality" value="high">
<param name="play" value="false">
<param name="LOOP" value="false">
<embed name="flashfile" src="images/flash/<%=strIm
</object>
ASKER
The flash file begins playing while the images are still loading
Thanks,
Jais
Thanks,
Jais
I moved MM_preloadImages call to startFlash(), so I think better :)
all works, except I don't have a flash, be sure that <%=strImageSrcText%> returns right image path. Run page on server, go to view source and find what is there.
========================== ==
<script>
function startFlash()
{
document.getElementById("f lashfile") .play();
MM_preloadImages('images/p ortfolio_o ver.gif',' images/ser vices_over .gif','ima ges/aboutu s_over.gif ','images/ clients_ov er.gif','i mages/cont act_us_ove r.gif');
}
</script>
</head>
<body bgcolor="#829999" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" onLoad="startFlash()">
***Note I tried both "," & ";"
<object classid="clsid:D27CDB6E-AE 6D-11cf-96 B8-4445535 40000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" ID="flashfile" width="270" height="180">
<param name="movie" value="<%=strImageSrcText% >">
<param name="quality" value="high">
<param name="play" value="false">
<param name="LOOP" value="false">
<embed name="flashfile" src="images/flash/<%=strIm ageSrcText %>" width="270" height="180" loop="false" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockw ave-flash" play="false"></embed>
</object>
all works, except I don't have a flash, be sure that <%=strImageSrcText%> returns right image path. Run page on server, go to view source and find what is there.
==========================
<script>
function startFlash()
{
document.getElementById("f
MM_preloadImages('images/p
}
</script>
</head>
<body bgcolor="#829999" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" onLoad="startFlash()">
***Note I tried both "," & ";"
<object classid="clsid:D27CDB6E-AE
<param name="movie" value="<%=strImageSrcText%
<param name="quality" value="high">
<param name="play" value="false">
<param name="LOOP" value="false">
<embed name="flashfile" src="images/flash/<%=strIm
</object>
ok, then move startFlash() to the end of MM_preloadImages() function:
function MM_preloadImages()
{
//load images
//.................
//.................
//end of function MM_preloadImages
startFlash();
}
<body bgcolor="#829999" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" onLoad="MM_preloadImages(' images/por tfolio_ove r.gif','im ages/servi ces_over.g if','image s/aboutus_ over.gif', 'images/cl ients_over .gif','ima ges/contac t_us_over. gif')">
function MM_preloadImages()
{
//load images
//.................
//.................
//end of function MM_preloadImages
startFlash();
}
<body bgcolor="#829999" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" onLoad="MM_preloadImages('
ASKER
Hello devic,
Using the code from your post at 11/23/2004 03:27PM PST --- the flash file does not load at all.
Thanks,
Jais
Below is the code used:
-------------------------- ---------- ---------- ---------- ---------- ---------
<script>
function startFlash()
{
document.getElementById("f lashfile") .play();
MM_preloadImages('images/p ortfolio_o ver.gif',' images/ser vices_over .gif','ima ges/aboutu s_over.gif ','images/ clients_ov er.gif','i mages/cont act_us_ove r.gif');
}
</script>
<body bgcolor="#829999" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" onLoad="startFlash()">
<object classid="clsid:D27CDB6E-AE 6D-11cf-96 B8-4445535 40000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" ID="flashfile" width="270" height="180">
<param name="movie" value="<%=strImageSrcText% >">
<param name="quality" value="high">
<param name="play" value="false">
<param name="loop" value="false">
<embed name="flashfile" src="images/flash/<%=strIm ageSrcText %>" width="270" height="180" loop="false" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockw ave-flash" play="false"></embed>
</object>
Using the code from your post at 11/23/2004 03:27PM PST --- the flash file does not load at all.
Thanks,
Jais
Below is the code used:
--------------------------
<script>
function startFlash()
{
document.getElementById("f
MM_preloadImages('images/p
}
</script>
<body bgcolor="#829999" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" onLoad="startFlash()">
<object classid="clsid:D27CDB6E-AE
<param name="movie" value="<%=strImageSrcText%
<param name="quality" value="high">
<param name="play" value="false">
<param name="loop" value="false">
<embed name="flashfile" src="images/flash/<%=strIm
</object>
because you did error, and if you do error, then is not my code ;)
save as html ONLY ONLY my code, and replace the src for flash:
like this:
==============
<script>
function startFlash()
{
alert("now!")
document.getElementById("f lashfile") .play();
//MM_preloadImages('images /portfolio _over.gif' ,'images/s ervices_ov er.gif','i mages/abou tus_over.g if','image s/clients_ over.gif', 'images/co ntact_us_o ver.gif');
}
</script>
</head>
<body bgcolor="#829999" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" onLoad="startFlash()">
***Note I tried both "," & ";"
<object classid="clsid:D27CDB6E-AE 6D-11cf-96 B8-4445535 40000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" ID="flashfile" width="270" height="180">
<param name="movie" value="http://www.echoecho.com/flashcolors.swf">
<param name="quality" value="high">
<param name="play" value="false">
<param name="LOOP" value="false">
<embed name="flashfile" src="images/flash/<%=strIm ageSrcText %>" width="270" height="180" loop="false" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockw ave-flash" play="false"></embed>
</object>
save as html ONLY ONLY my code, and replace the src for flash:
like this:
==============
<script>
function startFlash()
{
alert("now!")
document.getElementById("f
//MM_preloadImages('images
}
</script>
</head>
<body bgcolor="#829999" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" onLoad="startFlash()">
***Note I tried both "," & ";"
<object classid="clsid:D27CDB6E-AE
<param name="movie" value="http://www.echoecho.com/flashcolors.swf">
<param name="quality" value="high">
<param name="play" value="false">
<param name="LOOP" value="false">
<embed name="flashfile" src="images/flash/<%=strIm
</object>
ASKER
Devic,
OK. now the flash loads before the page is done downloading...and the "now" status box pops up when the images are completely loaded.
I noticed you said "save as HTML". The page is ASP - does this cause problems?
Any ideas?
Thanks,
Jais
OK. now the flash loads before the page is done downloading...and the "now" status box pops up when the images are completely loaded.
I noticed you said "save as HTML". The page is ASP - does this cause problems?
Any ideas?
Thanks,
Jais
no, ASP is only on server and if the asp code executed will be send plain html to client.
for this reason you need to check what you send. Open from browser (View Source) and check what you send.
You can also save content as HTML, and it will do the same as asp (just not dynamic... without Rnd... just last generated HTML)
So you can check what you do. Here is javascript area, and better to post here this code and not ASP.
So can help you people who doesn't know ASP too.
for this reason you need to check what you send. Open from browser (View Source) and check what you send.
You can also save content as HTML, and it will do the same as asp (just not dynamic... without Rnd... just last generated HTML)
So you can check what you do. Here is javascript area, and better to post here this code and not ASP.
So can help you people who doesn't know ASP too.
ASKER
Devic,
Do you know why the popup alert works when the page is fully loaded, but the flash file still loads before the page. The ASP code should not be affecting the Javascript...as it is working fine.
Thanks,
Jais
Do you know why the popup alert works when the page is fully loaded, but the flash file still loads before the page. The ASP code should not be affecting the Javascript...as it is working fine.
Thanks,
Jais
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
>>Do you know why the popup alert works when the page is fully loaded, but the flash file still loads before the page.
Jais,
if you publish your page online, then I can say you why.
thanks
Jais,
if you publish your page online, then I can say you why.
thanks
ASKER
ziffgone,
Great coding...only had to change my reference to the file:
theFlash += '<param name="movie" value="<%=strImageSrcText% >">';
to
theFlash += '<param name="movie" value="images/flash/<%=str ImageSrcTe xt%>">';
Makes good sense to encapsulate the entire flash code to the script section...I would have never known how to do it!
Thanks for all the help! It works great.
Jais
Great coding...only had to change my reference to the file:
theFlash += '<param name="movie" value="<%=strImageSrcText%
to
theFlash += '<param name="movie" value="images/flash/<%=str
Makes good sense to encapsulate the entire flash code to the script section...I would have never known how to do it!
Thanks for all the help! It works great.
Jais
No problem Jais,
Yeah, I figured by not rendering the ENTIRE Flash object until after document load was complete, this would resolve pre-playing issues. Glad it worked for you!
Here's another suggestion to suit those with slower Internet connections, add "background:url(/path/to/s ubstitue_p icture.gif ); to the DIV tag I gave you, like so:
<div id="flashDiv" style="width:270px;height: 180px;back ground:url (/path/to/ substitue_ picture.gi f); "></div>
This will provide an alternate picture for those who's connections are slower and the Flash image takes a while to load. Simply replace "/path/to/substitue_pictur e.gif" with an image or Ad you wish to show them while the Flash loads.
Regards...
Yeah, I figured by not rendering the ENTIRE Flash object until after document load was complete, this would resolve pre-playing issues. Glad it worked for you!
Here's another suggestion to suit those with slower Internet connections, add "background:url(/path/to/s
<div id="flashDiv" style="width:270px;height:
This will provide an alternate picture for those who's connections are slower and the Flash image takes a while to load. Simply replace "/path/to/substitue_pictur
Regards...
place it before the
</body>