Help with Image and Video Player plzzzzzzzzzz

Visuals, audio, animation. Blended, not stirred. If LiveCode is part of your rich media production toolbox, this is the forum for you.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

eg4am1
Posts: 17
Joined: Tue Mar 06, 2007 12:51 am

doesnt make any sense :(

Post by eg4am1 » Thu Mar 08, 2007 1:11 am

hiya i downloaded the "collapsing toolbar" from the open stack gallery. tried my level best to decode it and see if i can use it in my project but i cant :cry: :cry: . forst of all i cant see any of the script for the font utilities :cry: even though it seems like the roght kind of option for my project.. what do you suggest ?
kind regards asim

marielle
Livecode Opensource Backer
Livecode Opensource Backer

Post by marielle » Thu Mar 08, 2007 12:35 pm

You may have to take it slowly and learn one feature at a time. The important information is that you can't have access to a font formatting palette like you were used to in VB. The first question to have is "how important is this"? Then if it is important, have a look at textSize, textFont, textstyle in the docs ;-).
Last edited by marielle on Tue Mar 13, 2007 12:17 am, edited 1 time in total.

eg4am1
Posts: 17
Joined: Tue Mar 06, 2007 12:51 am

hello

Post by eg4am1 » Mon Mar 12, 2007 3:42 pm

hiya
i manage to sort out the text editing option. thanks for that. i have one more question though if you dont mind.
i want to allow the user to save his work i know "that the following command i can use to open a dialogue box, but how do i actually allow user to save his work on the hard disk
"ask file "save file:" with filter "Run rev file,*.rev" "

kind regard asim

marielle
Livecode Opensource Backer
Livecode Opensource Backer

Re: hello

Post by marielle » Mon Mar 12, 2007 7:35 pm

Hi Asim,

Progressing fast ;-).

Could be something like this (you may have to correct).

Code: Select all

ask file "save file:" with filter "Run rev file,*.rev"
put it into tFilePath
if tFilePath is empty then
    -- no name was defined or the user pressed on the cancel button. 
    -- most likely, we want to exit the current handler.  
else if there is a file tFilePath then
  --- oups the file already exists... maybe we don't want to overwrite it. 
end if
put the text of field "myField" into tFileContent
-- given that you offered font formatting options, you almost certainly
-- want to export formatted text, then use htmltext or rtftext.
put tFileContent into URL ("file:" & tFilePath)

eg4am1
Posts: 17
Joined: Tue Mar 06, 2007 12:51 am

Post by eg4am1 » Mon Mar 12, 2007 9:47 pm

Thnx Marielle..
you have been a great help ....
Kind regards Asim

eg4am1
Posts: 17
Joined: Tue Mar 06, 2007 12:51 am

Post by eg4am1 » Thu Mar 15, 2007 1:34 pm

hiya marielle
the code you gave me to save a file worked had to do some changes in it but now it seems to be saving files on harddisk. though these files are not runrev format. i.e i can open them from runrev.. is that normal ?
kind regards asim

eg4am1
Posts: 17
Joined: Tue Mar 06, 2007 12:51 am

hello again

Post by eg4am1 » Mon Apr 16, 2007 11:16 am

hi i hope that you are ok.
i am almost finished with my project but there is one last specification left and i was wondering if you can help ! .
i need to send the file i created on runrev to a remote location via ftp. it needs to be dont so that the user can click send file from my created program and able to send the file to a specified computer ! .
any sugguestion you might have
kind regards asim

marielle
Livecode Opensource Backer
Livecode Opensource Backer

Re: hello again

Post by marielle » Mon Apr 16, 2007 2:23 pm

Hiya,

Why not check ftp in the doc? Something in this vein should do:

Code: Select all

put URL ("file:" & "myfile.txt") into URL "ftp://username:password@ftp.example.net/file.txt"
In the doc, look for "libURLftpCommand" if you need more complex functionalities

eg4am1
Posts: 17
Joined: Tue Mar 06, 2007 12:51 am

Post by eg4am1 » Thu Apr 19, 2007 11:50 am

Thanks Marielle
i am really excited as this project reaches to an end .. :) and by the way i used the following script for the ftp
on mouseUp

answer file "Select a file to upload"
if it is not empty then
put it into tSourcePath
set the itemDel to "/"
put last item of tSourcePath into tFileName

put "ftp://"& field "user" & ":" & field "pass"& "@" & field "server" & tFileName into tUrl
libUrlFtpUploadFile tSourcePath, tUrl, "loadDone"
end if

end mouseUp

on loadDone pUrl, pStatus
put pStatus into field "status"
if pStatus is not "uploaded" then
answer "Upload failed"
end if
if pStatus is "uploaded" then
answer "upload sucsessful"
end if
unload url pUrl
end loadDone


