Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

JavaScript Forum


You are currently viewing our JavaScript Forum as a guest. Please register to participate.
Login



Reply
Old 07-18-2007, 01:03 PM Image Flash Question
Hoosier_Buddy's Avatar
Extreme Talker

Posts: 204
Name: Justin Allen
Location: Corydon, IN
Trades: 0
Can I have my onLoad="runSlideShow() somewhere else besides the body tag. Can I put it in a "<td>" if so can someone please tell me how.

This is for a new site I'm designing:

AppliancePartsClinic.com

Here is my JavaScript:

<script language="JavaScript">
<!--

var speed = 4000;
var crossFadeDuration = 2;
var Pic = new Array();

Pic[0] = 'images/appliance_accessories_1.jpg';
Pic[1] = 'images/appliance_accessories_2.jpg';
Pic[2] = 'images/appliance_accessories_3.jpg';
Pic[3] = 'images/appliance_accessories_4.jpg';
Pic[4] = 'images/appliance_accessories_5.jpg';
Pic[5] = 'images/appliance_accessories_6.jpg';
Pic[6] = 'images/appliance_accessories_7.jpg';
Pic[7] = 'images/appliance_accessories_8.jpg';
Pic[8] = 'images/appliance_accessories_9.jpg';
Pic[9] = 'images/appliance_accessories_10.jpg';
Pic[10] = 'images/appliance_accessories_11.jpg';
Pic[11] = 'images/appliance_accessories_12.jpg';
Pic[12] = 'images/appliance_accessories_13.jpg';
Pic[13] = 'images/appliance_accessories_14.jpg';
Pic[14] = 'images/appliance_accessories_15.jpg';
Pic[15] = 'images/appliance_accessories_16.jpg';
Pic[16] = 'images/appliance_accessories_17.jpg';
Pic[17] = 'images/appliance_accessories_18.jpg';
Pic[18] = 'images/appliance_accessories_19.jpg';
Pic[19] = 'images/appliance_accessories_20.jpg';
var t;
var j = 0;
var p = Pic.length;

var preLoad = new Array();
for (i = 0; i < p; i++){
preLoad[i] = new Image();
preLoad[i].src = Pic[i];}

function runSlideShow(){

if (document.all){
document.body.style.filter="blendTrans(duration=cr ossFadeDuration)";
document.body.filters.blendTrans.Apply();
document.body.filters.blendTrans.Play();}

if (document.body){
document.body.background = Pic[j];
j = j + 1
if (j > (p-1)) j=0
t = setTimeout('runSlideShow()', speed)}

}
//-->
</script>
__________________
Justin Allen
WebTeam

Please login or register to view this content. Registration is FREE
Hoosier_Buddy is offline
Reply With Quote
View Public Profile Visit Hoosier_Buddy's homepage!
 
 
Register now for full access!
Old 07-18-2007, 03:46 PM Re: Image Flash Question
Hoosier_Buddy's Avatar
Extreme Talker

Posts: 204
Name: Justin Allen
Location: Corydon, IN
Trades: 0
Nevermind I got it, I needed to add this into my javascript:

onload=runSlideShow;
function toBin(form){
form.bin.value=new Number(form.dnum.value).toString(2);
Pic.length=0;
bin2Pic(form.bin.value);
loadEm();
}

And this where ever I wanted the flash image to be placed:

<script type="text/javascript">
document.write('<img src="images/'+Pic[choice]+'" name="SlideShow">')
</script>
__________________
Justin Allen
WebTeam

Please login or register to view this content. Registration is FREE
Hoosier_Buddy is offline
Reply With Quote
View Public Profile Visit Hoosier_Buddy's homepage!
 
Reply     « Reply to Image Flash Question
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.11156 seconds with 12 queries