Here it is, the final part of our video player tutorial! All we need to do now is get the time indicator working, add our home button click function, position and size the current video and get the featured bar filled with videos along with its scrubber. Let’s get started!
Step 1: Video Time
First we need to add a listener to the stage called videoTimeEnterFrame that updates the video time every frame. Add this line to the videoItemClick function.
stage.addEventListener(Event.ENTER_FRAME, videoTimeEnterFrame); // runs this function every time we enter a new frame
Now let’s add the videoTimeEnterFrame function.
function videoTimeEnterFrame(event:Event):void
{
var totalSeconds:Number = ns.time; // variable to hold the ns.time
var totalSeconds2:Number = duration; // variable to hold the duration
var minutes:Number = Math.floor(totalSeconds / 60); // variable to hold the rounded down totalSeconds divided by 60
var minutes2:Number = Math.floor(totalSeconds2 / 60); // variable to hold the…
5806 readers
1107 readers
1299 readers
1166 readersIn this Quick Tip, you’ll learn how to detect when the user has been inactive for a determined time. Keep reading to find out how! Final Result Preview Let’s take a look at the final result we will be working towards: Step 1: Brief Overview We’ll detect users interaction using Keyboard and Mouse Events, checking for recent activity
1424 readers
1126 readers
945 readers
330 readersOne of the most used visual development in Flex is drag and drop functionality I am using Flex 4 SDK since early iteration and really enjoyed the new Spark component and FXG (Flash XML Graphic) architecture. I was asked last week by one of my developer to help him understand how to work with
1443 readers
1139 readers
8,013
Subscribe to RSS headline updates from:
GurusUnleashed
Powered by FeedBurner
Curious what others are searching for? Below are the most popular search terms over the last 30 days.