I have one last question and then thats it no more bugging you ! lol .. is there any way using runtime revolution i can open up rev file saved in a specific folder automatically after certain time interval ? ?

kind regards Asim

marielle
Livecode Opensource Backer
Livecode Opensource Backer

Post by marielle » Thu Apr 19, 2007 12:16 pm

eg4am1 wrote:i am really excited as this project reaches to an end .. :) and by the way i used the following script for the ftp
You were fast getting a grip on this :-) and thanks for sharing the code.

For automatizing, check out "send xxx in xxx ticks" or "idle" (though best is to avoid it as it can be hard on CPU).

With send in you will have:

Code: Select all

on files.openthem
   ... opening files business ...
   send files.autobackup to me in 300 seconds
end files.openThem

on files.backupThem
   ... do backup business ...
end files.backupThem

on files.autobackup
  if doAutomatedBackup is false then exit files.autobackup
          -- useful in case you want to momentarily suspend this function
          -- as when read/write operations are performed on the files, 
          -- elsewhere in the code
  files.backupThem
  send files.autobackup to me in 300 seconds
end files.autobackup
(typed on the fly, you may need to adapt it... ah, yes, I believe you want to re-open the files rather than backup them)

Marielle

eg4am1
Posts: 17
Joined: Tue Mar 06, 2007 12:51 am

Post by eg4am1 » Thu Apr 19, 2007 12:34 pm

thnx for that quick reply .. though u got me cofused.. i was reading through the code and coudlnt figure out 2 things..
1) where is the path defined ? ? where it wil lookup fo runrev files
2) where will this cod go .. and he stack script ? ?

kind regards asim

marielle
Livecode Opensource Backer
Livecode Opensource Backer

Post by marielle » Thu Apr 19, 2007 12:57 pm

eg4am1 wrote:where is the path defined ? ? where it wil lookup fo runrev files

Code: Select all

set the defaultfolder to tPathWhereTheFilesAre
Then any time you use the files, the folder, or put 'myFileContent into URL ("file:" & "myfile.txt")', this will be relative to that path.

marielle
Livecode Opensource Backer
Livecode Opensource Backer

Post by marielle » Thu Apr 19, 2007 1:01 pm

eg4am1 wrote:where will this cod go .. and he stack script
Anywhere you find it convenient 'send to me' means that it will send to the object that made the call (="me"), so it doesn't need to be in the topstack.

eg4am1
Posts: 17
Joined: Tue Mar 06, 2007 12:51 am

almost there

Post by eg4am1 » Wed Apr 25, 2007 7:56 pm

hiya Marielle
i m back with a few more tricky question... my apllication is almost done i shall submit it here once its finished if possible. for now i am just brushing up final touches and have found a few bugs i hope you can clarify them
1) a while back i asked you how can i allow a user to save runrev file and with a bit of research and ur help i used the following code
put it into tFilePath
ask file "save file:" with filter "Run rev file,*.rev"
if tFilePath is empty then
-- no name was defined or the user pressed on the cancel button.
-- most likely, we want to exit the current handler.
else if there is a file tFilePath then
--- if the file already exists... maybe we don't want


i think the problem with this code is that even though i can sucsessfully save a file ...it wont save them as a runrev file i.e they cant be opened up back again ! ! any suggestion why ? ?.

2) in my last reply i asked you how can i automatically open runrev files after specific time interval and you send the following code

on files.openthem
... opening files business ...
send files.autobackup to me in 300 seconds
end files.openThem

on files.backupThem
... do backup business ...
end files.backupThem

on files.autobackup
if doAutomatedBackup is false then exit files.autobackup
-- useful in case you want to momentarily suspend this function
-- as when read/write operations are performed on the files,
-- elsewhere in the code
files.backupThem
send files.autobackup to me in 300 seconds
end files.autobackup


a few problem i found .. first of all as there is no extension specified hence it doesnt open any files ... basically what i required was that one the user has sent the runrev file via FTP to the server there will be another application (made in runren) running on the server which looks into a specific folder and if there are any runrev files (which have been sent by the user) there, it opens them up diplays them one after another after 15 odd seconds.. let me know what you think ! is it possible to do such a thing through runrev ? ?
kind regards asim

marielle
Livecode Opensource Backer
Livecode Opensource Backer

Re: almost there

Post by marielle » Wed Apr 25, 2007 10:38 pm

eg4am1 wrote:i think the problem with this code is that even though i can sucsessfully save a file ...it wont save them as a runrev file i.e they cant be opened up back again ! ! any suggestion why ? ?.
Hi Asim,

It may help for me to know what is it that you are trying to save? The stack itself? You only need to use "save this stack" for this. Another stack? Again, if a stack has been created, that stack can be saved with a save stack call. If you want to overwrite the filename, then you should use "save stack [as filePath]"

If what you are trying to save is not a runrev stack, then best would be to save it with a different extension.

Post Reply