Dispose works the same way that the duration and stop functions work; it's an argumentless void, so you do not get a return value, nor do you have to pass an argument. If your movie is called myMovie, you can implement dispose by writing myMovie.dispose();
The best place to add this is after the video ends (you don't want to delete the videoplayer while it's still playing, off course). For example:
if (myMovie.time() >= myMovie.duration()) { //when the timestamp of the player is greater or equal to the duration of the video
myMovie.dispose(); //delete the player and free the memory for garbage collection
}
The best place to add this is after the video ends (you don't want to delete the videoplayer while it's still playing, off course). For example:
if (myMovie.time() >= myMovie.duration()) { //when the timestamp of the player is greater or equal to the duration of the video
myMovie.dispose(); //delete the player and free the memory for garbage collection
}