Menu
MotorCortex Logo
MotorCortexDocs
MotorCortex LogoMotorCortex
    • GETTING STARTED
      • Installation
      • Introduction
      • Main Concepts
    • BASIC CLASSES
      • Clip
      • Group
      • Combo
    • PLUGINS
      • The MotorCortex Library
      • Discovering, Loading and Using plugins
      • Effects and Animations
      • Types of Plugins
    • EXECUTION
      • Native commands
      • Players
    • JSX
      • JSX
    • ADVANCED FEATURES
      • Clip as Incident
      • Dynamic Values
      • Selectors
      • Incident cloning
    • SOUND
      • Loading a sound
      • Audio Incidents
      • Master volume
    • EDITING
      • Adding Incidents
      • Remove Incidents
      • Move Incident
      • Resizing Incidents
      • Edit Incident’s attributes
      • Edit Incident’s properties
    • PLUGINS DEVELOPMENT
      • onGetContext
      • Mono Incident / one element, one animated attribute
      • The scratch value
      • Channeling and validation
      • Channels
      • API
      • Plugin structure
      • The MonoIncident
      • Combos
      • Create composite behaviours
      • Create your own Clips and expose them as Incidents
      • Custom Entities
      • Put sound on the game
      • Blockings
    • EXECUTION CONTROLS
      • Play / Pause
      • Set execution speed
      • Subscribe to Clip’s events
      • Subscribe to Clip’s duration changes
    • EXPORTING, REBUILDING AND CLONING
      • Clip Clone
      • Exporting
    • Appendix A
      • attributesValidationRules
        • The basics

    Subscribe to Clip’s duration changes

    Finally, as Clips might dynamically change you can subscribe to changes of the Clip’s duration via the subscribeToDurationChange method of it. This method takes just one argument, your callback function to get executed which will get just one argument, the new duration.

    Previous
    « Subscribe to Clip’s events
    Next
    Clip Clone »