copy or move image from card to card
Posted: Wed Aug 15, 2007 1:22 am
I am working on building a stack to allow the user to open a graphic file from their computer, So far I have an image that is shown from an image object iData
Now I want to move or copy the image file (iData) to another card in the same stack, called "Template"
I thought of a number of ways to do this but I am a little fuzzy on some of the syntax,
I have an image object on the "template" card,
and called iData2, so I am wondering the best way to move the image from iData on card one, to the image object on card 2, iData2
using a button, script,
Any help is always appreciated, thanks
Tim
Code: Select all
--So I am putting the GetFileData function into iData from mouse up in button script
put GetFileData() into iData
--Multi platfrom Type, name the image file from function in card script
function GetFileData pPrompt, pMacType, pWinType, pTextOrBinary
 if pPrompt is empty then put "Select a file:" into pPrompt
 if the platform is "MacOS" then
  answer file pPrompt of type pMacType
 else
  answer file pPrompt with filter pWinType
 end if
 if it is empty then exit to top
set the filename of img "iData" to it
end GetFileData
Now I want to move or copy the image file (iData) to another card in the same stack, called "Template"
I thought of a number of ways to do this but I am a little fuzzy on some of the syntax,
I have an image object on the "template" card,
and called iData2, so I am wondering the best way to move the image from iData on card one, to the image object on card 2, iData2
using a button, script,
Any help is always appreciated, thanks
Tim