Home Tutorials Forums Articles Blogs Movies Library Employment Press

Go Back   ActionScript.org Forums > Extensions and Plugins > Components

Reply
 
Thread Tools Rate Thread Display Modes
Old 06-01-2012, 10:15 PM   #1
oblivianmusic
Registered User
 
Join Date: Apr 2011
Posts: 2
Default [AS3] Controlling web video problem

I have a Flash website with a video page which uses the Flash FLV Video Component to play videos. I am trying to get the action script right to make the FLV Video Component play from a list of videos and I keep getting very strange compiler errors when I test my movie. The Compiler errors are:

MediaVideoMC, Layer 'Actions', Frame 1, Line 19
1084: Syntax error: expecting rightparen before colon.

MediaVideoMC, Layer 'Actions', Frame 1, Line 19
1078: Label must be a simple identifier.

MediaVideoMC, Layer 'Actions', Frame 1, Line 23
1084: Syntax error: expecting colon before assign.

Here is the action script I am using copied directly from the Adobe website with the identifier changed:

import fl.video.*;
import flash.events.Event;
import flash.net.*;

// Set Variables

var flvControl:FLVPlayback = VideoContainer;
var flvIndex:Number = 0;
var loopAtEnd:Boolean = true;

// Load XML file...
var xmlList:XML;
var xmlPath:String = "videos.xml";
var xmlLoader:URLLoader = new URLLoader();
xmlLoader.load(new URLRequest(xmlPath));

// Receive the XML and load the first video function

// LINE 19--> xmlLoadedHandler(event:Event):void
{
// Save XML

xmlList = new XML(xmlLoader.data);

// Set video (Start)

flvControl.source = xmlList.video[0]};
}
xmlLoader.addEventListener(Event.COMPLETE, xmlLoadedHandler);

// Handle the video completion (load the next video)

function completeHandler(event:VideoEvent):void
{

// Get next item in list
flvIndex++;

// Validate index

if( flvIndex == xmlList.video.length () ){
if( loopAtEnd ){
flvIndex = 0;
}else{
return;
}
}

// Load the next video
flvControl.source = xmlList[flvIndex];
}

flvControl.addEventListener(VideoEvent.COMPLETE, completeHandler);

// Set the default video (Start)

flvControl.source = videoList[0];

I have been working on trying to fix this for days with no luck...Anyone who can help would be much appreciated...

Thank you!
oblivianmusic is offline   Reply With Quote
Old 06-18-2012, 05:45 AM   #2
johnwatson85
Registered User
 
Join Date: Jun 2012
Posts: 1
Default

Hey that was really helpful and i would like you to visit www(dot)inspiredbc(dot)com
johnwatson85 is offline   Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump


All times are GMT. The time now is 02:53 PM.

///
Follow actionscriptorg on Twitter

 


Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Ad Management plugin by RedTyger
Copyright 2000-2013 ActionScript.org. All Rights Reserved.
Your use of this site is subject to our Privacy Policy and Terms of Use.