This content has been marked as final. Show 6 replies
Instead of linking the images, either create bitmap members dynamically, or
have placeholders and set their fileName property. You can get a list of
files in a folder using getNthFileNameInFolder, or FileXtra4 or a number of
others. Then you don't need a naming convention either, unless you use it
for other reasons, as you can just grab the first 20 jpegs you find in the
Adobe Community Expert
Ah, I see. Very simple. What I was missing (that I now see is clearly
documented) is that "You can also make unlinked media linked by setting the
filename of those types of members that support linked media. "
I also see that if I set its fileName property to zero, I can unlink it. I
presume that I need to do this somewhere, because the cast member will
become linked while I am editing the program. Where would be a good place to
unlink the cast members to ensure that they get saved as unlinked before I
>>Where would be a good place to unlink the cast members to ensure that they
>>get saved as unlinked before I package?
on stopMovie should work nicely. You could create the bitmap members on the
fly and erase them when you're through.
Adobe Community Expert
Great help, thanks!
Could a n00b like me get a snippet of sample code to execute such a function - using the "getNth..." method noted above? I have currently 5 images set up to crossfade in a slideshow like format. It would be great to be able to give the clients any number of images to select from depending on whether they've dropped them into an assets folder...
Thanks in advance!
OK, here is a script that (when the movie starts) dynamically creates a new
bitmap cast member for each bitmap image in a folder called AssetFolder. It
then makes each member linked to the external bitmap file. It also creates a
list called gDynamicBitmapMembers, so that you can reference individual cast
members as needed. Beware that some of the lines in the code snippet below
may get word wrapped by your news reader.
gDynamicBitmapMembers = 
n = 1
repeat while getNthFileNameInFolder(the moviePath & "AssetFolder", n) <>
gDynamicBitmapMembers[n].fileName = the moviePath & "AssetFolder\" &
getNthFileNameInFolder(the moviePath & "AssetFolder", n)
n = n + 1