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

Username:   Password: 
 RegisterRegister   
 Looking for Help with Picture Transitions In Turing
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
joshuabaker




PostPosted: Thu Nov 20, 2008 9:45 am   Post subject: Looking for Help with Picture Transitions In Turing

Hello,

I am creating a final project in computer prograrming and i need help to creat a picture effect. I am trying to make a photo viewing program attached is the code.

What i have right now is a set of buttons that will let the user select files in the directory to create the slide show i just need to know how to create transitions bettween the two in the code:

-----------------------------------------------------
Turing:
loop
    cls
    colorback (black)
    Pic.ScreenLoad(file1,125,175,picCopy)
    delay (delay1)
    cls
    Pic.ScreenLoad(file2,125,175,picCopy)
    delay (delay2)

end loop

-------------------------------------------------------

Turing:
import GUI
setscreen ("graphics:1024;768")
var fileName : array 1 .. 100 of string    % assign 100 empty string var for the fileName
var streamNumber : int    % assign 100 empty int var for the streamNumber
var filename : array 1..100 of string
var k := 1      % initiate first streamNumber and fileName index
var file1 : string :=""
var file2 : string :=""
var delay1, delay2 :  int
var awnserdelay : string

procedure powerpoint
colorback (black)
color (gray)
var font1, font2 : int
font2 := Font.New ("Tahoma:12")
font1 := Font.New ("Tahoma:18:bold")
assert font1 > 0 and font2 > 0
Font.Draw ("Power Point 2009", 370, 700, font1, gray)
Font.Draw ("By Josh Baker", 425, 680, font2, white)
Font.Free (font1)
Font.Free (font2)

locate (8,5)

put"Would You like to set the Delay, the defult is 1000?"
get awnserdelay
    if awnserdelay = "Y" or awnserdelay = "Yes" or awnserdelay = "yes" or awnserdelay = "y" then
    put "what would you like to set the delay to?"
    get delay1
    put "what would you like to set the second delay to?"
    get delay2
    else
    delay1:=1000
    delay2:=1000
    end if
cls

loop
cls
colorback (black)
Pic.ScreenLoad(file1,125,175,picCopy)
delay (delay1)
cls
Pic.ScreenLoad(file2,125,175,picCopy)
delay (delay2)

end loop
end powerpoint


streamNumber := Dir.Open (".")      % open current directory
assert streamNumber > 0             % check for success
for i : 1 .. 2
                         
    fileName (k) := Dir.Get (streamNumber)  % the first 2 filenames will always be the current directory and the parent directory.
    exit when fileName (k) = ""                 % we cannot delete those yet

end for
loop
    fileName (k) := Dir.Get (streamNumber)  % get the first file name
    exit when fileName (k) = ""         % exit if there are no more files

    k:=k+1
end loop

proc button1
if file1 = "" then
file1:=fileName(1)
put file1
put file1
elsif file2 = "" then
file2:=fileName(1)
put file2
end if
end button1
proc button2
if file1 = "" then
file1:=fileName(2)
elsif file2 = "" then
file2:=fileName(2)
end if
end button2
proc button3
if file1 = "" then
file1:=fileName(3)
elsif file2 = "" then
file2:=fileName(3)
end if
end button3
proc button4
if file1 = "" then
file1:=fileName(4)
elsif file2 = "" then
file2:=fileName(4)
end if
end button4
proc button5
if file1 = "" then
file1:=fileName(5)
elsif file2 = "" then
file2:=fileName(5)
end if
end button5
proc button6
if file1 = "" then
file1:=fileName(6)
elsif file2 = "" then
file2:=fileName(6)
end if
end button6
proc button7
if file1 = "" then
file1:=fileName(7)
elsif file2 = "" then
file2:=fileName(7)
end if
end button7
proc button8
if file1 = "" then
file1:=fileName(8)
elsif file2 = "" then
file2:=fileName(8)
end if
end button8
proc button9
if file1 = "" then
file1:=fileName(9)
elsif file2 = "" then
file2:=fileName(9)
end if
end button9
proc button10
if file1 = "" then
file1:=fileName(10)
elsif file2 = "" then
file2:=fileName(10)
end if
end button10
proc button11
if file1 = "" then
file1:=fileName(11)
elsif file2 = "" then
file2:=fileName(11)
end if
end button11
proc button12
if file1 = "" then
file1:=fileName(12)
elsif file2 = "" then
file2:=fileName(12)
end if
end button12
proc button13
if file1 = "" then
file1:=fileName(13)
elsif file2 = "" then
file2:=fileName(13)
end if
end button13
proc button14
if file1 = "" then
file1:=fileName(14)
elsif file2 = "" then
file2:=fileName(14)
end if
end button14
proc button15
if file1 = "" then
file1:=fileName(15)
elsif file2 = "" then
file2:=fileName(15)
end if
end button15
proc button16
if file1 = "" then
file1:=fileName(16)
elsif file2 = "" then
file2:=fileName(16)
end if
end button16
for i : 1..16
var btn:int:=GUI.CreateButton (0,0,10,fileName(1),button1)
exit when fileName(2)=""
var btn1:int:=GUI.CreateButton (0,30,10,fileName(2),button2)
exit when fileName(3)=""
var btn2:int:=GUI.CreateButton (0,60,10,fileName(3),button3)
exit when fileName(4)=""
var btn3:int:=GUI.CreateButton (0,90,10,fileName(4),button4)
exit when fileName(5)=""
var btn4:int:=GUI.CreateButton (0,120,10,fileName(5),button5)
exit when fileName(6)=""
var btn5:int:=GUI.CreateButton (0,150,10,fileName(6),button6)
exit when fileName(7)=""
var btn6:int:=GUI.CreateButton (0,180,10,fileName(7),button7)
exit when fileName(8)=""
var btn7:int:=GUI.CreateButton (0,210,10,fileName(8),button8)
exit when fileName(9)=""
var btn8:int:=GUI.CreateButton (0,240,10,fileName(9),button9)
exit when fileName(10)=""
var btn9:int:=GUI.CreateButton (0,270,10,fileName(10),button10)
exit when fileName(11)=""
var btn10:int:=GUI.CreateButton (0,300,10,fileName(11),button11)
exit when fileName(12)=""
var btn11:int:=GUI.CreateButton (0,330,10,fileName(12),button12)
exit when fileName(13)=""
var btn12:int:=GUI.CreateButton (0,360,10,fileName(13),button13)
exit when fileName(14)=""
var btn13:int:=GUI.CreateButton (50,0,10,fileName(14),button14)
exit when fileName(15)=""
var btn14:int:=GUI.CreateButton (50,30,10,fileName(15),button15)
exit when fileName(16)=""
var btn15:int:=GUI.CreateButton (50,60,10,fileName(16),button16)
exit when fileName(17)=""
end for
delay (1000)
loop
    exit when GUI.ProcessEvent
end loop
Sponsor
Sponsor
Sponsor
sponsor
Insectoid




PostPosted: Thu Nov 20, 2008 12:32 pm   Post subject: RE:Looking for Help with Picture Transitions In Turing

The only thing I can think of is Pic.Blur. It blurs the images within a specified box (I think). Turing isn't that good at handling/modifying pictures.
SNIPERDUDE




PostPosted: Thu Nov 20, 2008 10:20 pm   Post subject: RE:Looking for Help with Picture Transitions In Turing

True, Turing is a little slow to handle pictures in real time. Also, methinks you should look into arrays and for loops to make your coding alot cleaner. Check out the Turing Walkthrough.
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  [ 3 Posts ]
Jump to:   


Style:  
Search: