
-----------------------------------
rossco2004
Tue Dec 21, 2004 1:59 pm

[winoot 3.1.1a] Help importaing pictures
-----------------------------------
hey.
For school project I am making a Who Wants to be a Millionaire game, but am having problems importing images.

They are .jpg files.

This is teh code I am using:

var picID : array 1 .. 3 of int

picID (1) := Pic.FileNew ("logo.jpg")
Pic.Draw (picID (1), 1, 1, picCopy)
(well, the picture part anyway)

It works perfectly in Winoot 4.0.5 which I use at home, but when i tried it in 3.1.1a (which i have to use at school) i get this error:

"[unnamed, 10] Illegal Pic Identifier."
and it highlights "Pic.Draw (picID (1), 1, 1, picCopy)"

can someone please tell me how to make this work in winoot 3.1.1a?

(btw, i'm using an array because later on i need it to choose from 3 different images...it doesn't work as just plain picID either.)[/quote]

-----------------------------------
Cervantes
Tue Dec 21, 2004 3:06 pm


-----------------------------------
I don't think you can use .jpg pictures in pre- 4.x versions.

EDIT:

You can load 3 different types of pictures in Turing. They are PCX, BMP and TIM. 


turing 4.x also supports .jpg format. And you can also hope for .gif support in about 4-5 years from now.


http://www.compsci.ca/v2/viewtopic.php?t=191

-----------------------------------
rossco2004
Tue Dec 21, 2004 3:39 pm


-----------------------------------
I don't think you can use .jpg pictures in pre- 4.x versions.

EDIT:

You can load 3 different types of pictures in Turing. They are PCX, BMP and TIM. 


turing 4.x also supports .jpg format. And you can also hope for .gif support in about 4-5 years from now.



Thanks, that's probably it. 

I'll get back to you and let you know how if it worked. :)


edit: Nope, i'm still getting illegal pic identifier :(

-----------------------------------
Cervantes
Tue Dec 21, 2004 3:55 pm


-----------------------------------
did you switch to using .bmp?  or one of the other two?  or, did you [url=http://www.compsci.ca/v2/viewtopic.php?t=2996]update?

-----------------------------------
rossco2004
Tue Dec 21, 2004 6:50 pm


-----------------------------------
did you switch to using .bmp?  or one of the other two?  or, did you 
I converted the images to .bmp files and I still get the same error...

I do have that update at home, but at school I can't install it so i need to make my program work in 3.1.1a :(

-----------------------------------
Cervantes
Tue Dec 21, 2004 7:14 pm


-----------------------------------
If I remember correctly, error 10 means the pic was not successfully created, probably because it wasn't found.  
Is your picture in the same folder as your Turing file?  If not, type out the full path.  Or use .. to go up a level.

-----------------------------------
rossco2004
Tue Dec 21, 2004 8:01 pm


-----------------------------------
If I remember correctly, error 10 means the pic was not successfully created, probably because it wasn't found.  
Is your picture in the same folder as your Turing file?  If not, type out the full path.  Or use .. to go up a level.
 :oops: Yes that was it. I forgot about saving the turing file before using it... (basically, i was just copy and pasting the code from the good winoot into the old winoot[and not saving] then trying to run).


Music.PlayFileLoop doesn't work though...is there a way to have the music file loop in the old winoot?

-----------------------------------
Cervantes
Tue Dec 21, 2004 8:37 pm


-----------------------------------

process playMusic
    loop
        Music.PlayFile ("c:/My documents/my music/Alan Price/Alan Price - O Lucky Man.mp3")
    end loop
end playMusic
fork playMusic

O Lucky Man, third time straight!  :hb: 
owww,, too much!!

-----------------------------------
rossco2004
Tue Dec 21, 2004 10:32 pm


-----------------------------------

process playMusic
    loop
        Music.PlayFile ("c:/My documents/my music/Alan Price/Alan Price - O Lucky Man.mp3")
    end loop
end playMusic
fork playMusic

O Lucky Man, third time straight!  :hb: 
owww,, too much!!
lol the program freaks out with the forks.
But thanks anyway, i think i can find a workaroud to this. :)

-----------------------------------
w00t
Wed Dec 22, 2004 10:03 am


-----------------------------------
for playing music, you can just write 

for a : 1 ..3 
     Music.PlayFile ("balh blah balh.mp3")
end for

just write in the for loop how many times you want to play it, its alot smoother on my comuter an i use 3.1.1.a aswell! Blah blah blah would be the path for the computer to follow to retrieve the music.

w00t

-----------------------------------
rossco2004
Wed Dec 22, 2004 10:49 am


-----------------------------------
for playing music, you can just write 

for a : 1 ..3 
     Music.PlayFile ("balh blah balh.mp3")
end for

just write in the for loop how many times you want to play it, its alot smoother on my comuter an i use 3.1.1.a aswell! Blah blah blah would be the path for the computer to follow to retrieve the music.

w00t
wouldn't that be just as slow\fast as the loop+fork?

works fine anyway.

when i'm done i'll post the program for you guys to see. although the images and sounds make it over 3mb :(
