Video Player
would i be able with actionscript 3.0 to make a desktop video player, where i could press a button, and choose the video from my computer that i would like to play? video files such as AVI?
thanks in advanced
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
[F8] 2 Flash Objects - Audio Player Passes Pause To Video Player
I have 2 flash objects on my html page.
One is a video player and the other is an audio player.
The video player starts playing by default.
I'd like to somehow set this up so that if someone clicks on the audio player, it automatically pauses the video player.
Please note that these are 2 SEPARATE FLASH OBJECTS on my HTML website. I'm not developing an all Flash driven website.
The audio player was added as an afterthought, originally there was only going to be a video player on the page.
How can I send a pause command from the Audio Player to the Video Player?
FOO
AS2 CS3: Video Player Class W/ NetStream Video Object
is it possible to use the properties of the videoPlayer class with a video object that is not wrapped in a flvplayBack component. I am having trouble using the maintainAspectRatio property with my current video object. Additional question, If you use a flvPlayBack component are you forced to use a skin for the controller or can you use a controller that was built in the swf of the video object?
Video Sharing Site (like Youtube) With AS3 Video Player?
I was planning on using YouTube to upload some content then stream the videos (as swf's) back into my project. The problem is that the YouTube player is AS2 so I have to use some workarounds to be able to control the video. I was wondering if there were any other video sharing sites that used an AS3 based player so I could control it from within my own code without the workarounds needed for you tube.
No Video (only Audio) When Playing Basic Video Player.
Hey everyone.
I used to be fairly good at flash, and then i had a break. Now i'm struggling with this really simple problem, that no one else seems to be having...
Here is my actionscript for playing the video
Code:
var nc:NetConnection = new NetConnection();
nc.connect(null);
var ns:NetStream = new NetStream (nc);
theVideo.AttachVideo(ns);
ns.play("antena1wheel_1.flv");
When i preview it, it comes up with the white stage, and you can hear the sound... but no sign of any video.
Thanks, and appologies for my stupidity...
Tim =)
Video Player Component Using Flash Player 6
I'm streaming video using Flash Player 6. The problem I am having is that the video will only play at a super small size, something like 180 x 60 (that's a guess). Is there a way to play the video at the 320 width that I redered it as?
I'm using Flash Player 6 because some code that came with my purchased Flash Template does not work unless it's published to Flash Plaey 6.
Thanks in advance!
Flash Player 10 Killed My Video Player
Hi Everyone,
I am new to this forum, but love all of the very valuable information that is available here on gotoAndLearn. I am hoping to get a solution for a couple of problems that have arisen in an application that I'm developing.
I am the developer for the web site at http://www.quired.com. I have a few different issues going on with my content. I just updated my flash player to version 10.0.12.36 yesterday. The update completely screwed up my application. The site runs off of a CMS that is built with PHP/MySQL. There are 3 Flash components: the Menu, the MediaSelector, and the MediaPlayer.
I will preface this by saying that in the past I had experienced problems with embedding multiple swfs in the same page with swfObject and AC_RunActiveContent. My solution to this was to embed the MediaSelector and MediaPlayer into individual .html or dynamic PHP pages and then use an iFrame and Javascript to load these into the main page as necessary. The idea is that the when the user clicks the menu, a Javascript is called that reloads the MediaSelector with thumbnails for videos, images, and audio clips that are linked to the page. When a user clicks a thumbnail from MediaSelector the MediaPlayer loads in with the clip that was clicked and the group of clips that the item is in. Now the user can continue to browse the site while still viewing or listening to the media in the group.
Before the update, I had experienced issues on a couple of older computers with older browser version and figured that the issue was more with the Javascripts that get called from within the swfs. The problem was basically that when the user clicked a thumb the player didn't update. Originally, we sent the user to a completely different page to view the media. The only changes that I made to the MediaSelector was the URLRequest in a navigateToURL().
My code changed from:
public function loadMedia(Event:MouseEvent):void{
var url:String;
var window:String;
//make sure it is a media item
if(Event.currentTarget.type_id < 4){
//if it isn't an image load the media player otherwise load the image with Javascript
if(Event.currentTarget.type_id != 3){
url = "../../../MediaPlayer/index.php?id="+Event.currentTarget.id+"&pageID="+requestID;
}else{
url = "Javascript: loadImageViewer('"+Event.currentTarget.id+"');";
}
window = "_parent";
}else{
url = "Javascript: loadBookInfo('"+Event.currentTarget.id+"');";
window = "_parent";
}
navigateToURL(new URLRequest(url), window);
}
To:
public function loadMedia(Event:MouseEvent):void{
var url:String;
var window:String;
//make sure it is a media item
if(Event.currentTarget.type_id < 4){
//if it isn't an image load the media player otherwise load the image with Javascript
if(Event.currentTarget.type_id != 3){
url = "Javascript: loadMediaPlayer('"+Event.currentTarget.id+"');";
}else{
url = "Javascript: loadImageViewer('"+Event.currentTarget.id+"');";
}
window = "_parent";
}else{
url = "Javascript: loadBookInfo('"+Event.currentTarget.id+"');";
window = "_parent";
}
navigateToURL(new URLRequest(url), window);
}
So basically only one line changed to call a Javascript instead of a URL. This worked fine in most updated browsers so I didn't think that there was an issue in the swf, but in the Javascript. I started to test the functionality in Safari and when I clicked the MediaSelector the swf disappeared and nothing happened. Also, my MediaPlayer wouldn't load in via the IFrame. I was thinking that this was an IFrame issue with Safari, but couldn't really find any information on it. I next tried to embed the swfs directly into the page using swfObject 2.1 and couldn't get them to work. I could right click in the area where they should be and it would tell me the Flash Object was loaded, but the swfs didn't show up. So, I then thought that possibly my Flash player wasn't up to date in Safari and downloaded and installed the update for Safari and Firefox. This didn't fix any of the issues that I was having with the swfs, but it did cause some new problems:
1) Videos in the MediaPlayer play, but are not visible. The audio is audible and the progress bar updates, but I don't get any image. I used the Video class to build this player. The progress bar autohides unless you hover over where it nests. In IE, it never comes into the screen when watching a video now. It does for audio though.
2)When playing an audio clip, I used the Bitmap Class to draw a waveform and add some filters, but now that I've updated the Flash Player the wave only shows up when the audio is paused or loading.
These issues are consistent in IE, Firefox, and Safari so it must be an issue with the new Flash Player. Somebody please help me figure out what to do about this. We are going to make a launch on the website next week and I can't have it breaking when people start updating their Flash Players.
Is there any way to force the player to run in a Flash 9 compliant mode? Sorry to write a book here, but I think that an understanding of how the app works will help in finding a solution.
Video Player For Flash Player 7
Hello all,
I haven't worked much with video in Flash so any tips appreciated. I created a small swf that streams an flv in Flash 8 and used the FLVPlayback Component. Problem is that Player 8 just isn't very wide yet so I'd like to make this Player 7 compatible. Anyone have pointers to a player component or AS that I can trake apart and make work? Thanks!
Flash Video Player "embed This Video"
I have a video player that loads ad's and videos from an xml file....Can anyone please point me in the right direction.....I need to build a copy/paste "embed this video" box into the player for social network sites. Anyone know how?
Video Player
I'm looking for a flash video player that is much like camtasia's, one that when u click a certain spot on the playing timeline it will go there without you have to drag the little progress bar over to the point.
_________/-PROGRESS BAR
|---------[]------------------|
____________________/-CLICK HERE
>>>CHANGES>>>
___________________/-PROGRESS BAR
|---------------------[]------|
Video Player
Hi anyone know where to get info on how to make a video player
so I can add video clip to my site thanks.
Video Player
Hi I would like to add video clips to my site
does anyone no where to get tutorial on how to build my own video player for my site or is this not possible?
Video Player Help
Hi There
I have just started to re-skin and modify a video player I found ages ago.
I've managed to get most of it to work but still having a few problems.
1.The video seems to stick at different point during playback. They are not at particular points but random ones.
Both the flv and the fla are both set at 25fps.
2.The dragger keeps going past the set point on the progress bar and no matter what i try nothing works.
If anyone would care to take a look or give me some pointers id be grateful.
Thanks very much
Video Player
Hi guys,
I'm trying to create a position bar for a video in flash mx 2004. Anyone care to point me in the right direction for a tutorial on how to control the movie position, volume, etc
Cheers
Video Player
Hi,
I've used the tutorial from:
http://www.adobe.com/devnet/flash/ar...hmx_video.html
First when the page loads the video starts playing automatically without pressing the play button.
Second, due to the fact that I have loops on my page when the video plays you hear both sounds from the loop music and from the video.
How can I make the video to start playing only when I press play?
How can I stop the loop music once the video starts playing?
muting the loop music mutes everything?
on(release){
play();
}
and
on(release){
stop();
}
are used for the buttons, any other options for pause, backwards and forwards?
Thank you.
[F8] Video Player
Hi guys,
I'm trying to use the built in feature of F8 to create video player.
All looks good but when I launch the site I just get white window the size I specified and just Player saying in the middle nothing else.
Here is a pic:
http://www.fileshare.ws:81/d/17c276c...plaer.bmp.html
Video Player
I have an flvplayer that is controlled by a variable for the video source. If i use a source like omg.flv it will load fine. But if I use a source like
youtube.com/get_video?video_id=LwAfTUIGRaU&t=OEgsToPDskJIrV7r3 VTqrMQjrZudYcYa
which is an flv file, just without the name it will not load. is it possible to do this or am i doing something wrong? thanks
Video Player
Hi
There's something I want to do with flash. Basically I need a flash video player like the one YouTube uses (maybe there's one there somewhere?) that in the embed code it's just a simple parameter which points to a movie file (preferably movie, but I suppose I'll accept flash).
I also want to dynamically insert another movie at the beginning of this.. I suppose it might work as the other one above as I want the "embedder" to be able to choose this movie, so it would be another parameter in the embed code. Could I hook this up to a script which rotated this initial movie?
And another related request is to load a movie (pref. movie, accept .swf) at the beginning of a .swf file, for instance a game, with a bit of ActionScript? I know there's the loadMovie function. Again, would I be able to connect this with a script that rotates/randomizes the movie played (eg arrays in php).
Thanks very much in advance,
heebie
Video Player
Hi.
I am trying to make a video player for my site. I am wanting to use the same player(.swf) but load different videos(.flv) into the player using html. I have had a quick search on the forum but couldn't find an answer. I am using Actionscript 3, Flash CS3. If its not to cheeky to ask could someone make me a quick template i could use or point me to a tutorial i can follow. Sorry for being a pain.
Thanks Loads
Daniel J Cooper
FLV Video Player
Hi guys i need help with an FLV video player i've made... i've attached the fla project and all the required classes i used to create the file... The main problems lie in the video Scrubber ...these are the problems that i have
1) The Video Scrubber length is not dynamic (i.e.bar length should match the time of video) this creates the second problem
2) Since its not dynamic i cant get the video scrubber to move with the seek time as the video plays.
3) And finally for some reason once the video is done playing it wont play again i dont know why it does that.
Any help in fixing these issues would help me a lot.
Thanks for the help guys/gals.
Xml Video Player
I'm still a little new to as3 and xml. I created this script that displays thumbnail images from a xml file. when they click that thumbnail I need it to load that particular video. Currently the xml file holds the location for 3 videos each video has a thumbnail image. I can get my actionscript to display all 3 images from the xml file and when I click on the image right now i just want to trace the video location. For some reason no matter which 3 images I click, it always traces the last video in the xml file. What am i doing wrong?
Code:
function xmlLoaded(event:Event):void{
xml = XML(event.target.data);
xmlList = xml.children();
for(var i:int = 0; i < xmlList.length(); i++){
imageLoader = new Loader()
imageLoader.load(new URLRequest(xmlList[i].attribute("thumb")));
imageLoader.y = 255;
imageLoader.x = i * 90 + 25;
imageLoader.name = xmlList[i].attribute("source");
addChild(imageLoader);
imageLoader.addEventListener(MouseEvent.CLICK, thumbClicked);
}
function thumbClicked(event:MouseEvent):void{
trace(imageLoader.name);
}
}
Thanks for the help. =)
[CS3] Video Player
Im making a simple flv player for my site. Each video has a preview image on the server also. The way i want it to act is to only load the preview image at first. then if the preview image is clicked the image goes away and the video begins to load. the only problem im having is that i use this code to load the image:
Code:
_root.createEmptyMovieClip("container",1);
container.loadMovie(prevurl);
and i dont know how to make it a button i can click. i was able to do this before but i had the play button hang down and thats what initiated everything. this time i just want the image visible so it is what will need to be clicked. so i guess im just asking how to load an image as a button and how to give that button code.
also, how hard would it be to do that think where the entire document waits to load until the user can actually see it?
thanks
Video Player
Hi there,
I'm pretty new to Flash. I know the general basics of getting things done, and I know basic C++, so I can somewhat understand actionscript.
I was searching of a way to make a video player in flash, and stumbled upon this thread: http://www.actionscript.org/forums/s...highlight=Tree
It is pretty much exactly what I want to do. The only thing I am looking for is how to link a video from using a tree-component. I will have a lot of videos I am hosting, and a tree-component will probably be the best way to stay orginized, but I don't know exactly how to go around doing that.
Can anyone lend me some help or references/tutorials?
Video Player Help
Hello,
I'm trying to build a package, part of which is a video player. Now it's largely based on a tutorial I found in actionscript 2.0, and I've tried to upgrade it but it doesn't work. Can anyone give me any pointers, particularly on tidying up the remnants of as2?
It's on frame 2 of the package which can be found at this location.
PHP Code:
stop();
profilesMC.DisplayObject.visible = false;
profilesMC.alpha = 0;
var nc:NetConnection = new NetConnection();//this establishes a connection to the internet
nc.connect(null);//this tells Flash that this isn't a Flash Communication Server project
var ns:NetStream = new NetStream(nc);
ns.addEventListener(NetStatusEvent.NET_STATUS, onStatusEvent);
ns.bufferTime(30);
function onStatusEvent(stat:Object):void {
if (stat.info.code == "NetStream.Buffer.Full") {
bufferClip.DisplayObject.visible = false;
}
if (stat.info.code == "NetStream.Buffer.Empty") {
bufferClip.DisplayObject.visible = true;
}
if (stat.info.code == "NetStream.Play.Stop") {
ns.seek(0);
}
}
theVideo.attachNetStream(ns);
ns.play("berrisford.flv");
rewindBtn.addEventListener(MouseEvent.MOUSE_DOWN, rewindVideo);
function rewindVideo(e:MouseEvent):void {
ns.seek(0);
}
playBtn.addEventListener(MouseEvent.MOUSE_DOWN, playVideo);
function playVideo(e:MouseEvent):void {
ns.pause();
}
var videoInterval = setInterval(videoStatus, 100);
var amoundLoaded:Number = new Number ();
var duration:Number = new Number ();
var scrubInterval:Number = new Number();
var meta:Object = new Object();
meta.onMetaData = function(meta:Object)
{
duration = meta.duration;
};
function videoStatus() {
amountLoaded = ns.bytesLoaded/ns.bytesTotal;
loader.loadbar._width = amountLoaded*211.9;
//211.9 px is the width of the loaderbar
loader.scrub._x = ns.time/duration*211.9;
}
loader.scrub.onPress = function() {
clearInterval(videoInterval);
scrubInterval = setInterval(scrubit, 10);
this.startDrag(false,1.8,this._y,209.8,this._y);
};
loader.scrub.onRelease = loader.scrub.onReleaseOutside=function () {
clearInterval(scrubInterval);
videoInterval = setInterval(videoStatus, 100);
this.stopDrag();
};
function scrubit() {
ns.seek(Math.floor((loader.scrub._x/211.9)*duration));
}
Video Player And FLV
I have a flv that I have loaded threw a video player, not the componet, but threw libary>new Video. I do not want any playback controlers just a mute button. The audio is embeded in the flv. The movie can be seen at www.metacoast.com/archaio/ click on the View Movie button located in the right section of that page.
Thanks,
Donald Parker
Need Video Player
Hey - I've been using a standard flash Video Playback Component on this page:
http://www.acutaboveexteriors.com/video/
And it works on some of the computers around the office, but not others. What am I doing wrong...? Is there a video player I can use other than the ones that come with flash CS3?
Thanks!
Edited: 10/31/2007 at 09:07:27 AM by DZ-015
Video Player
I have a video-player so far. But now there are two problems. I can't get it right with my actionscript knowledge. What I try to do is when a playback my flv files, the progressbar and timer must be reset otherwise they don't work again. How can I reset the timer and progressbar? Second problem is that I want to load a variable from a xml into, ns.play("variable xml"); For example ns.play(link[0]) .But it won't work also. How can I make a variable instead of a " " string? Can someone help me with this one?
Many thanks!
Attach Code
// ----netconnection setup----
var nc:NetConnection = new NetConnection();
// server adress ()
nc.connect(null);
// ----netstream setup----
var ns:NetStream = new NetStream(nc);
//status
ns.onStatus = function(info) {
if (info.code == "NetStream.Play.Start") {
progressBar.onEnterFrame = videoUpdate;
}
if (info.code == "NetStream.Play.Stop") {
delete progressBar.onEnterFrame;
}
};
ns.onMetaData = function(info) {
ns.duration = info.duration;
};
// ----attaching netstream----
video.attachVideo(ns);
//----playing external FLV----
ns.play("video.flv");
//----play/pause button----
playPause.Pause.onRelease = function() {
this._parent.gotoAndStop("play");
ns.pause(true);
checktime = 0;
};
playPause.Play.onRelease = function() {
this._parent.gotoAndStop("pause");
ns.pause(false);
checktime = 1;
};
//----rewind button----
rewind.onRelease = function() {
ns.seek(0);
ns.pause(false);
playPause.gotoAndStop("pause");
checktime = 1;
};
//----loadbar----
loadbar.onEnterFrame = function() {
this._xscale = (ns.bytesLoaded/ns.bytesTotal)*100;
if (this._xscale == 100) {
delete this.onEnterFrame;
}
};
this.onEnterFrame = function() {
trace(ns.time+" time");
trace(ns.duration+" duration");
if (checktime == 1) {
if (ns.time>=ns.duration-0.3) {
play_btn._visible = true;
if (play_btn._alpha<100) {
play_btn._alpha += 20;
trace("aplha is counting");
} else {
checktime = 0;
}
if (bgfade._alpha<50) {
bgfade._alpha += 10;
trace("aplha is counting");
}
}
}
};
//----video update----
function videoUpdate() {
progressBar._xscale = (ns.time/ns.duration)*100;
timecode.text = getTimecode(ns.time);
}
//----video scrubber----
loadbar.onPress = function() {
progressBar.onEnterFrame = videoScrub;
};
loadbar.onRelease = loadbar.onReleaseOutside=function () {
progressBar.onEnterFrame = videoUpdate;
};
function videoScrub() {
var dist:Number = (_root._xmouse-loadbar._x)/loadbar._width;
ns.seek(Math.floor(ns.duration*dist));
progressBar._xscale = (ns.time/ns.duration)*100;
timecode.text = getTimecode(ns.time);
}
//----time code----
function getTimecode(theTime) {
var t:Number = Math.round(theTime);
var min:Number = Math.floor(t/60);
var sec:Number = t%60;
var s:String = "";
if (min<10) {
s += "0";
}
if (min>=1) {
s += min.toString();
} else {
s += "0";
}
s += ":";
if (sec<10) {
s += "0";
s += sec.toString();
} else {
s += sec.toString();
}
return s;
}
//----audio controls----
this.createEmptyMovieClip("vidSound", 2);
vidSound.attachAudio(ns);
var vSound:Sound = new Sound(vidSound);
vSound.setVolume(75);
volScrub._xscale = 75;
volBottom.onPress = function() {
adjustSound();
this.onMouseMove = adjustSound;
};
volBottom.onRelease = volBottom.onReleaseOutside=function () {
delete this.onMouseMove;
};
function adjustSound() {
var dist:Number = Math.floor(((_root._xmouse-volBottom._x)/volBottom._width)*100);
if (dist>=0 && dist<=100) {
volScrub._xscale = dist;
vSound.setVolume(dist);
}
}
// start action
function startaction() {
ns.pause(true);
bgfade._alpha = 0;
checktime = 0;
}
// play button
play_btn.onRelease = function() {
checktime = 1;
ns.seek(0);
ns.pause(false);
playPause.gotoAndStop("pause");
bgfade._alpha = 0;
play_btn._visible = false;
play_btn._alpha = 0;
progressBar._xscale = 0
};
startaction();
Edited: 08/16/2008 at 10:57:05 AM by vinnio
Video Player
Hi I would like to add video clips to my site, is there some tutorial on how to build my own video player so I can add it to my site ?
or is this not possible thanks.
Video Player For .mov Or .avi
Hi,
I want to put together a few videos to show some friends and I don't want to spend too much time on it, does anybody know where I can download a simple video player that would work with .mov and .avi files? I thought there would be a component like that but I didn't find it...
Thanks!
Video Player
how do u make a video player with costum skins (not following the components)
and i need a play button, pause button, and one of those sliding things to control the current time in the clip
Fla Video Player
Hi,
i want to make my own fla video player, but i dont have much bandwith. is there a way to pull in the video from a low-cost (or free!) hosting company?
cheers,
G
Video Player
I am looking for a youtube style video player with a play list or thumbnail preview; something so the user can select videos. any suggestions on where i can find something that would do this, a tutorial, a download, anything???
thanks for the help.
Video Player
I'm redesigning my site and would like to create a video player so that I do not have to import the video and set the length and add a replay button at the end for every single video, but just resize it and stuff.
What I would like to start out is a loading screen, I guess since it will be a lot of videos, I wouldn't be able to put the title on each one. Once the video is loaded, you can press play and watch it. It would be nice to have a little play/pause button when this is happening, but it's not necessary. After the video is done playing, I would like a small button to fade in and allow you to replay the video. I would like the player to be able to be set to play a specific video for each different page. So like if I want to go to watch "The Amazing Turtle" for example, I click on the link then the page comes up and the player loads "The Amazing Turtle" video file. If I go to a different page, it loads a different video.
So, any ideas on how to do this? Also could someone help me make it and everything because I don't have much knowledge in flash and since I haven't used it much in a while, I'm kinda rusty.
I don't know if I made sense or not, if not, just ask me to re-explain it.
Thanks bunches,
Nadaklan
All About A Video Player .....
Hi everybody....
I am new to Flash.So please if some1 can help me in making a flash video player,then i would be very grateful.I dont want to import the player from the components section.I want to create my own player with some functions like play,pause,stop,rewind,fwd and a scrollbar to move the movie.Till now i am able to play and pause the video only.I want to know about stop,rewind and scroll functions.Please help me out...If not the code just giv some links from where i can learn.
Many Thanks in advance.
XML Video Player Help
I have an XML movie player that works fine.
Now i have a movie clip(videos) and within that movie clip i have 3 more movie clips(video1, video2, video3). Each of these movie clips contains a video player but loads a different xml file.
This kinda works ok, the only problem is say i am currently watching the contents of video1.
I press a button and the player jumps to the frame which contains video2. Video2 starts to play the new set of videos, however you can still hear the audio from video1 in the background.
I hope you understand what i mean. Basicly i need to know how to tell the player in each movie clip to stop.
This is the code i have in each movie clip just with a different XML file.
Any help is much appreciated.
Cheers
Code:
//this is the event listener that changes tells the player to play a different
//video when you click on the list
import fl.video.FLVPlayback;
var loader:URLLoader = new URLLoader();
loader.addEventListener(Event.COMPLETE, onLoaded);
myList.addEventListener(Event.CHANGE, itemChange);
function itemChange(e:Event):void {
//myPlayer.load(myList.selectedItem.data);
myPlayer.play(""+myList.selectedItem.data);
}
var xml:XML;
function onLoaded(e:Event):void {
xml = new XML(e.target.data);
var il:XMLList = xml.channel.item;
for (var i:uint=0; i<il.length(); i++) {
myList.addItem({label:il.description.text()[i],
data:il.title.text()[i]});
}
}
loader.load(new URLRequest("CupSemi.XML"));
myPlayer.addEventListener(Event.COMPLETE, nextFLV);
function nextFLV(e:Event):void {
var ds = myList.selectedIndex;
var dsl = myList.length;
if (myList.selectedIndex == 0) {
trace("if = yes: "+dsl);
myList.selectedIndex = (+1);
myPlayer.play(""+myList.selectedItem.data);
} else {
if ((ds+1) == dsl) {
myList.selectedIndex = 0;
myPlayer.play(""+myList.selectedItem.data);
} else {
trace("if = else");
myList.selectedIndex = (ds+1);
myPlayer.play(""+myList.selectedItem.data);
}
}
}
Video Player
Hi I would like to add video clips to my site, is there some tutorial on how to build my own video player so I can add it to my site ?
or is this not possible thanks.
Video Player
Hi there,
Does anyone know if there's a tutorial anywhere to help me make a Video player in flash 8 like the one thats on myspace.
Many thanks,
CJ Lazell
[AS3] Video Player
I'm trying to implement a video player in CS3 with a custom class. It works fine through the IDE and in IE but it's not working in opera/ff/safari. See attached files. Any help is greatly appreciated as this is my first AS3 project. I just migrated to CS3 from MX04.
Thanks,
Andy
Video Player With MX Possible?
I've been google'in how to make a video player like the standard on youtube but I cant find anything on how to do it with MX. Can anyone point me in the right direction?
Thanx,
A.
Video Player Help
Ok, I am really struggling. I purchased a video player from flashden, as I am still rather new to actionscripting. I managed to do many large mods to the file to suit my needs but I am struggling with one.
I want to add short commercials before a video.
That would be the content path of adURL in the XML. The normal video content path is videoURL.
XML:
Code:
<video>
<video videoURL="Welcome.flv" imageURL="image1.jpg" thumbImage="1.jpg" title="blah" description="Welcome" longdesc="blah blah InVideoURL="test.jpg" adURL="adtest.flv" />
<video videoURL="test.flv" imageURL="image1.jpg" thumbImage="1.jpg" title="blah" description="Welcome" longdesc="blah blah" InVideoURL="" adURL="" />
</video>
Here is the important code of the player (I removed all the items that do not relate to my issue to make it easier):
Code:
//Set stage settings
Stage.scaleMode = "noScale";
Stage.displayState = "normal";
Stage.align = "TL";
//EnterFrame
this.onEnterFrame = function() {
reposition();
if (showPlaylist && Stage.displayState == "normal") {
playlist._visible = true;
} else {
playlist._visible = false;
}
if (vp.playing) {
isPlaying = true;
} else {
isPlaying = false;
}
if (isPlaying) {
//tween out the image
image.alphaTo = 0;
}
if (!isPlaying && vp.playheadTime == 0) {
//tween in the image
image.alphaTo = 100;
}
image._alpha += (image.alphaTo-image._alpha)/6;
//trackbar
controlbar.trackbar.track_progress._width = vp.playheadPercentage/100*trackWidth;
controlbar.trackbar.track_buffer._width = vp.bytesLoaded/vp.bytesTotal*trackWidth;
if (vp.bytesLoaded == vp.bytesTotal) {
controlbar.trackbar.bufferbars._visible = false;
} else {
controlbar.trackbar.bufferbars._visible = true;
}
if (scrubbing) {
controlbar.trackbar.track_progress._width = controlbar.trackbar.track_slider._x;
} else {
controlbar.trackbar.track_slider._x = controlbar.trackbar.track_progress._width;
}
//volume
if (volumedragging) {
vp.volume = (controlbar.volumecontrol.volumeslider._x-controlbar.volumecontrol.volumemask._x)/controlbar.volumecontrol.volumemask._width*100;
}
if (controlbar.mutebutton.DoMuteButton._visible) {
controlbar.volumecontrol.volumefill._width = vp.volume/100*controlbar.volumecontrol.volumemask._width;
} else {
controlbar.volumecontrol.volumefill._width = oldVolume/100*controlbar.volumecontrol.volumemask._width;
}
//timefield
minutesPlayed = String(Math.floor(vp.playheadTime/60));
secondsPlayed = String(Math.round(vp.playheadTime%60));
minutesTotal = String(Math.floor(vp.totalTime/60));
secondsTotal = String(Math.round(vp.totalTime%60));
//add a zero
minutesPlayed = addZero(minutesPlayed);
secondsPlayed = addZero(secondsPlayed);
minutesTotal = addZero(minutesTotal);
secondsTotal = addZero(secondsTotal);
//output text
controlbar.trackbar.track_time.track_time.text = minutesPlayed+":"+secondsPlayed+" / "+minutesTotal+":"+secondsTotal;
if (Stage.displayState == "normal" && vp._width != playerWidth) {
vp._x = (playerWidth-vp._width)/2;
vp._y = (playerHeight-vp._height)/2;
}
//scroll playlist
if(playlist._xmouse > 0 && playlist._xmouse < playlistWidth && playlist._ymouse > 0 && playlist._ymouse < playlistHeight){
if (playlistHeight != undefined) {
thumbrowYgoto -= (playlist._ymouse-(playlistHeight/2))/playlistHeight*0.5*100;
}
if(thumbrowYgoto >0){
thumbrowYgoto = 0;
}
if(thumbrowYgoto < - (playlist.list._height - playlistHeight)-10){
thumbrowYgoto = - (playlist.list._height - playlistHeight)-10;
}
}
playlist.list._y += (thumbrowYgoto - playlist.list._y) * 0.2;
if(Stage.displayState == "fullScreen"){
controlbar.OriginalSizeButton.enabled = false;
controlbar.OriginalSizeButton.visible = false;
}
if (Stage.displayState == "normal") {
vp._width = playerWidth;
vp._height = playerHeight;
//reposition
vp._x = 0;
vp._y = 0;
} else {
//set player size
vp._width = Stage.width;
vp._height = Stage.height-controlbar.control_bg._height;
//reposition
vp._x = -_x;
vp._y = -_y;
}
};
//
function addZero(num) {
//adds a zero to single digit number
if (length(num)<2) {
num = "0"+num;
}
return num;
}
//
function loadVideo(num) {
currentVideo = num;
image.imageHolder.loadMovie(allVideos[num]["imageURL"]);
_parent.extra_info.track_title.text = allVideos[num]["title"];
_parent.extra_info.description_text.text = allVideos[num]["description"];
_parent.extra_info.long_desc.text = allVideos[num]["longdesc"];
_parent.extra_info.thumb.loadMovie(allVideos[num]["thumbImage"]);
InVideo.InVideoLoader.loadMovie(allVideos[num]["InVideoURL"]);
vp.contentPath = allVideos[num]["videoURL"];
vp.seek(0);
}
Stage.addListener(listener);
vp.complete = function() {
if (autoPlay == true) {
currentVideo += 1;
if (currentVideo>=allVideos.length) {
currentVideo = 0;
}
loadVideo(currentVideo);
vp.play();
} else {
vp.stop();
}
};
//Buttons
image.bigButton.onPress = function() {
vp.play();
};
controlbar.PreviousButton.onPress = function() {
currentVideo -= 1;
if (currentVideo<0) {
currentVideo = allVideos.length-1;
}
loadVideo(currentVideo);
};
controlbar.NextButton.onPress = function() {
currentVideo += 1;
if (currentVideo>=allVideos.length) {
currentVideo = 0;
}
loadVideo(currentVideo);
};
I thought I could just change the content path in the loadVideo function to the adURL and then in the vp.complete function redirect the video to play again but change the content path to the actual video content path (videoURL). I'm either wrong or executed it wrong when I tried it.
If anybody has any ideas, could you share? I just can't get this to work. ahh! :be:
Video Player
i am looking for a streaming flash-video player which is compatible whit the flash plugin 6. does anybody know were to get a good one?
thx
XML Video Player
1000: Unable to make connection to server or to find FLV on server
AIR Video Player
Hi,
I'm creating an FLV player and I want to display in an info pane the width and height of the video. This info isn't available on the dragdrop event, so I gotta wait a few frames or so before I get that info. I set a second timer before i display the info pane. IS this a bad workaround, or is there a better way of 'waiting' for that info to become available?
Thanks
New Video Player With AS3
hi@all, i am new in this forum!!
First of all a really big thanks on the gotoandlearn groub. I watched all the tutorials and it is amasing how good the present it.
I am really new in AS3 so i have big questions^^.
I`ll try to build with the new FLV-Player Component the List-Component and an XML-File a video player which looks like from gotoandlearn. But i have big Problems i don`t know how i should start.
I tried it too to use the old Videoplayer Tutorial and paste it in Flash CS3 but it is impossible to build the old Player in the new AS3 because they changed to much.
Can anybody help me to build with the new Components this Player??
And will this player work on the new AIR-Plugin??
Thanks a lot!
Video Player
i have a media player
where i hv fast forward button using ns.seek(ns.time+1),thts working;
but similar fast rewind button is not working.....????
Xml Video Player App
I'm trying to do a video app that has 6 buttons on the stage and the button name, description and flv url is from xml...
The problem is that I don't understand xml that much... but I'm still trying to make this to work as it should...
Here you can see the app I'm working at
http://paul.jpc.ro/work/video_interfce/
As you can see when you roll over the buttons the description is undefined :?
This is the code I use right now:
Code:
var textArray:Array = new Array();
var descArray:Array = new Array();
var xml:XML = new XML();
xml.ignoreWhite = true;
xml.load("videos.xml");
xml.onLoad = function(){
var xmlNodes:Array = this.firstChild.childNodes;
for(var j:Number = 0;j<xmlNodes.length;j++){
textArray.push(xmlNodes[j].attributes.name);
descArray.push(xmlNodes[j].attributes.desc);
}
loadSite();
}
function loadSite(){
for (var i:Number=0;i<textArray.length;i++){
var btns:MovieClip = eval("b"+(i+1));
btns.txt.text = textArray[i];
btns.onRollOver = function(){
descText.text = descArray[i];
}
btns.onRollOut = function(){
descText.text = "Roll Out";
}
}
}
Video Player
Well I have used several combinations of tutorials to make this, and I have one problem that has been bugging me. The way the code is designed now doesn't let me use folders for the objects. At least when I try to add them, they cause arguements.
Currently the code for the XML is:
Code:
<videos>
<video source="location.flv" title="Title" author="Author" year="Year" />
...
</videos>
and the actionscript code is:
Code:
// ---------------------- Load XML -----------------------//
var videoXML:XML = new XML();
videoXML.ignoreWhite = true;
var rootNode:XMLNode;
var currNode:XMLNode;
videoXML.onLoad = function():Void{
rootNode = this.firstChild;
for(var i:Number = 0; i < rootNode.childNodes.length; i++){
currNode = rootNode.childNodes[i];
aVideos.push({
source:currNode.attributes["source"],
title:currNode.attributes["title"],
author:currNode.attributes["author"],
year:currNode.attributes["year"]}
)
}
totalVideos = aVideos.length;
populateList();
}
videoXML.load("videos2.xml");
//------------------------------List Box and Fields-------------------------------//
var cList:Object = tree;
cList.vScrollPolicy = "auto";
var listListener:Object = new Object();
cList.addEventListener("change", listListener);
listListener.change = function(){
var index:Number = cList.selectedIndex;
currentVideo = index;
populateFields(index);
playVideo(aVideos[index].source);
}
function populateList():Void{
for(var i:Number=0; i<totalVideos; i++){
cList.addItem(aVideos[i].title);
}
cList.selectedIndex = currentVideo;
populateFields(0);
playVideo(aVideos[0].source)
}
function populateFields(index:Number):Void{
tTitle.text = aVideos[index].title;
tYear.text = aVideos[index].year;
tAuthor.text = aVideos[index].author;
}
Can anyone lend me a hand in trying to get the videos to fall under a folder in the tree component?
Any help is very much appreciated, and much thanks to Lee for a fantastic website.
|