Search content:

 

Personal Menu
Username:
Password:
Save password

Become a member

Forgot Password?

 

Don't miss these
Fade till done
Delete a file
Get Line Number of Word
Shockwave on Linux - CrossOver
New bitmap from existing member
SID6581
xTray xtra
Toggle DirectToStage Property of a Flash Member
moving buttons
Video Codecs
MediaMacros Xtras Mall
 

 

 

Behavior Video Status bar

Added on 6/30/2004

 

Compatibilities:
D8 D8_5 D9

This item has not yet been rated

Author: Raschko

This script will display the name, duration and the current running time of a movie sprite. This is easy to implement since it only requires three text fields.

Download PC Source
-- 30 June 2004, written By Brian Raschko

-- variables -- globals
global myVideoMember
global myTempo
global myTotalTime

-- variables -- property box specific
property description
property spritenum
property mySprite

property myName
property myDuration
property myCurrentTime

------------------
-- Main Scripts --
------------------

on beginSprite me
  
  mySprite = sprite(me.spritenum) -- default sprite number
  
  myVideoMember = member(sprite(mySprite).member).name -- get my name
  myTempo = member(myVideoMember).framerate  -- get my frame rate
  myTotalTime = framesToHMS((member(myVideoMember).duration / 60),myTempo,0,1) -- get my duration in minuts
  
  member(myDuration).text = myTotalTime --set my duration
  member(myName).text = myVideoMember  --set my name  
  
end beginSprite

on exitFrame
  
  if member(myVideoMember).type <> #bitmap then -- check
    
    startTimer
    
    if the timer < 60 then -- count every second
      
      member(myCurrentTime).text = framesToHMS((sprite(mySprite).movieTime / 60),myTempo,0,1) -- get my current time
      
    end if
    
  end if
  
end exitFrame
---------------------------------
-- Property "Pop-Up" Functions --
---------------------------------

on isOKToAttach (me, aSpriteType, aSpriteNum) -- What am I attached to?
  
  case aSpriteType of
    #graphic:
      return TRUE -- I can be attached to that. ( graphic = attached to a sprite )
    #script:
      return FALSE -- You can't attach ME to that!
  end case
  
end isOKToAttach

on getPropertyDescriptionList -- Open the Property "Pop-Up" Box.
  
  if the currentSpriteNum = 0 then exit -- Quit installation if not on the Timeline or a Sprite.
  
  theMember = sprite(mySprite).member --|__ My member Number
  theMemberNumber = theMember.number  --|
  
  description = [:] -- Declare the Property Variable Array.
  
  -- Add the Property Vairables.
  addprop description,#myName,       [#comment: "What contains my name?",         #format: #field, #default: "URL" ]
  addprop description,#myDuration,   [#comment: "What contains my Duration?",     #format: #field, #default: "URL" ]
  addprop description,#myCurrentTime,[#comment: "What contains my current time?", #format: #field, #default: "URL" ]
  
  -- Display these Variables.
  return description
  
end getPropertyDescriptionList

------------------------
-- Script Description --
------------------------

on getBehaviorDescription me
  RETURN
  "Video Progess Bar:" & RETURN & RETURN &
  "Parameters: " & RETURN &
  "    *The members name container." & RETURN &
  "    *The members duration container." & RETURN &
  "    *The members current timer container." & RETURN & RETURN &
  QUOTE & "This script requires three text fields." & QUOTE
end getBehaviorDescription

 


Upload Provided by ABCUpload ASP

Contact

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

Fax - (206) 339-5833

Send e-mail