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: JavaScript help.

Previous Thread :: Next Thread 
bikerking200 is not online. bikerking200
Joined: 11 Mar 2010
Total Posts: 5047
17 Apr 2012 09:04 AM
function changeImg(){
img = document.images['Custom_Menu_Icon'];
if(img.src=="Images/Custom_Menu_Icon.png"){
alert("lol");
img.src = "Images/Custom_Menu_Icon_Hover.png";
}
else if(img.src=="Images/Custom_Menu_Icon_Hover.png"){
img.src="Images/Custom_Menu_Icon.png";
}
else{
img.src="Images/Custom_Menu_Icon.png";
}
}

The If statement(s) are not working, the Alert is to test and it's just not working.
Report Abuse
Lotoco is not online. Lotoco
Joined: 13 Apr 2012
Total Posts: 55
17 Apr 2012 09:56 AM
This is a ROBLOX scripting forum, not a web programming forum.

Use your browser's output. Duh.

Lot o' co-ffee
Report Abuse
rangersmash is not online. rangersmash
Joined: 18 Nov 2009
Total Posts: 2891
17 Apr 2012 10:08 AM
Actually if you can find the statement by a admin that says Lua only then I would <​3 to see.
Report Abuse
Lotoco is not online. Lotoco
Joined: 13 Apr 2012
Total Posts: 55
17 Apr 2012 10:19 AM
"Need help with a script you are writing? Need to edit an existing script? This is the place to share your 1337 programming skills and help others! [For advanced ROBLOX users.]"

Script = for ROBLOX game
JavaScript = web language

Lot o' co-ffee
Report Abuse
rangersmash is not online. rangersmash
Joined: 18 Nov 2009
Total Posts: 2891
17 Apr 2012 10:25 AM
Incorrect.
>Script (computing), a small program written for a command interpreter or another scripting language
Taken from Wikipedia.
:P
What you going to say now?
Report Abuse
Lotoco is not online. Lotoco
Joined: 13 Apr 2012
Total Posts: 55
17 Apr 2012 10:25 AM
Go to Scripters forum.

Lot o' co-ffee
Report Abuse
rangersmash is not online. rangersmash
Joined: 18 Nov 2009
Total Posts: 2891
17 Apr 2012 10:28 AM
Hang on. He doesn't need to. He can keep his post here.
Report Abuse
Lotoco is not online. Lotoco
Joined: 13 Apr 2012
Total Posts: 55
17 Apr 2012 10:30 AM
Those people know more JavaScript.

Anyhow, why not do this?

< img src="?" onmouseover="this.src='hover.png';" onmouseout="this.src='normal.png';" />

Lot o' co-ffee
Report Abuse
bikerking200 is not online. bikerking200
Joined: 11 Mar 2010
Total Posts: 5047
17 Apr 2012 11:05 AM
Bump
Report Abuse
Lotoco is not online. Lotoco
Joined: 13 Apr 2012
Total Posts: 55
17 Apr 2012 06:38 PM
@biker

Why'd you bump this? As far as the forums can see, it is resolved.

Lot o' co-ffee
Report Abuse
bikerking200 is not online. bikerking200
Joined: 11 Mar 2010
Total Posts: 5047
17 Apr 2012 06:43 PM
How? I still don't have my help.
Report Abuse
C0D3Y is not online. C0D3Y
Joined: 24 Jul 2010
Total Posts: 1692
17 Apr 2012 06:49 PM
Biker's completely correct. This isn't done. I gotta brush up on my JavaScript and I'll see if I can help in any way.
Report Abuse
C0D3Y is not online. C0D3Y
Joined: 24 Jul 2010
Total Posts: 1692
17 Apr 2012 06:57 PM
Can't find anything wrong D;
Report Abuse
InternetGuy is not online. InternetGuy
Joined: 28 Apr 2010
Total Posts: 3385
17 Apr 2012 07:08 PM
Your allowed to have this post here, as this is Scripting.
Does it say ANYWHERE Lua Scripting Helpers?
Report Abuse
cntkillme is not online. cntkillme
Joined: 07 Apr 2008
Total Posts: 44956
17 Apr 2012 07:52 PM
function changeImg(){
img = document.images['Custom_Menu_Icon'];
if(img.src=="Images/Custom_Menu_Icon.png"){
alert("lol");
img.src = "Images/Custom_Menu_Icon_Hover.png";
}
else if(img.src=="Images/Custom_Menu_Icon_Hover.png"){
img.src="Images/Custom_Menu_Icon.png";
}
else{
img.src="Images/Custom_Menu_Icon.png";
}
}

Is img An Object
U can add an id and:
img = document.getElementById('Custom_Menu_Icon')
and idk is it src or href?
Report Abuse
bikerking200 is not online. bikerking200
Joined: 11 Mar 2010
Total Posts: 5047
17 Apr 2012 09:11 PM
It's a src.
Report Abuse
RATSwordsman is not online. RATSwordsman
Joined: 08 Jan 2011
Total Posts: 953
17 Apr 2012 09:12 PM
lot, he is perfectly fine being allowed to post here.
stop being such a failure of a troll, i can't stand people like you.
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