Creative COW SIGN IN :: SPONSORS :: ADVERTISING :: ABOUT US :: CONTACT US :: FAQ
Creative COW's LinkedIn GroupCreative COW's Facebook PageCreative COW on TwitterCreative COW's Google+ PageCreative COW on YouTube
ADOBE FLASH:HomeFlash ForumFlash TutorialsFlash Video TutorialsWeb Streaming ForumAdobe FlashPodcast

Re: Flash 8 video dilemma

COW Forums : Adobe Flash

FAQ   •   VIEW ALL   •   ADD A NEW POST   •   PRINT
Share on Facebook
Respond to this post   •   Return to posts index   •   Read entire thread


DsuttonRe: Flash 8 video dilemma
by on Nov 29, 2005 at 2:52:35 pm

Ok it appears that the answer to this question is the holy grail of the flash world. I have been to 5 different forums and on each forum there is someone asking this exact same question, now I do not know if it is the same person in each case asking the question in multiple locations but I do see another poor fellow questing for this same solution on this board

http://forums.creativecow.net/cgi-bin/new_read_post.cgi?forumid=190&postid=...

So is it not possible to make an XML video play list play the next video in the sequence with out user intervention? If it is not possible is there another solution I should look at.

This project is to bring training material to Field personnel over the Web, they do not always have the best computers or internet connections so rather then have them attempt to load a 30 MB file over the web I was attempting a less bandwidth intensive method.

If I am approaching this from the wrong direction please steer me in the right direction. If what I am attempting is not workable please let me know that as well. Any help or guidance would be greatly appreciated.

here are the codes so far

var nc:NetConnection = new NetConnection();
nc.connect(null);

var ns:NetStream = new NetStream(nc);

theVideo.attachVideo(ns);

ns.setBufferTime(15);

ns.onStatus = function(info) {
if(info.code == "NetStream.Buffer.Full") {
bufferClip._visible = false;
}
if(info.code == "NetStream.Buffer.Empty") {
bufferClip._visible = true;
}
if(info.code == "NetStream.Play.Stop") {
ns.seek(0);
}
}

playButton.onRelease = function() {
ns.pause();
}

rewindButton.onRelease = function() {
ns.seek(0);
}

this.createEmptyMovieClip("vFrame",this.getNextHighestDepth());
vFrame.onEnterFrame = videoStatus;

var amountLoaded:Number;
var duration:Number;

ns["onMetaData"] = function(obj) {
duration = obj.duration;
}

function videoStatus() {
amountLoaded = ns.bytesLoaded / ns.bytesTotal;
loader.loadbar._width = amountLoaded * 208.9;
loader.scrub._x = ns.time / duration * 208.9;
}

var scrubInterval;

loader.scrub.onPress = function() {
vFrame.onEnterFrame = scrubit;
this.startDrag(false,0,this._y,208,this._y);
}

loader.scrub.onRelease = loader.scrub.onReleaseOutside = function() {
vFrame.onEnterFrame = videoStatus;
this.stopDrag();
}

function scrubit() {
ns.seek(Math.floor((loader.scrub._x/208)*duration));
}

_root.createEmptyMovieClip("vSound",_root.getNextHighestDepth());
vSound.attachAudio(ns);

var so:Sound = new Sound(vSound);

so.setVolume(100);

mute.onRollOver = function() {
if(so.getVolume()== 100) {
this.gotoAndStop("onOver");
}
else {
this.gotoAndStop("muteOver");
}
}

mute.onRollOut = function() {
if(so.getVolume()== 100) {
this.gotoAndStop("on");
}
else {
this.gotoAndStop("mute");
}
}

mute.onRelease = function() {
if(so.getVolume()== 100) {
so.setVolume(0);
this.gotoAndStop("muteOver");
}
else {
so.setVolume(100);
this.gotoAndStop("onOver");
}
}

var vlist:XML = new XML();
vlist.ignoreWhite = true;

vlist.onLoad = function() {
var videos:Array = this.firstChild.childNodes;
for(i=0;i videoList.addItem(videos[i].attributes.desc,videos[i].attributes.url);
}

ns.play(videoList.getItemAt(0).data);
videoList.selectedIndex = 0;
}

var vidList:Object = new Object();

vidList.change = function() {
ns.play(videoList.getItemAt(videoList.selectedIndex).data);
}

videoList.addEventListener("change",vidList);

vlist.load("videos.xml");

videoList.setStyle("selectionColor",0xCCCCCC);
videoList.setStyle("textSelectedColor",0x000000);
videoList.setStyle("rollOverColor",0xCCCCCC);


This is more or less right from the tutorials from Lee I have yet to start even customizing the player since the boss wants a working example rather then pretty example


Thanks in advance




Posts IndexRead Thread
Reply   Like  
Share on Facebook


Current Message Thread:




LOGIN TO REPLY



FORUMSTUTORIALSFEATURESVIDEOSPODCASTSEVENTSSERVICESNEWSLETTERNEWSBLOGS

Creative COW LinkedIn Group Creative COW Facebook Page Creative COW on Twitter
© 2014 CreativeCOW.net All rights are reserved. - Privacy Policy

[Top]