Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 [winoot 3.1.1a] Help importaing pictures
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
rossco2004




PostPosted: Tue Dec 21, 2004 1:59 pm   Post subject: [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:

Quote:
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]
Sponsor
Sponsor
Sponsor
sponsor
Cervantes




PostPosted: Tue Dec 21, 2004 3:06 pm   Post subject: (No subject)

I don't think you can use .jpg pictures in pre- 4.x versions.

EDIT:
Hacker Dan wrote:

You can load 3 different types of pictures in Turing. They are PCX, BMP and TIM.

tony wrote:

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




PostPosted: Tue Dec 21, 2004 3:39 pm   Post subject: (No subject)

Cervantes wrote:
I don't think you can use .jpg pictures in pre- 4.x versions.

EDIT:
Hacker Dan wrote:

You can load 3 different types of pictures in Turing. They are PCX, BMP and TIM.

tony wrote:

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

Thanks, that's probably it.

I'll get back to you and let you know how if it worked. Smile


edit: Nope, i'm still getting illegal pic identifier Sad
Cervantes




PostPosted: Tue Dec 21, 2004 3:55 pm   Post subject: (No subject)

did you switch to using .bmp? or one of the other two? or, did you update?
rossco2004




PostPosted: Tue Dec 21, 2004 6:50 pm   Post subject: (No subject)

Cervantes wrote:
did you switch to using .bmp? or one of the other two? or, did you update?

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 Sad
Cervantes




PostPosted: Tue Dec 21, 2004 7:14 pm   Post subject: (No subject)

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




PostPosted: Tue Dec 21, 2004 8:01 pm   Post subject: (No subject)

Cervantes wrote:
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.

Embarassed 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




PostPosted: Tue Dec 21, 2004 8:37 pm   Post subject: (No subject)

code:

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! Head Bang
owww,, too much!!
Sponsor
Sponsor
Sponsor
sponsor
rossco2004




PostPosted: Tue Dec 21, 2004 10:32 pm   Post subject: (No subject)

Cervantes wrote:
code:

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! Head Bang
owww,, too much!!

lol the program freaks out with the forks.
But thanks anyway, i think i can find a workaroud to this. Smile
w00t




PostPosted: Wed Dec 22, 2004 10:03 am   Post subject: (No subject)

for playing music, you can just write

code:
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




PostPosted: Wed Dec 22, 2004 10:49 am   Post subject: (No subject)

w00t wrote:
for playing music, you can just write

code:
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 Sad
Display posts from previous:   
   Index -> Programming, Turing -> Turing Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 11 Posts ]
Jump to:   


Style:  
Search: