|
|
|
Import image (at runtime)
Added on 9/12/2003
|
|
Compatibilities:
Required Xtras:
Buddy API
|
This item has not yet been rated
|
This script allows you to import external images into your director movie at run time. Made with the help of mediamacros. Requires Buddy API xtra.
Tip: Combine it with mediamacros Slideshow behaviour and you'll get yourself a dynamic slideshow movie. :-)
Enjoy
--Created by Lomi Paeniu 2003
--Feel free to use this script for any purpose you like
--email me any suggestions, feedback or any questions you have.
--paenil1@hotmail.com
property pFileCount
property pMember
property pDirectory
Property pFileType
property pFileName
property pCastlib
on getpropertydescriptionlist
set description = [:]
addprop description #pDirectory, [#format : #string, #default : "", #comment : "Image Folder (include the after):"]
addprop description #pFiletype, [#format : #string, #default : "*.jpg", #comment :"File Type", #range : ["*.jpg","*.bim"]]
addprop description #pCastlib, [#format : #string, #default : "", #comment : "Which cast lib:"]
return description
end
on beginSprite me
--list and count files
f = baFileList(the moviePath & pDirectory,pFileType)
pFileCount = f.count
r = 1
-- while loop
repeat with x = 1 to pFileCount
--get the file name
pName = f[r]
--then import it
pMember = new(#bitmap, castlib pCastlib)
pMember.importFileInto(the moviePath & pDirectory & f[r])
--apply the file name to the new member
member(pMember).name = pName
-- move to next empty member spot
pMember = pMember + 1
r = r + 1
end repeat
end
|
|