MovieFrame:StartMovie
Jump to navigation
Jump to search
Plays a movie.
success, returnCode = MovieFrame:StartMovie(movieID [, looping])
Arguments
- movieID
- number : movieID
- looping
- boolean?
= false
- Whether to loop the movie, but it does not seem to work.
Returns
- success
- boolean - Returns true if the movie could be successfully played.
- returnCode
- number
Value | Type |
---|---|
0 | success |
1 | codec failure |
2 | data missing |
3 | reading of video file failed |
4 | opening of video file failed |
Example
Plays the Seasons of War trailer (without the option to cancel by pressing escape).
local f = CreateFrame("MovieFrame")
f:SetAllPoints(UIParent)
f:SetScript("OnUpdate", function() end) -- required to make the movie play
f:StartMovie(2)