generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripting Helpers
Home Search
 

Re: Off Topic Script Help: JavaScript

Previous Thread :: Next Thread 
cntkillme is not online. 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 is not online. 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
AgentFirefox is not online. AgentFirefox
Top 100 Poster
Joined: 20 Jun 2008
Total Posts: 22404
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 is not online. rayoma
Joined: 13 Nov 2009
Total Posts: 1911
03 Oct 2012 09:24 PM
um,

> var Pics = ["Img1.bmp", "Img2.bmp";

Report Abuse
cntkillme is not online. 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 is not online. 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 is not online. 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
AgentFirefox is not online. AgentFirefox
Top 100 Poster
Joined: 20 Jun 2008
Total Posts: 22404
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 is not online. 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
AgentFirefox is not online. AgentFirefox
Top 100 Poster
Joined: 20 Jun 2008
Total Posts: 22404
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 is not online. 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
AgentFirefox is not online. AgentFirefox
Top 100 Poster
Joined: 20 Jun 2008
Total Posts: 22404
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 is not online. cntkillme
Joined: 07 Apr 2008
Total Posts: 44956
03 Oct 2012 09:31 PM
What language is your poker game in?
Report Abuse
rayoma is not online. 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
AgentFirefox is not online. AgentFirefox
Top 100 Poster
Joined: 20 Jun 2008
Total Posts: 22404
03 Oct 2012 10:04 PM
My poker game is in JS.
JavaScript.
Thought you guys knew what JS was...
Report Abuse
cntkillme is not online. cntkillme
Joined: 07 Apr 2008
Total Posts: 44956
03 Oct 2012 10:05 PM
We do
Report Abuse
AgentFirefox is not online. AgentFirefox
Top 100 Poster
Joined: 20 Jun 2008
Total Posts: 22404
03 Oct 2012 10:06 PM
Then I'm confused why you asked what language my poker game was in ....
Report Abuse
ungh01 is not online. ungh01
Joined: 24 Dec 2008
Total Posts: 876
04 Oct 2012 12:27 AM
Good time to use that meme..
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image