ActionScript 3.0 :: Adding Controls To Dynamic Video
Apr 22, 2011Im adding videos to my stage with AS3 and was wondering if it is possible to then add the standard flashh video controls to the video with script..[code]
View 0 RepliesIm adding videos to my stage with AS3 and was wondering if it is possible to then add the standard flashh video controls to the video with script..[code]
View 0 RepliesI have a video player that plays videos loaded via XML and selected using a combbox. I just got the play and pause buttons to work. What I'm attempting to do now is be able to hit next or previous buttons and select the next or pevious video from the XML file, and update the displayed/selected file in the combobox, my thought was to somehow set the previous/next buttons to directly manipulate the combobox, but nothing I've tried so far has worked.
ActionScript Code:
import fl.data.DataProvider;
var nc:NetConnection = new NetConnection();
nc.connect(null);
[code]....
I have a TabBar Control with 3 tab, i need to add controls(Button,Label) dynamically in to each tab, I can add the controls to the initial selected tab but when i add to next tab , i am getting Null exception error That is when TabBar property selectedIndex="0" means i can add to 1st tab.but not in 2 and 3rd. when Tabbar property selectedIndex="1" means i can add to 2nd tab.but not in 1 and 3rd.
View 1 RepliesI'm porting in an .flv to Flash for the first time. I created the .flv from an .MP4 using Media Encoder CS5, and then opened a new Actionscript 3 .fla in Flash Professional CS5, clicked File > Import > Import Video. Then selected 'Load external video with playback component'. Everything seems to have imported fine, but when I publish the SWF and import it via Dreamweaver CS5 and preview the page, the video is there, but the controls are not. There's just a white box where the controls should be. Also, the video is out of sync with the audio, which I believe is a problem with Media Encoder, not Flash.
Here are some links:
The page that I'm working on (video at the bottom of the page)
The .FLA
The .FLV
The .SWF
I am building a flash video player with a custom UI, and admittedly I'm not sure exactly what I'm doing. I tried altering a skin, but that always comes out wonky due to whatever coding they use. So I'm altering single video components and putting them in the mc what I want them. It looks great, but the problem is that when video goes to full screen, all of the controls dissappear and I can't figure out how to make them show up. How do I get a movie clip to display on top of the video when it goes to full screen in flash AS3?
View 1 RepliesI'm having trouble adding any instance of the fl.controls to my class.
Compiling does work. And even in debug-mode it passes the moment, when the control is added to the mc. But then during runtime - I guess it happens before the controls have to be displayed - I get something like a null-reference exception. Either it's error 2007 (experianced with ProgressBar) or it's 1009 (experianced with RadioButton).
It's exactly the same problem which is described in the comments of the ProgressBar documentation.
package
{
import flash.display.Sprite;
import fl.controls.ProgressBar;
[Code]....
So how can I use fl.controls without having to provide them through the .fla library?
I've inserted an audio file into my flash movie and I wondered if there was an easy way to add some volume control and/or an on/off audio button to the movie? Or would this have to be scripted using actionscript?
View 2 RepliesTo make it, I attached the audio clip to the frame, and used Actionscript 2 to set the frame to stop the audio and manually advance to the next frame. Is there an easy way to show a progressive bar showing the time remaining for the audio playback, and have rewind, stop, start/pause and fast forward?
View 1 RepliesI'm attempting to add some user controls to a flv for a client. I've added the flv to a swf and added the FLVPlayback component no problem. I've exported the movie, again, no problem. When I play the movie on my local drive, it plays just fine. Here is where the problem comes in: I've uploaded the movie to a live server to embed in an html page so that my client may preview the controls before giving final go ahead for the project. However, once the movie is upload to a a live server, the FLVPlayback component no longer appears in the movie and the flv no longer plays.
View 3 RepliesI took a .flv and placed it in a .swf in Flash Professional CS5 (for smoother playback on my website), and I used Dreamweaver to embed the .swf on one of my webpages. The video plays back fine, but there are no playback controls. In Dreamweaver, I set "PLAY" and "LOOP" to false, so in order to play my video, I have to right-click it and press "Play." That seems odd and possibly confusing/inconvenient for anyone viewing my website (particular potential employers, because this is my online portfolio). how to add playback controls? I don't want to use any external players (like Flowplayer), as I am trying hard to avoid watermarks and having to pay for anything extra.
Interesting note: when I used Dreamweaver to insert the .flv, I had the option to select from a list of playback controls. However, the .flv did not play smoothly on my website, and I found the solution to place the .flv in an .swf for nicer playback.
I have two FLV's that I have playing back to back. They use the following code, but I'd like to add the video controls/controller to the player, which I'm not sure how to do. This is what I currently have:
Code:
var videoList:Array = ["20120331_102028.flv", "20120331_102102.flv"];//we also define the currentIndex here:
var currentIndex:int = 0;
[Code].....
Unlike a typical FLV import where you can add the particular video controls that you prefer, I'm not sure how to add that manually via AS. What would be the best way to do this? I'd obviously like to be able to control volume and have a timeline scrubber that will work on both videos.
I'm using Flash Pro CS4, and ActionScript 2, and I'm trying to create objects dynamically, through code, rather than through the designer in Flash.
[Code]...
I will try to be as clear as I can. I have an existing swf file that I need to add Play,Pause, FF and Rewind to but I need the controls to be part of the swf file and not as a video player.
I am loading an external swf file that has all of the controls on it via this code:
[Code]...
I am doing this so I can rollover the viewing window and have it appear. I cannot get any code to work to control the timeline (which is broken down into sections with individual MC's in each section.
What I am looking for is the code to apply to the buttons on the external controller to control the playing of the movie.
I have lots of .swf video files from the past years, and recently have been using the flash video encoder in cs3 to create .flv that adds video controls. I was wondering if there was a way to add video controls like slider, stop, pause, volume, etc.. to .swf video files. I have searched for a .swf converter to .flv format but even though all the marketing says it can do it, none of the ones I have tried can do it.
View 1 RepliesI'm including a video with it's controls into a frame in flash.When I try it and publish it as SWF the control bar of the video shows but when I publish it as a .app for mac or a .exe for windows and run itthe video shows but not the controls
I'm using the FLVPlayBack component to show the video
I'm new to Flash and I'm pretty sure this a dumb question that has been asked many times - but go easy on me as I have searched and searched through and just can't find the answer.
I've created my first animation using a set of digital Jpeg photos and I've figured out the code for inserting this into my web page. It works perfectly and I'm very impressed with the quality of the animation and how small the file is. Now I want to add a simple control bar underneath with Stop, Play, Rewind - the usual stuff you get on YouTube, but I can't for the life of me figure out how to do it.
how to position my video controls. I thought I had it figured out until I moved my video and the controls did not move with it. I tried doing this: video.addChildAt(vidControls, 2); but it keeps barking at me.
Code:
video = new Video();
video.width = 640;
video.height = 360;
[code]....
Is there a way to hide the controls on a flash video (flv) until the user scrolls over the video? So the page opens, the video starts playing (still no controls visable) and then when a user scrolls over the video, you then see the controls for the first time. I have searched high and low.
View 7 RepliesI'm sure this is a simple thing but I haven't been able to find out out to associate an absolute link with video controls.
View 1 Repliesi created video player for page to play flv videos and i did it by adding FLVPLayback component to libarary and next code.[code]But i needed to enlarger the size of video and it got nasty blocks so i google.how to enable deblocking and moothing and i had to change code to [code]Disadvantages no controls,square videos stretch to video player on first code they only stretch in height.Is there way to add smoothing and deblocking to the short code i used first?If not how can i add controls to the second code? I also use external videos and buttons to change them how i make sure one is unloaded from memory after another one loaded, for both codes.
View 0 RepliesI followed a tutorial on youtube on how to make a custom flash player but the guy never uploaded continuing videos. Here's the link to the video: [URL]...So all I have now is a 3.0 Action Script file with a layer that has this code in it:
//Vars
var video:Video;
var netCon:NetConnection;
var stream:NetStream;
[Code]...
I am creating a full screen FLV player and I am using the
Stage["fullScreenSourceRect"] = new Rectangle();
method. The problem is, when I go to fullscreen my video controls are zoomed in as well making them a bit pixelated. I have seen some players like the one on
[URL]
where they achieve full screen video and still keep the controls the same size.
I have a puzzle. I have some test movie clips that areoperated (played) by pressing a thumbnail. All works ok in theresultinmg html and flash file that is produced, but when I importthe flash movi into DW, the controls disappear, but the movieplays...if you look at the link below you can see the flash moviecontrols in operation OK[URL](press thumbnail 2 to play the test movie)
View 4 RepliesI need to access and stream flash video stored on a US server. I do so from one of three PCs - all running Windows 7, all with same updates and same version of Flash. Two of them show a given video fine. The third runs the same video but it is clearly truncated on the right and bottom - that is, only part (top left two thirds?) of the video is visible. And two show timecode and the third...doesn't (or its hidden by the truncation). But how can this be? And more importantly, what can I do to make the third PC play streaming video correctly?
View 1 RepliesI am not sure how to accomplish what I need. I'm developing an iOS video app. I will package ALL videos with the ipa.I created a net connection and net stream successfully. I'm importing them into an array. They play perfectly. However, I need a way to mask out the main interface. Ideally, I'd like to drop that video into a dynamically called movie clip that has the controls in it. I made one called holder_mc.(There are no controls in it yet.) I cannot seem to get that on screen at the right z-index (not sure if that's the right term). I tried creating an empty movie clip and putting the video in it. That did not work either. This has to be simple.
View 1 RepliesI'm trying create an expandable banner that when expands plays a video that has play, pause, mute buttons and a seek bar.
I've successfully created the video player and converted it to a symbol and it works when I copy it into other flash files so I know it's the banner that troublesome.
The problem is when I use it in the expanded part of the expandable banner I can't click on any of the buttons. I can see it's working as the video is playing and the seeker bar is moving. It's almost as if there's an invisible button over the top (the hand icon is visible) stopping me from hitting the buttons of the player.
The code for the expanding banner is very simple (see below)
on (rollOver) {
gotoAndStop(2);
}
on (rollOut) {
gotoAndStop(1);
}
How can I streem a video into flash and have the user be able to pause play stop and ff and RW? I can play a streeming video now but I can't get it to respond to controlls.
Here is how I'm importing it.
url = "http://www.hotflashtoons.com/video/SIIDUnratedTrailer.flv";
// initialize net connection and stream
var netConn:NetConnection = new NetConnection();
netConn.connect(null);
[Code].....
I have three videos recorded from different angles of the same subject. As you can see in the attachment, I need to see one video screen with 3 buttons to jump between the different angles. The transition between the videos should be immediate.I thought of loading the videos internally, but they are over the 16000 frames so they will not load properly into Flash - so using .flvs may have to be the only option. I figured if I could get all three videos started at the same time then I could toggle the viability, but how can I get the three videos to start at the same time?
View 4 RepliesI'm have a flash movie where I let the viewer push a button to load an external SWF-which in itself is a video I converted to SWF. Once it loads via an empty movie clip into the main flash movie how can I add video player controls such as volume on the lower part of the stage of the main movie to control the externally loaded SWF?
View 1 RepliesIm working on a video player, and I have a button for full screen, which function properly, however, the controls that surround it are stretched with the video when full screen is active. So I've been attempting to find ways to detect when fullscreen is active to change the controls, but nothing seems to work. I've used both FullScreenEvent and Event.RESIZE. Everytime, it can detect when it goes full screen (aka a black box is placed on the stage) but when i go back to normal screen, it doesnt detect that activity (and the black box remains).
Please see code below. I am trying to do this all inside a class which i will have an instance of on the main stage.
Code:
import flash.display.*
import flash.utils.Timer;
import flash.events.TimerEvent;
import flash.events.FullScreenEvent;
import flash.display.SimpleButton;
[Code] .....