1 / 1

JavaScript Movie Player

JavaScript Movie Player. Launch() - This sets everything up on load of web page (1st image, play mode). Fwd() - Sets status variable to 1 for play & calls AnimateFwd. Rev() - Sets status variable to 1 for play & calls AnimateRev. Stop() - Clears TimeOut id and sets

albany
Download Presentation

JavaScript Movie Player

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. JavaScript Movie Player Launch() - This sets everything up on load of web page (1st image, play mode) Fwd() - Sets status variable to 1 for play & calls AnimateFwd. Rev() - Sets status variable to 1 for play & calls AnimateRev. Stop() - Clears TimeOut id and sets status variable to 0 for stop. AnimateFwd() - Finds next image & changes the source of image depending on play mode. AnimateRev() - Same as AnimateFwd but finds next image by decreasing image # Animate() - Creates all the buttons and functions associated w/ buttons so that things happen at appropriate time. Launch() is run onLoad of page. All the HTML page consists of is a single call to Animation(). Then the others are called when a button is pushed by the user. There is a setTimeout statement in AniamteFwd and AnimateRev that recursively calls each one after the given delay. If play mode is looping, then it doesn’t stop until Stop button clicked, which calls stop function. GoToImage() - Goes to a specific image # specified by user - changes source of image. Nothing happens until the user clicks one of the buttons on the page. Launch() simply sets up defaults for play mode and current image so that when a button is pushed it can start changing images and not wait for all imfo to be provided. ChangeSpeed() - changes the delay time between frames by either incrementing or decrementing delay ChangMode() - Sets the playmode variable to the value in the pulldown on the form.

More Related