Import Referenced control??
Richard Gaskin
ambassador at fourthworld.com
Thu Jan 2 15:39:01 EST 2003
MFitz53 at cs.com wrote:
> I'm making a little slideshow app to put on a cd with a collection of photos.
> Before I can go any further with this, I have a little problem that I need to
> deal with. Just to see if I could get the pictures to show up, I scripted the
> field containg all of the titles as follows.
>
>
> on mouseUp
> put the value of the clickLine into photoToShow
> put the cphotoFolderPath of this stack into folderPath--(set in answer folder
> btn script)
> import paint from file folderPath& "/"&photoToShow
> wait 10 seconds
> hide image photoToShow
> send "choose browse tool "to me in 5 ticks
> end mouseup
>
> At the time I did not realize that this is the same as "Import as Control"
> from the file menu, so I very quickly slowed my stack to a crawl from
> accumulating a few rather large image files.
>
> Is there a way to do this by scripting in a referenced control?
Just place an image on your card and use this script:
on mouseUp
put the value of the clickLine into photoToShow
put the cphotoFolderPath of this stack into folderPath
set the filename of img 1 to (folderPath& "/"&photoToShow)
wait 10 seconds
hide image 1
send "choose browse tool "to me in 5 ticks
end mouseup
--
Richard Gaskin
Fourth World Media Corporation
Developer of WebMerge 2.1: Publish any database on any site
___________________________________________________________
Ambassador at FourthWorld.com http://www.FourthWorld.com
Tel: 323-225-3717 AIM: FourthWorldInc
More information about the use-livecode
mailing list