
-----------------------------------
SunsFan13
Tue Jun 03, 2008 2:17 pm

Can I Use This Picture?
-----------------------------------
Is there ANY way that I can use this picture?

http://img.photobucket.com/albums/v446/ka_vicious/jeopardy.gif

Obviously I can't use Pic.ScreenLoad due to the fact that its a GIF, is there another piece of code like screenload that I'm perhaps over looking?

-----------------------------------
apomb
Tue Jun 03, 2008 2:36 pm

RE:Can I Use This Picture?
-----------------------------------
loading screens arent for show, however, if you wanted to make it look the same in turing, set the image (sans moving black oval) as your background, then simply Draw.Filloval and loop it to do the same thing that one is doing.

-----------------------------------
SunsFan13
Tue Jun 03, 2008 3:39 pm

Re: RE:Can I Use This Picture?
-----------------------------------
loading screens arent for show, however, if you wanted to make it look the same in turing, set the image (sans moving black oval) as your background, then simply Draw.Filloval and loop it to do the same thing that one is doing.

Okay, I've got that.. Sort of.
I can make it draw as many ovals as I want, anywhere I want, but how do I get it so theres only ONE "moving"?
Do I have to make the loading bar a single colour so that I can just simply re-draw the oval over top of its self?

-----------------------------------
apomb
Tue Jun 03, 2008 3:43 pm

RE:Can I Use This Picture?
-----------------------------------
yeah, thats probably the best idea, i didnt really notice that the loading bar was a gradient. 

you'll need to draw the black one, then clear it, move the co-ords, and draw it again in the next position.

-----------------------------------
jeffgreco13
Tue Jun 03, 2008 4:03 pm

Re: Can I Use This Picture?
-----------------------------------
Since you want to animate the black circle across the bar you're going to want to play around with the "View" component of Turing. To animate, essentially you have to draw a screen then clear it then draw it again with the ball moved over a bit, then again, then again. Using a loop to change the x-coord and then clear-screen (cls) you could do that, but watch the insane flickering you'll see.


var cX:int:= 100 //starting x value
loop
if cX>=200 then
cx:=100
cls
else
Draw.FillOval(cX,50,10,10,black)
cX++
cls
end if
end loop


That will make it move but most likely have you seizure. So my advice is to play around with this tutorial:

http://compsci.ca/v3/viewtopic.php?t=12533

and use one of the View components to set a static background, ie) the main jeopardy picture. Then have the loop included with View.Update

-----------------------------------
SunsFan13
Tue Jun 03, 2008 4:06 pm

Re: Can I Use This Picture?
-----------------------------------
Oh man, I'll deffinatly give what you posted a shot, as this is what I have right now:


setscreen ( "graphics:850;510" )

Pic.ScreenLoad ("Jeopardy.bmp", 0, 0, picCopy)
loop
Draw.FillOval (217,23,5,9,black)
delay (150)
Draw.FillOval (217,23,5,9, gray)
delay (150)
Draw.FillOval (226,23,5,9,black)
delay (150)
Draw.FillOval (226,23,5,9, gray)
delay (150)
Draw.FillOval (236,23,5,9,black)
delay (150)
Draw.FillOval (236,23,5,9, gray)
delay (150)
Draw.FillOval (246,23,5,9,black)
delay (150)
Draw.FillOval (246,23,5,9, gray)
delay (150)
Draw.FillOval (256,23,5,9,black)
delay (150)
Draw.FillOval (256,23,5,9, gray)
delay (150)
Draw.FillOval (266,23,5,9,black)
delay (150)
Draw.FillOval (266,23,5,9, gray)
delay (150)
Draw.FillOval (276,23,5,9,black)
delay (150)
Draw.FillOval (276,23,5,9, gray)
delay (150)
Draw.FillOval (286,23,5,9,black)
delay (150)
Draw.FillOval (286,23,5,9, gray)
delay (150)
Draw.FillOval (296,23,5,9,black)
delay (150)
Draw.FillOval (296,23,5,9, gray)
delay (150)
Draw.FillOval (306,23,5,9,black)
delay (150)
Draw.FillOval (306,23,5,9, gray)
delay (150)
Draw.FillOval (316,23,5,9,black)
delay (150)
Draw.FillOval (316,23,5,9, gray)
delay (150)
Draw.FillOval (326,23,5,9,black)
delay (150)
Draw.FillOval (326,23,5,9, gray)
delay (150)
Draw.FillOval (336,23,5,9,black)
delay (150)
Draw.FillOval (336,23,5,9, gray)
delay (150)
Draw.FillOval (346,23,5,9,black)
delay (150)
Draw.FillOval (346,23,5,9, gray)
delay (150)
Draw.FillOval (356,23,5,9,black)
delay (150)
Draw.FillOval (356,23,5,9, gray)
delay (150)
Draw.FillOval (366,23,5,9,black)
delay (150)
Draw.FillOval (366,23,5,9, gray)
delay (150)
Draw.FillOval (376,23,5,9,black)
delay (150)
Draw.FillOval (376,23,5,9, gray)
delay (150)
Draw.FillOval (386,23,5,9,black)
delay (150)
Draw.FillOval (386,23,5,9, gray)
delay (150)
Draw.FillOval (396,23,5,9,black)
delay (150)
Draw.FillOval (396,23,5,9, gray)
delay (150)
Draw.FillOval (406,23,5,9,black)
delay (150)
Draw.FillOval (406,23,5,9, gray)
delay (150)
Draw.FillOval (416,23,5,9,black)
delay (150)
Draw.FillOval (416,23,5,9, gray)
delay (150)
Draw.FillOval (426,23,5,9,black)
delay (150)
Draw.FillOval (426,23,5,9, gray)
delay (150)
Draw.FillOval (436,23,5,9,black)
delay (150)
Draw.FillOval (436,23,5,9, gray)
delay (150)
end loop


