Using
Flix Pro’s automatic player output, you
can create a custom player that will add the
actionscript included in the player to the first
frame of your Flix Pro encoded video (it can
only be added to the first frame).
There are many reasons why someone would want
to add actionscript to a Flix video. Some possible
uses are:
To query a database to get information
for user tracking or ecommerce.
To load additional information into a video
such as data, text or graphics.
To cause the video to launch a web page
or another .swf.
To ensure that files are only played from
a specific web server for file protection.
To add actionscript to a Flix Pro player
so you can dynamically load videos into the
player.
In this example we will add an action to open
an html page when the video starts to play.
Included
with your Flix Pro install are two sample player
FLAs that work with the Flix Pro automatic player
output feature. These can be found in the Wildform>Flix
Pro>Players folder.
The two files are called:
flixskin4a_red.fla
flixskin5a_red.fla
The
only difference between these two files is that
the “5a” player has volume control.
For the purposes of this tutorial we’ll
be using the players to add actionscript and
not for the play controls, so it doesn’t
matter which one we use.
The first thing to do is to open flixskin5a_red.fla
in Flash.
Next
I rename the output (File>Save As) to Get_Url.fla.
For the purposes of this tutorial I am going
to eliminate the player frame and play controls
to illustrate how you can use this method to
add actionscript to a Flix video without embedding
the video in an actual player. If you want to
keep the player frame and play controls, you
can skip down to “Editing the actions”.
Double
click on the player to drill down into the Flix
Player Skin level.
Then
select the Play Controls, which highlights the
play controls.
Delete
the play controls with the delete key. (They
are not required for a valid Flix Pro player.)
Next select the frame.
Click
on the frame and then change the “Color” setting
to Alpha with a value of 0%. This makes the frame
invisible – the color changes from red
to white on the Flash stage.
Next
you will drag the video box – the black
box in the center of the frame – to the
top left corner of the frame. I do this so the
video will be positioned correctly and not offset.
Before:
After:
Finally
I adjust the size of my new Secure Player.
I
set it to 400x300 to match the size of the video
frame originally created for this player.
Now
the visual portion of my new player is complete.
The
next thing I need to do is go into the actions
panel and adjust the name, dimensions and add
the actionscript.
Going into “Scene 1”
I
select the “Flix Skin”
And
open the Actions panel.
I
change the “name=” field to “Get
Url Player”. This is the name that appears
in the Flix Pro players window.
I change the “frame_min_width=” field
to “1”
I change the “frame_min_height=” field
to “1”
These new width and height settings will work
for any size video.
And finally I add the following action:
getURL("http://www.wildform.com");
This will cause any video file encoded with this “Get
Url Player” to open the web page http://www.wildform.com when
the video starts to play.
Now the actions panel looks like this:
Finally,
I save my output .fla and export my .swf and
I’m done.
This
is a simple example of adding actionscript to
a Flix video. You can use the same method to
add other actionscript to your Flix output. As
described above there are many possible uses
for this. In our “Securing Flix Pro videos” tutorial,
there is a description of how to use this same
method to ensure that a Flix Pro encoded video
will only stream from a designated server.
You can also combine this method with Flix Pro’s
batch encoding capabilities to add the same actionscript
to an unlimited number of videos (as well as
audio and image files).
It’s an easy way to add the power of actionscript
to your Flix Pro videos.
Wildform
provides a 100% satisfaction guarantee on all our software.
If you are not completely satisfied with our software
for any reason you may request a refund within 15 days
of purchase.