This is a read-only archive of the old Scratch 1.x Forums.
Try searching the current Scratch discussion forums.

#26 2012-05-02 17:40:20

GeonoTRON2000
Scratcher
Registered: 2009-12-24
Posts: 1000+

Re: making smileys for the forum!

Try looking at the source for this: http://scratch.mit.edu/forums/viewtopic.php?id=95390

Last edited by GeonoTRON2000 (2012-05-03 19:24:09)


http://i.imgur.com/BAEgGDL.png

Offline

 

#27 2012-05-02 17:43:05

poemon1
Scratcher
Registered: 2011-01-12
Posts: 500+

Re: making smileys for the forum!

CAN SOMEONE HELP ME??!?!?!?!?!?!!?!!?!?!?!!?!?!!?!?!?!?!
THE MAIN CODE IS:

Code:

var url = ["http://img151.imageshack.us/img151/1473/96987141.jpg","http://img256.imageshack.us/img256/4245/61089077.png","http://img52.imageshack.us/img52/6139/angrywarrior.png"];
var thishtml = document.body.innerHTML;
thishtml = thishtml.replace("XP", "<img height='16' img width='16' img src='"+url[1]+"' />");
thishtml = thishtml.replace("XD", "<img height='16' img width='16' img src='http://img256.imageshack.us/img256/4245/61089077.png' />");
thishtml = thishtml.replace("::ANGRYWARRIOR::", "<img height='16' img width='16' img src='"+url[3]+"' />);
document.body.innerHTML = thishtml;

Whoever helps me gets 50 FREE MUSIC, and the next version of the emotes( Not even done yet)!!!


http://i47.tinypic.com/rrqe13.gif

Offline

 

#28 2012-05-02 23:25:44

GeonoTRON2000
Scratcher
Registered: 2009-12-24
Posts: 1000+

Re: making smileys for the forum!

poemon1 wrote:

CAN SOMEONE HELP ME??!?!?!?!?!?!!?!!?!?!?!!?!?!!?!?!?!?!
THE MAIN CODE IS:

Code:

var url = ["http://img151.imageshack.us/img151/1473/96987141.jpg","http://img256.imageshack.us/img256/4245/61089077.png","http://img52.imageshack.us/img52/6139/angrywarrior.png"];
var thishtml = document.body.innerHTML;
thishtml = thishtml.replace("XP", "<img height='16' img width='16' img src='"+url[0]+"' />");
thishtml = thishtml.replace("XD", "<img height='16' src='"+url[1]+"' />");
thishtml = thishtml.replace("::ANGRYWARRIOR::", "<img height='16' width='16' src='"+url[2]+"'  />");
document.body.innerHTML = thishtml;

Whoever helps me gets 50 FREE MUSIC, and the next version of the emotes( Not even done yet)!!!

Array indexes are 0-based.
Also, you had some wierd img attributes in your image tags.  Removed.
Hope it helps.
Code fixed.

P.S, I can tell you used my code because of the thishtml variable.  Also, the use of document.body.

Last edited by GeonoTRON2000 (2012-05-02 23:26:44)


http://i.imgur.com/BAEgGDL.png

Offline

 

#29 2012-05-03 18:36:16

poemon1
Scratcher
Registered: 2011-01-12
Posts: 500+

Re: making smileys for the forum!

Xd


http://i47.tinypic.com/rrqe13.gif

Offline

 

#30 2012-05-04 09:07:02

poemon1
Scratcher
Registered: 2011-01-12
Posts: 500+

Re: making smileys for the forum!

::angrywarrior::


http://i47.tinypic.com/rrqe13.gif

Offline

 

Board footer