It works, but its clearly not efficient.

-----------------------------------
richcash
Tue Jun 03, 2008 4:11 pm

Re: Can I Use This Picture?
-----------------------------------
You can use a for loop to shorten those to two Draw.FillOval's ().

EDIT ...and one delay.

You can use for loops like this in turing.
for x : 216 .. 436 by 10
end for
Can you figure it out?

-----------------------------------
Sean
Tue Jun 03, 2008 4:27 pm

Re: Can I Use This Picture?
-----------------------------------

Draw.FillBox (100,100,250,150,gray)

for loading : 100 .. 250
     delay (50)
     Draw.FillBox (loading,100,loading,150,black)
end for


Or you can make a loading bar like this, however, in retrospect, loading bars are pointless, when you are not loading anything.


Also, this is a rough example, not a good one to be using anyways. Just a reference.

-----------------------------------
SNIPERDUDE
Wed Jun 04, 2008 6:46 am

RE:Can I Use This Picture?
-----------------------------------
I don't know why no one has replied this way,
but PLEASE don't use fake loading bars!

They make the user wait for no reason and it is a waste of attention.

I am only saying this because when you do post your programme, you will be attacked at for that.

-----------------------------------
Sean
Wed Jun 04, 2008 7:00 am

Re: Can I Use This Picture?
-----------------------------------

Draw.FillBox (100,100,250,150,gray)

for loading : 100 .. 250
     delay (50)
     Draw.FillBox (loading,100,loading,150,black)
end for


Or you can make a loading bar like this, however, in retrospect, loading bars are pointless, when you are not loading anything.


Also, this is a rough example, not a good one to be using anyways. Just a reference.

Read the full posts Sniper, you'd see it.

-----------------------------------
SNIPERDUDE
Wed Jun 04, 2008 9:17 am

RE:Can I Use This Picture?
-----------------------------------
sorry, saw code for it and was thinking - why?

-----------------------------------
apomb
Wed Jun 04, 2008 9:27 am

RE:Can I Use This Picture?
-----------------------------------
No one really knows whether or not this program will indeed require a loading bar. so until there is a full program that we can see for sure if one is needed or not, try helping with the question at hand.

-----------------------------------
SunsFan13
Wed Jun 04, 2008 10:01 am

Re: Can I Use This Picture?
-----------------------------------
It does not require a loading bar, but our teacher basically said if we can include one, it will up our mark, so whatever.
Anyway, I'm finished, and simplified the code.


setscreen ("graphics:850;510")

Pic.ScreenLoad ("jeopardyloadingbar.bmp", 0, 0, picCopy)
var y:int:=0
for x:0..220 by 10
    Draw.FillOval (217+x, 23, 5, 9, y)
    delay (150)
    Draw.FillOval (217+x, 23, 5, 9, grey)
    delay (150)
   y:=y+1
   if y > 7 then
   y:=0
   end if
end for


Thanks to all those that helped.
