
Welcome Guest
|
#1
|
|||
|
|||
|
Ok so i have searched all over the net for a solution.
I am using "FLASH 8 VIDEO ENCODER" to create a simple FLV that has a cue point the triggers the separate "streamingvideo.as" file to launch a url for that specific FLV. in basic terms I want the custom Netstream FLV player to launch a url when a specific FLV is played with a cuepoint. I need to be able to do this for 6 FLV's directing to seperate urls. If anyone has a tutorial on how to set this up that would be awsome. I have looked on this forum and others and putting the code people suggest is not working.. well anyways here is the Custom actionscript file for my custome video player. this code gets "included" into my website to build out the video players. Code: class StreamingVideo { var INTERVAL_FREQUENCY:Number = 250; var netConn:NetConnection; var netStr:NetStream; var progIntervalid:Number; var myFile:String; var myBarObj; var hasPlayed:Boolean = false var playing:Boolean = false; function StreamingVideo(obj, bufferTime:Number, filename:String, startPlaying:Boolean) { //Create a NetConnection object netConn = new NetConnection(); //Create a local streaming connection netConn.connect(null); //Create a NetStream object and define an onStatus() function netStr = new NetStream(netConn); //Attach the NetStream video feed to the Video object obj.attachVideo(netStr); //Set the buffer time netStr.setBufferTime(bufferTime); //store filename setMyFile(filename); if (startPlaying) { //Begin playing the FLV file then stop it right away, so it's ready to go netStr.play(myFile); //update playing variable to keep track of whether or not vid is currently playing setPlaying(true); //update hasPlayed variable hasPlayed = true; } } function playVid() { //if vid not currently playing, begin playback if (!playing) { if (!hasPlayed) { netStr.play(myFile); //update hasPlayed variable hasPlayed = true; } else { netStr.pause(); } setPlaying(true); } } function pauseVid() { //if vid currently playing, pause playback if (playing) { netStr.pause(); setPlaying(false); } } function rewindVid() { //rewind vid to beginning netStr.seek(0); } function togglePlay() { //universal play/pause btn netStr.pause(); togglePlaying(); } function togglePlaying() { //toggle playing variable if (playing) { playing = false; } else { playing = true; } } function initProgressBar(barObj:MovieClip, clipLength:Number) { //store barObj setMyBarObj(barObj); //initialize progress bar progIntervalid = setInterval(this, "doProgress", INTERVAL_FREQUENCY, barObj, clipLength); } function doProgress(barObj:MovieClip, clipLength:Number) { //recurring function to update progress bar var curPos:Number = getPos(); var percent:Number = Math.ceil((curPos / clipLength) * 100); barObj.gotoAndStop(percent); } function stopProgressBar() { clearInterval(progIntervalid); } function resetProgressBar(obj) { //reset progress bar MC to 0 myBarObj.gotoAndStop(1); } function getPos() { //returns vdi playback position, in seconds return netStr.time; } function setMyFile(val:String) { myFile = val; } function setMyBarObj(obj:MovieClip) { myBarObj = eval(obj._target); } function setPlaying(val:Boolean) { playing = val; }} Im asuming that I can just somehow place a code similar to this below into the actionscript above.. however i am not sure how to set it up.. Code: var cuePt:Object = new Object();cuePt.time = 10;cuePt.name = "end";cuePt.type = "actionscript";my_FLVPlybk.addASCuePoint(cuePt);va r listenerObject:Object = new Object();listenerObject.cuePoint = function(eventObject:Object):Void { getURL("http://bewelldata.com/quiz1.htm", _blank);};my_FLVPlybk.addEventListener("cuePoint", listenerObject);listenerObject.complete = function(eventObject:Object):Void { getURL("http://bewelldata.com/quiz1.htm", _blank);};my_FLVPlybk.addEventListener("complete", listenerObject); I have a FLV called test.flv with the cuepoint setup like this Name = test Time = 00:00:03:26 Type = Event again all i want to do is when this video is loaded into the player it will launch a new window towards the end of the FLV I need to do this multiple times since i am updating the team page of freebord.com and each team rider needs to have a FLV that launches a new window with their personal site. any help would be great thanks in advance tim Last edited by oldvolk57oval : 02-06-2009 at 08:11 PM |
«
Previous Thread
|
Next Thread
»
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| The News From Adobe on the Future of Flash Platform | FlashMove | Chit Chat Lobby | 0 | 11-10-2011 09:55 AM |
| creating an flv player with variable input using URL | bmxboy661 | General Flash | 3 | 04-17-2007 08:20 PM |
| new flash player window ? | Lepabart | Flash MX |
3 | 08-01-2005 04:14 AM |
| Exciting new FLV / MP3 player... | pushstream | New Softwares | 0 | 06-21-2005 09:52 PM |
| German FLV Player - Need help with alterations/additions (please): | mhulse | Flash Video |
5 | 03-20-2005 02:39 PM |

Art & Design



