It appears you have not yet registered with DEVPPL. To register please click here... (it's fast, easy and free!)

Forum

Log In Sponsors
Board index Programming JavaScript Forum

Naive newbie question about graphics in game script

Naive newbie question about graphics in game script

Postby markgriffith on Sat May 16, 2009 3:16 am

I'm looking at an old Javascript script for the game Concentration, where small images of honey bees, flowers, fish etc are hidden under tiles.

Obviously, this is very naive of me - I'm a total beginner, but I cannot see how the images are loaded into the script. I suppose they're hidden under some 'array' term in a way I don't understand.

This is an old Brian Gosselin script for the game where he gives the script away free, so once again, my silly question is - where are the little pictures in the script!? I see only one .gif mentioned.

Thanks and apologies,

Mark
markgriffith
 
Posts: 6
Joined: Sat May 16, 2009 3:03 am

Re: Naive newbie question about graphics in game script

Postby markgriffith on Sat May 16, 2009 10:04 pm

Sorry it's such a boring question.
markgriffith
 
Posts: 6
Joined: Sat May 16, 2009 3:03 am

Re: Naive newbie question about graphics in game script

Postby rangana on Mon May 18, 2009 6:14 am

Hi Mark,

It would be a lot better if you could place in the script that you are using. It will help us easily understand what you're trying to point out.
User avatar
rangana
500+ Club
 
Posts: 935
Joined: Wed Feb 27, 2008 5:14 am
Location: Cebu City Philippines

Re: Naive newbie question about graphics in game script

Postby markgriffith on Mon May 18, 2009 2:15 pm

.

Thanks, rangana - will do.

Gratefully,

M

.
markgriffith
 
Posts: 6
Joined: Sat May 16, 2009 3:03 am

Re: Naive newbie question about graphics in game script

Postby markgriffith on Thu May 21, 2009 12:14 am

Here's the code :

function init(){
clearTimeout(id);
for(i=0;i<=35;i++)user[i]=0;
ticker=0; min=0; sec=0; ctr=0; finished=0;
oktoclick=true;
document.forms["f"].b.value="Resetting game table...";
scramble();
id=setInterval('runclk()', 995);
for(i=0;i<=35;i++){
document.images[('img'+i)].src="image0.gif";
document.images[('img'+i)].alt="";}}

http://gtscript.com/download-scripts...tion-5446.html

....apparently the graphics are "inside" the array loaded by the init function, though all I see resembling a graphic is
src="image0.gif";

In fact, I'm not even sure where the array is in that code. I was hoping to carefully replace the graphic images in the array..... if I could find them.

Should I just download the code to my laptop and see what gets sent along with the array?

many thanks and apologies!

mark G.
markgriffith
 
Posts: 6
Joined: Sat May 16, 2009 3:03 am

Re: Naive newbie question about graphics in game script

Postby markgriffith on Thu May 21, 2009 12:21 am

Gosh, just downloaded the code, and, sure enough, there all the graphics are in my folder.

I'm such a beginner.....
markgriffith
 
Posts: 6
Joined: Sat May 16, 2009 3:03 am

Re: Naive newbie question about graphics in game script

Postby markgriffith on Sat Jun 06, 2009 12:26 am

.

Dear rangana,

I wanted to thank you for your encouragement. About four days after you posted, so about 10 days ago, I downloaded the code, found the graphics file, redid the graphics into coloured Russian words with English translations, increased the size of the buttons, and got it to work.

Now obviously, this is not much of an accomplishment in coding terms! Apart from inserting a 'not' into the text {these graphics were not designed by my wife, because of course I am not Brian} I did nothing else, and still don't really understand any of the detail.

But I'd like to post the new script/game on this thread.... if I knew how. Do I just attach the .zip file? All terribly basic still, I'm afraid.

I guess I must accept advancing in small steps...

Gratefully,

Mark
markgriffith
 
Posts: 6
Joined: Sat May 16, 2009 3:03 am

Re: Naive newbie question about graphics in game script

Postby rangana on Sat Jun 06, 2009 5:47 am

Hi Mark,

Just zip it somewhere along the web and leave to us the URL so we could take a closer look.
User avatar
rangana
500+ Club
 
Posts: 935
Joined: Wed Feb 27, 2008 5:14 am
Location: Cebu City Philippines


Who is online

Users browsing this forum: No registered users and 3 guests