cntkillme
|
  |
| Joined: 07 Apr 2008 |
| Total Posts: 44956 |
|
|
| 03 Oct 2012 09:22 PM |
Input:
var Pics = ["Img1.bmp", "Img2.bmp"; var Img = document.getElementById("ImgSS"); var Hash = 0; var E = false;
function Slsh() { if(E == false) { return; } Img.src = Pics[Hash]; Hash++; setTimeout("Slsh()", 2000); }
function Click() { E = !E; Slsh(); } |
|
|
| Report Abuse |
|
|
cntkillme
|
  |
| Joined: 07 Apr 2008 |
| Total Posts: 44956 |
|
|
| 03 Oct 2012 09:24 PM |
Still broken but i added this:
if(Hash >= Pics.length) { Hash = 0; } UNDER Img.src = Pics[Hash]; |
|
|
| Report Abuse |
|
|
|
| 03 Oct 2012 09:24 PM |
var Pics = {"Img1.bmp", "Img2.bmp"}; var Img = document.getElementById("ImgSS"); var Hash = 0; var E = false;
function Slsh() { if(E == false) { return; } Img.src = Pics[Hash]; Hash++; setTimeout("Slsh()", 2000); }
function Click() { E = !E; Slsh(); }
I think... If not let me know. |
|
|
| Report Abuse |
|
|
rayoma
|
  |
| Joined: 13 Nov 2009 |
| Total Posts: 1911 |
|
|
| 03 Oct 2012 09:24 PM |
um,
> var Pics = ["Img1.bmp", "Img2.bmp";
|
|
|
| Report Abuse |
|
|
cntkillme
|
  |
| Joined: 07 Apr 2008 |
| Total Posts: 44956 |
|
|
| 03 Oct 2012 09:25 PM |
I know it's wrong because arrays in javascript aren't defined with { and } It's worth a try though |
|
|
| Report Abuse |
|
|
rayoma
|
  |
| Joined: 13 Nov 2009 |
| Total Posts: 1911 |
|
|
| 03 Oct 2012 09:25 PM |
@agent It is the square brackets however, he didn't close the brackets. |
|
|
| Report Abuse |
|
|
cntkillme
|
  |
| Joined: 07 Apr 2008 |
| Total Posts: 44956 |
|
|
| 03 Oct 2012 09:25 PM |
@rayoma
Tyvm =D I didn't see that, LOLFAIL It works now ;] |
|
|
| Report Abuse |
|
|
|
| 03 Oct 2012 09:27 PM |
var Pics = new Array("Img1.bmp", "Img2.bmp"); var Img = document.getElementById("ImgSS"); var Hash = 0; var E = false;
function Slsh() { if(E == false) { return; } Img.src = Pics[Hash]; //Hash++; Hash = (Hash>Pics.length-1) ? 0 : Hash+1; setTimeout("Slsh()", 2000); }
function Click() { E = !E; Slsh(); } |
|
|
| Report Abuse |
|
|
cntkillme
|
  |
| Joined: 07 Apr 2008 |
| Total Posts: 44956 |
|
|
| 03 Oct 2012 09:28 PM |
| @Agent, that made things complicated after i fixed it, read the 2nd line, i added the thing i missed =D Nice try, i'm sure that script would work |
|
|
| Report Abuse |
|
|
|
| 03 Oct 2012 09:29 PM |
Yeah I had to go back to my poker game to find the JS. That was a late post, btw. |
|
|
| Report Abuse |
|
|
cntkillme
|
  |
| Joined: 07 Apr 2008 |
| Total Posts: 44956 |
|
|
| 03 Oct 2012 09:30 PM |
| Why do you need to go there for it O_o |
|
|
| Report Abuse |
|
|
|
| 03 Oct 2012 09:31 PM |
I haven't worked on JS for a couple years. :3 I'm not even done with my poker game. |
|
|
| Report Abuse |
|
|
cntkillme
|
  |
| Joined: 07 Apr 2008 |
| Total Posts: 44956 |
|
|
| 03 Oct 2012 09:31 PM |
| What language is your poker game in? |
|
|
| Report Abuse |
|
|
rayoma
|
  |
| Joined: 13 Nov 2009 |
| Total Posts: 1911 |
|
|
| 03 Oct 2012 09:40 PM |
@cnt Usually when I play poker I use English but AFF is into some weird stuff so... |
|
|
| Report Abuse |
|
|
|
| 03 Oct 2012 10:04 PM |
My poker game is in JS. JavaScript. Thought you guys knew what JS was... |
|
|
| Report Abuse |
|
|
cntkillme
|
  |
| Joined: 07 Apr 2008 |
| Total Posts: 44956 |
|
| |
|
|
| 03 Oct 2012 10:06 PM |
| Then I'm confused why you asked what language my poker game was in .... |
|
|
| Report Abuse |
|
|
ungh01
|
  |
| Joined: 24 Dec 2008 |
| Total Posts: 876 |
|
|
| 04 Oct 2012 12:27 AM |
| Good time to use that meme.. |
|
|
| Report Abuse |
|
|