Demonstrates how a shader effect can be applied to a video, updating each video frame. This example loads in a video in which a color can be isolated using the IsolateColorEffect, then generates an effect on just the isolated pixels.
Constructor. This initiates load of external shader file.
Handler for when the shader file has loaded. This adds the video loader and sets up the properties used for the flame effect.
parameter: event Event dispatched by ShaderEffect.
Handler for when the video frame updates. This draws the current video frame into the bitmap data and applies an image effect.
parameter: event Event dispatched by VideoLoader.
Instantiates a video loader to load video and sets up listener for progress.
Creates the bitmap data that will be used to draw the flames.
Initializes Perlin noise properties that will be used in flame animation.
Applies the Perlin noise to the bitmap data, offsetting the octave displacement by the FLICKER_RATE each time this method is called.
Updates the flame bitmap data each frame, creating the animation.