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
Play and Review Flash
Play Backward Until Marker and Jump
Amara Flash Photo Animation Software
Stream FlashMember (Frame Script,Cast member as Reference)
RoboHelp 5 Review
Mark's Taskbar v2
Case sensitive string comparison
Tabuleiro Nebulae MultiUserServer
Puzzler II - Slide Puzzle
Lingo Web Logs / Journals
 

 

 

Behavior Animation on MouseUp

Added on 11/19/1999

 

Compatibilities:
behavior D6_5 D7 D8 Mac PC Shockwave

This item has not yet been rated

Author: CicicDejan

Plays sequences of images on mouseUp, at same frame. Aply behavior to sprite, select number of images for animation, select pause (in ticks) between them. Image names should be named by following convention:Naming convention is: base image (click on image)- without index, images to folow - with 1,2,3,etc indexes. At the end of animation returns base (clicked) image.

--animation on MouseUp
--by Dejan Cicic
--Plays sequences of images on mouseUp.
--Naming convention is: base image - without index, images to folow - with
1,2,3,etc indexes.
--At the end of animation returns base (clicked) image.
--Select number of images and pause between them.
Property MySprite
Property MyCurrentMember
Property MyLastMember
property NumberOfTicks
property MyFlag
property MyOldMember
property MyRootName
on beginSprite me
  set MyFlag to false
  set MySprite to the spriteNum of me
  set MyCurrentMember=the member of sprite mySprite
  set myOldMember=MyCurrentMember
end

on  ExitFrame  me
  if myflag then
    repeat with i=1 to MyLastMember
      set myCurrentMember =the name of member myOldMember&i
      set the member of sprite mySprite=myCurrentMember
      updatestage
       makePause
    end repeat
    set myFlag to false
    set the member of sprite mySprite=MyoldMember
  end if

end  ExitFrame
on makePause me
  startTimer
  set startTicks = the timer
  set endTicks=startTicks + NumberOfTicks
  repeat while the timer    nothing
  end repeat
end
on  MouseUp  me
  set myFlag=true
end  MouseUp

on getPropertyDescriptionList
  Properties = [:]
  AddProp Properties,#MyLastMember,
[#Default:"1",#Format:#Integer,#range:[#min:1, #max:20],#Comment:"Number of Members to
play"]
  AddProp Properties,#NumberOfTicks,
[#Default:"10",#Format:#Integer,#range:[#min:10, #max:120],#Comment:"Number
of tiks
between members"]
  Return Properties
end getPropertyDescriptionList

on getBehaviorDescription
  BehDescription = "Plays sequences of images on mouseUp. Naming convention is: base image - without index, images to folow - with 1,2,3,etc indexes. At the end of animation returns base image. Select number of images and pause between them."
  Return BehDescription
end getBehaviorDescription

on getBehaviorTooltip
  ToolTip = "Plays sequences of images on mouseUp. Naming convention is: base image - without index, images to folow - with 1,2,3,etc indexes."
  Return ToolTip
end getBehaviorTooltip

 


Contact

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

Send e-mail