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
Effector Set I for Alphamania
vList Utility
Find Drive Movie Is Plating From
PiMZ ImageImport
Graphic Puzzle Dragger
AX Icons
Word Wrangler Xtra
ECTI Editor
Set Sound Property of a Flash member
Select It
 

 

 

Behavior Simple slide show

Added on 9/14/2003

 

Compatibilities:
behavior D9 PC

This item has not yet been rated

Author: paenil1

Just click on the image to display the next. Will start over once it reaches the last image. The image name will be display in a field sprite (which you will specify). *created with Director MX Tip: You can compine this script with my other script - image import so you can put the images for your slide show externally.

--created by Lomi Paeniu 2003
--feel free to use this script as you like
--paenil1@hotmail.com
--drop me an email for any questions, suggestions or feedback


property pMember, pCastlib, pMemberlist, pNumMember, i, pName, pText

on getpropertydescriptionlist
  set description = [:]
  addprop description #pCastlib, [#format : #string, #default : "Internal", #comment : "Cast lib:"]
  addprop description #pText, [#format : #integer, #default : "", #comment : "Which sprite will display the description:"]
  return description
end  

on beginsprite me
  -- count number of members in castlib pCastlib
  pNumMember = the number of members of castLib pCastlib
  pNumMember = pNumMember + 1
  -- create list for all the members in castlib pCastlib
  set pMemberlist = []
  repeat with x = 1 to pNumMember -- repeat for the number of members in the castlib pCastlib
    -- get name of member x in castlib pCastlib
    pName = member(x,pCastlib).name
    -- add member name to list pMemberlist
    pMemberlist.add(pName)
  end repeat
  i = 2
  imagename()
end  

on mouseup me
  -- get name of member from list (position i)
  pMember = pMemberlist[i]
  -- change the image on stage to pMember
  set the member of sprite the currentSpriteNum to member pMember
  -- next position in list
  i = i + 1
  checkimage()
  imagename()
end

on checkimage me -- check to see if it has reach the end of the list pMemberlist
  if i = pNumMember then
    i = 1 -- refresh i if TRUE
  end if
end

on imagename me -- image description
  pNameText = member(the member of sprite the currentSpriteNum,pCastlib).name --get member name of current sprite/image
  sprite(pText).member.text = pNameText --apply the name to the field or text sprite
end  

 


Contact

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

Send e-mail