Search content:

 

Personal Menu
Username:
Password:
Save password

Become a member

Forgot Password?

 

Don't miss these
AutoSave
Limited Fields
Title Bar Color Gradient Effect Behavior
Enable/Disable FullScreen of DirectMedia Sprite
Magnify-Alphamania
sequenceXtra
Outline Text - Imaging Lingo
Date Time Xtra
ESCAPE Video Studio
Play/Pause/Rewind Video Sprite
MediaMacros Xtras Mall
 

 

 

Behavior Flash Movie Controls

Added on 8/14/2000

 

Compatibilities:
behavior D7 D8 Mac PC Shockwave

This item has not yet been rated

Author: Shehal (website)

5 types of Control Play: Plays movie at normal speed Rewind: Rewinds movie Stop: Stops and goes to the begining of the movie Pause: Pauses movie FastFwd: Plays movie at 4 times the normal speed

-- Flash Movie Controls
-- 5 types of Control
-- Play: Plays movie at normal speed
-- Rewind: Rewinds movie
-- Stop: Stops and goes to the begining of the movie
-- Pause: Pauses movie
-- FastFwd: Plays movie at 4 times the normal speed
-- visit my shockwave site
-- http://www.unixville.com/~shehal/
-- mailto: shehal@mediasolv.com
-- MediaSolv.com office login: shehal
-- wapOA login: shehal
-- visit RISSA"s site
-- http://www.geocities.com/~marissaj

property flashList
property flashSprite
property buttonAction
property flashMember
property normalRate

global flashMoviePlaying

on beginSprite me
  flashMember = sprite(flashSprite).member
  set the directToStage of flashMember = TRUE
  set the playBackMode of flashMember = #normal
  normalRate = the frameRate of flashMember
  flashMoviePlaying = FALSE
end beginSprite

on mouseUp me
  case buttonAction of
    "Play":
      if flashMoviePlaying = FALSE then
        stop sprite (flashSprite)
        set the playBackMode of flashMember = #normal
        play sprite (flashSprite)
        flashMoviePlaying = TRUE
      end if
      
    "Rewind":
      stop sprite (flashSprite)
      rewind sprite (flashSprite)
      play sprite (flashSprite)
      flashMoviePlaying = FALSE
      
    "Stop":
      stop sprite (flashSprite)
      rewind sprite (flashSprite)
      flashMoviePlaying = FALSE
      
    "Pause":      
      stop sprite (flashSprite)
      hold sprite (flashSprite)
      flashMoviePlaying = FALSE
      
  end case
end mouseUp

on mouseDown me
  if buttonAction = "FastFwd" then
    set the playBackMode of flashMember = #fixed
    stop sprite (flashSprite)
    set the fixedRate of member flashMember to (4*normalRate)
    play sprite (flashSprite)
  else
    set the playBackMode of flashMember = #normal
  end if
end mouseDown

on verifyFlash n
  return sprite (n).member.type = #Flash
end verifyFlash

on getFlashSpriteList
  flashList = []
  repeat with i = 1 to the lastChannel
    if verifyFlash (i) then
      add flashList, i
      put the type of the member of sprite (i)
    end if
  end repeat
  return flashList
end getFlashSpriteList

on mErrorAlert me, fError, fData
  fBehaviorName = string (me)
  delete word 1 of fBehaviorName
  delete the last word of fBehaviorName
  delete the last word of fBehaviorName
  case fData.ilk of
    #void: fData = ""
    #symbol: fData = "#" & fData
end case
  
  case fError of
    #getPDLError:
     return [#getPDLError: [#comment: "CANCEL: Sprite MUST be one of the following  member types:"& RETURN & fData, #format: #symbol, #range: [#Cancel], #default: #Cancel]]
   #noFlash:
     alert "No Flash sprites are currently on the screen"
end case
end fErrorAlert

on getPropertyDescriptionList me
  if not the currentSpriteNum then
    exit
  end if
  
  flashMovie = getFlashSpriteList ()
  if not flashMovie.count then
    return fErrorAlert (me, #noFlash)
  else
    PDL = [:]
    setaProp PDL, #flashSprite, [#comment: "Flash sprite channel", #format: #string, #default: flashMovie[1], #range: flashMovie]
    setaProp PDL, #buttonAction, [#comment: "Video button action", #format: #string, #default: "Play", #range: ["Rewind", "Stop", "Play", "Pause", "FastFwd"]]
    return PDL
end if
end getPropertyDescriptionList

 


Upload Provided by ABCUpload ASP

Contact

MMI
22 West Court Sq
Suite 2C
Newnan, GA 30263
USA

Fax - (206) 339-5833

Send e-mail