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)
Offline
CAN SOMEONE HELP ME??!?!?!?!?!?!!?!!?!?!?!!?!?!!?!?!?!?!
THE MAIN CODE IS:
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)!!!
Offline
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)
Offline