Contents
Articles
Behaviors
Books
Director News
Director Web Sites
FAQ
Games
Mailing Lists
News Groups
Project Examples
Reviews
Software
Tools
Useful Web Sites
Utilities
Xtras

Don't miss these
Wait for cuePoint behavior
Roil Button-Alphamania
Graphic Drag on top
Dave's 3D engine V7.1
Volume Behaviour (Buttons)
External Casts in Shockwave
Function Key Keycodes
Shockwave Remote Faq
ProMusicLoops
Vector Shapes - Create Donut
 

 

 

Behavior Import image (at runtime)

Added on 9/12/2003

 

Compatibilities:
behavior D8_5 D9 PC

Required Xtras:
Buddy API

This item has not yet been rated

Author: paenil1

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

 


Contact

MMI
36 South Court Sq
Suite 300
Newnan, GA 30263
USA

Send e-mail