Flash dynamic video player

I made a flash player that players FLV videos dynamicly. The
only problem is when I try to make the controls they don't work.
Can someone please help me? Here is the actionscript....
// initialize net connection and stream
var netConn:NetConnection = new NetConnection();
netConn.connect(null);
var netStream:NetStream = new NetStream(netConn);
myVideo.attachVideo(netStream);
netStream.play(url);
//hide the standard menu-items for right click menu
my_cm = new ContextMenu();
//hide the standard menu-items for that object
my_cm.hideBuiltInItems();
my_cm.customItems.push(menuItem_cmi);
function onPause(obj, menuItem) {
trace("You choose: "+menuItem.caption);
_root.menu = my_cm;
myVideo.playButton= play_btn;
myVideo.pauseButton= pause_btn;
myVideo.backButton= rewind_btn;
myVideo.playButton= play_btn;

var connection_nc:NetConnection = new NetConnection();
connection_nc.connect(null); //This parameter tells the Flash
Player that the FLV content will be streamed over HTTP, not RTMP.
var stream_ns:NetStream = new NetStream(connection_nc);
var my_video:Video;
my_video.attachVideo(stream_ns);
stream_ns.play("VTS_01_1.flv");
play_btn.onRelease = function() {
stream_ns.pause(false);
pause_btn.onRelease = function() {
stream_ns.pause();
stop_btn.onRelease = function() {
stream_ns.seek(0);
stream_ns.pause(true);
this.onEnterFrame = function():Void {
tTime.text = stream_ns.time.toString() + " sec";

Similar Messages

  • Flash Lite & Video Player on Mobile Devices

    Hello,
    Does anyone know what mobile devices support videos through a
    Flash player? I know there is limited support based on device, but
    was wondering if anyone knows a source of specifics in relation to
    the new Flash Lite 2.x.

    Alessandro,
    does that mean that 6120 Classic owners will be stuck with
    Flash lite 2.0 forever ? or is it possible that we can install
    future versions of Flash lite ? I bought my 6120 Classic last week,
    after seeing the Flyer Framework. I need Xml sockets for a mobile
    version of an web application I wrote. i can't imagine having to
    buy a new device... what's your guess ? stuck with FL 2.0 ?
    thanks,
    Tim

  • Can I make a dynamic video player stop just by exiting the frame and entering a new one?

    Ok so I have a flash presentation with a video clip which I am playing dynamically using a URL netStream. The problem is not getting it to play but rather getting it to stop playing. If I click the stop button, it stops, But if I just navigate to  a new frame, the video disappears but I can still hear the audio. (the only reason it disappears is because i used "video.visible = false" on all other frames other than the one I need it to play on. Additionally, If I navigate to a new frame while the video is playing, I cannot stop it or restart if I return back to the frame that the video is located on. Its like all my video control buttons are rendered useless if I leave the frame while it is playing. Do I need some sort of eventlistener or custom function? I hope I explained that well enough.
    Here is my code if anyone has any suggestions.
    Thanks!
      //video code
      var video:Video = new Video(480,204);
      video.y = stage.stageHeight / 2 - 278 / 2;
      video.x = stage.stageWidth / 2 - 290 / 2;
      addChild(video);
        var nc:NetConnection = new NetConnection();
      nc.connect(null);
      var ns:NetStream = new NetStream(nc);
      ns.addEventListener(NetStatusEvent.NET_STATUS, onStatusEvent);
      function onStatusEvent(stat:Object):void
      trace(stat.info.code);
      var meta:Object = new Object();
      meta.onMetaData = function(meta:Object){
      trace(meta.duration);
      ns.client = meta;
      video.attachNetStream(ns);
      btn_playvid.addEventListener(MouseEvent.CLICK, playFunction);
      function playFunction(evt:MouseEvent):void
      ns.play("assets/movie.mp4");
      btn_stopvid.addEventListener(MouseEvent.CLICK, stopFunction);
      function stopFunction(evt:MouseEvent):void
      ns.pause();

    You need to call your stopFunction if you leave the frame as the video will continue to play. When you come back to this frame, you're creating a new video instance and NetStream, etc... If you place your video at a random x,y you should see that you have multiple video instances. You need to separate your init code from your control code.

  • How to make a Poster Frame in a Flash 8 Video player

    Hi to all,
    I want to make a poster frame (a simple jpg)
    to display before the FLV video plays.
    So first the user to click the play button or on this poster frame.
    The code below does exactly what I need, but it is in Flash CS4.
    How could I do the same with Flash 8 Pro (ActionScript 2.0)?
    Any help?
    import fl.video.VideoEvent;
    function showPosterFrame(event:Event):void {
        myPoster.visible = true;
    function hidePosterFrame(event:Event):void {
        myPoster.visible = false;
    function playMovie(event:MouseEvent):void {
        myVideo.play();
    myPoster.addEventListener(MouseEvent.CLICK, playMovie);
    myVideo.addEventListener(VideoEvent.PLAYING_STATE_ENTERED, hidePosterFrame);
    myVideo.addEventListener(VideoEvent.COMPLETE, showPosterFrame);
    Iason_K

    are you using an flvplayback component?

  • Screen/movie capture apps for qt movies or flash 8 video player

    was helped with this by J walker.
    i am trying to view the code in firefox or safari
    from this video
    http://www.planetphotoshop.com/videos/flash_depthoffield.html
    but do not see a url with mov
    is this downloadable
    besides snapz pro is there a free app that allows for screen/movie capture?
    right clicking here does not allow saving to drive
    thanks

    check for a typo:
    myflv.flv and myflv.FLV will both work locally but not online.

  • YouTube dynamic loading video player

    Hi!
    I'm new to flash but have some experience with flash and need to create a dynamic video player that will play YouTube videos in a random order.  I was wondering what would be the best way to accomplish this?  Do any of you have any suggestions or could point me to a tutorial that would help me figure this out?
    Thanks in advance!

    Hello,
    Here are the Vidoes of Problem with HTC Rezound.
    1) 4G LTE signal is excellent, 2)the phone is out of box so no issue of any cache, 3)Update the firmware and Youtube app from market.
    Still the same problem
    Before Update, Out of box
    http://www.youtube.com/watch?v=OuURZ7Avd0s
    After Updating firmware and Youtube apps
    http://www.youtube.com/watch?v=lhf56Y5jioQ
    Compare with Galaxy Nexus,
    http://www.youtube.com/watch?v=mMjOecLLiBE

  • Flash 8 Video Workshop

    Hello Everyone,
    The Rich Media Institute (www.richmediainstitute.com) is
    pleased to present a workshop all about Flash 8, Flash video, and
    Action Script. This will be a great opportunity to get up to date
    with ActionScript and learn the amazing things that Flash can do.
    You will learn how to make a Flash 8 video player like this
    one:
    http://www.almerblank.com/magnet/active/
    Workshop: Inside Flash 8
    Dates: Fri + Sat, June 16 + 17
    Location: Venice, California
    Price: $490 with code "LAFLASH" (price includes copy of the
    DMTS Flash
    8 DVD with over 8 hours of training material and source
    code)
    URL:
    http://www.richmediainstitute.com/training/flash8/
    If you have any questions, email me, Jonathan Menendez,
    [email protected]
    Thank you,
    Jon

    This is the forum for the Flash Media Live Encoder - please
    post issues related to the Flash Video Encoder to the Flash
    Professional forums

  • Adobe Flash and Flash based Video Players and the ps command

    OK, I have two v20z servers. I just reinstalled Solaris 08/07 on both of them. These are both Sunray servers. One of the servers is fully patched and has SRSS 4.0 installed and serving Sunrays just nicely. I just finished installing Solaris on the 2nd server.
    On the first one I'm not sure what whacked things, the patches or SRSS
    If I go to a site with a flash based video player like youtube, Firefox or Mozilla will freeze untill the video is fully streamed.
    Also on this server the "ps" command is super slow. I like to do ps -efa|grep whatever to find processes. This unbearably slow on this 1st server.
    On the 2nd server I haven't yet patched it or installed SRSS. I think though it's the patches and not SRSS
    On this server the Flash 7 that comes preinstalled works fine on streaming videos. It also works fine with Flash version 9,0,47,0. I even copied the 9,0,47,0 version of flash from the server that where flash is freezing, so it's not flash that is the problem I don't think.
    Normal flash animations work fine, it's just flash based streaming video players.
    Something after patching seems to have done this
    Anyone else have a really slow ps and flash that freezes the browser while watching videos?

    *** BUMP ***
    Really? No one else has experienced this? I can easily recreate the issue, but can't find any fix.

  • Flash Random Video

    I want to play flash flv video randomly from specific folder.
    Is there any one who can help me to solve this problem.
    Description:
    I create a flash flv video player usging flash 8. But this
    palyer only can play one flv flash video file. I want a player in
    flash 8 which can able to read flash flv video from one folder
    romdomly.
    if you want contact with me plz mail me
    [email protected]
    Level Ten
    Solutions

    Well, I'm not sure about reading from a DIR, but if you use
    an array with the video names, you could do something like this:
    var videoCollection:Array = ["video1","video2","video3"];
    function playVideo():Void {
    _root.FLVComp.contentPath=videoCollection[random(videoCollection.length)]
    + ".flv";
    }

  • Creating a Video Player with Dynamic Draggable Playlist. Is it doable in Flash? Help Please

    Hello Everyone,
    I am scripting a video player and one of its functionalities
    is to be able to have a playlist that can be arranged by the user
    in any order user like. For Example, if there are lets say 5 videos
    within the playlist:
    SONG 1
    SONG 2
    SONG 3
    SONG 4
    SONG 5
    User can then change the order of the videos by clicking on
    any video and dragging it up or down just like windows mediaplayer
    and the player should play the videos in such order.
    So far, I have been able to use the list component but am not
    sure if it will allow the dragging.
    I would highly appreciate it if you guys can suggest what
    should I do to handle this functionality.
    Thanks.

    Hm, you could define ‘slots’ with rectangles and
    each slot would map to a specific slot in some
    ‘playlist’. Then create your own ‘list
    renderer’ that attaches draggable clips based on the playlist
    array. During drag and drop, you’d detect which
    ‘slot’ the movieclip was dropped into, which would
    define where in the playlist array it should be inserted.
    Then shift the elements around, insert the item in the array,
    and rerender the list.
    (I’m sure there are probably better/neater ways to do
    this as well, this is just quickly off the top of my head).

  • Hyperlink to Flash Video Player

    Does anyone know how to push a specific video to a Flash
    video player playlist? I'm using the following Flash video
    player/pplaylist application. Any help would be great!!!
    Creating a Dynamic Playlist for Progressive Flash Video
    http://www.adobe.com/devnet/flash/articles/prog_download.html

    Without seeing this is a guess, but if you are linking to the
    swf directly
    then that is what happens. Create a new page with the movie
    on it and link
    to it, then it should size correctly.
    Gary
    "SCBrazil" <[email protected]> wrote in
    message
    news:gd0qbn$dr$[email protected]..
    > Hi,
    > I have developed a small Flash movie for one of the
    products on my site
    > which
    > I want to open from a link. The link and video work fine
    but it opens in a
    > full
    > size browser window, which makes the photos look pretty
    ugly. I want the
    > link
    > to open only the Flash Player so that the video is
    displayed in the size
    > it was
    > made (700px by 225px.)
    > Anyone know how I can do this? There must be a way,
    would the setting be
    > in
    > Flash CS3 or DW CS3?
    > Thanks
    >

  • Video Player X, Acrobat 10.1.4, and Flash

    I'm trying to troubleshoot a problem for someone who is troubleshooting it for someone else who is troubleshooting it for one if his users, so I don't have direct access to the machine I'm asking about and some of the info I have could be inaccurate.
    The document in question has several RMAs that display swf-based videos using the latest Video Player X (http://www.uvsar.com/projects/acrobat/videoplayerx/), set to begin when the page is opened and loop. For one user with Acrobat 10.1.4, they are not showing up and instead a FLV icon is displayed in the upper-left of one of the three RMAs on the page.
    Does anyone know what could be possible causes of this? I realize the captive player was decoupled, but exactly which version of Flash Player should be installed for 10.1.4? Is it different than the one for Acrobat 11? If an external player is not installed, or an insufficient player is installed, should the user be prompted to download the correct version?
    Thanks!

    Decoupling only affects the Acrobat XI Family and the latest update of the Acrobat 9 Family. At this time, Acrobat and Adobe Reader X are still hanging on to their copies of captive player (which is at 10.3.183.20 as of this morning).
    I have no idea where the FLV icon has come from (it's not in VideoPlayerX, if for some reason the media file won't play or the skin won't load, all you get is a blank box). Even if you overload Flash Player's memory stack by playing a heap of videos at the same time, all you should see is a drop in framerate (I've got test PDFs with 12 videos per page that all play in unison, albeit somewhat stuttery).
    Ping me offline if there's any stuff you can share, and I'd love to see a screenshot of this mysterious icon.

  • How to embed a flash video player in iWeb?

    I'm using this open source video player:
    http://www.jeroenwijering.com/extras/readme.html#installing
    I've customized it here:
    http://www.perlstrax.com/alexanderperls_musicvideos/flvplayer.html
    I'm trying to imbed it in an iWeb page using the "HTML Snippet" feature.
    This is the code that is recommended:
    <embed src="http://www.perlstrax.com/alexanderperls_musicvideos/flvplayer.swf" width="600" height="600
    type="application/x-shockwave-flash" pluginspage=
    "http://www.macromedia.com/go/getflashplayer" />
    </object>
    .... but I'm left with only a "white box" with the rotating circle...
    any ideas?

    Here is an updated version of the question which will hopefully make it useful for further users of iWeb... once an answer is found....
    I'm trying to embed this player into myspace and also into iWeb 2.0 as a "web widget":
    http://www.perlstrax.com/alexanderperls_musicvideos/flvplayer.html
    This HTML will make it work in Myspace and iWeb 2.0:
    <object enableJSURL="false" enableHREF="false" saveEmbedTags="true" allowScriptAccess="never" allownetworking="internal" type="application/x-shockwave-flash" data="http://www.perlstrax.com/alexanderperls_musicvideos/flvplayer.swf" height="300" width="312">
    <param name="movie" value="http://www.perlstrax.com/alexanderperls_musicvideos/flvplayer.swf" />
    <param name="allownetworking" value="internal" />
    <param name="allowScriptAccess" value="never" />
    <param name="enableJSURL" value="false" />
    <param name="enableHREF" value="false" />
    <param name="saveEmbedTags" value="true" />
    <param name="bgcolor" value="..FFFFFF" />
    <param name="wmode" value="opaque" />
    <param name="quality" value="high" />
    <param name="menu" value="false" />
    <param name="scale" value="showall" />
    <param name="flashvars" value="file=http://www.perlstrax.com/alexanderperls_musicvideos/playlist.xml&autostart=true&lightcolor=0xffcc00" />
    ...BUT ..... no menu shows up to select the video...
    I think the problem is that it's running the SWF file OK, but in order for it to work properly, it has to read data from this HTML file http://www.perlstrax.com/alexanderperls_musicvideos/flvplayer.html
    and this XML file: http://www.perlstrax.com/alexanderperls_musicvideos/playlist.xml
    Here is a recent discussion on placing these players in myspace:
    http://www.jeroenwijering.com/?thread=3007

  • Flash Video Player Need Help

    Hello everyone I am hoping someone here can help me.  I am going to school and I have an action scripting class.  For my final project we have to make a flash video player with a custom skin to upload to our websites. We did something similar to this with our first project which we made a player where the movies where embedded in the file itself but this is supposed to be a youtube like flash player where we can call in the files from another source.   
      We kind of got pressed for time and were not able to go into detail with this project so the teacher gave us the code and I put it in exactly how it should be but im pretty sure i have something misplaced or I am missing a step. I get 8 different errors when I go to test the movie. and nothing works.  Can someone please tell me what I am doing wrong or can you point me in the direction of a tutorial on this  as I have been searching for tutorials on this with no luck. 
    Here is my Action Script 3.0 CODE:
    import fl.video.FLVPlayback;
    import fl.controls.List;
    var vid:FLVPlayback = new FLVPlayback();
    vid.source= "fashion.flv";
    addChild(vid);
    vid.skin="SkinOverPlayStopSeekMuteVol.swf";
    vid.x=100;
    vid.y=300;
    vid.skinAutoHide="true";
    vid.width=500;
    vid.height=280;
    var vidList:List = new List();
    vidList.x= vid.x+10;
    vidList.y= 200;
    vidList.width=200;
    vidList.height=100;
    vidList.addItem({label:"Bathroom Behavior",data: "bathroom.flv"});
    vidList.addItem({label:"Chase Scene",data: "chase.flv"});
    vidList.addItem({label:"VMCAD Fashion Design Commercial",data: "fashion.flv"});
    addChild(vidList);
    vidList.addEventListener(Event.CHANGE,playVid);
    function playVid(e:Event):void{     
    vid.source=e.target.selectedItem.data;
    Here is a screenshot of the errors I am receiving.
    Please help me 
    thanks
    Message was edited by: BTwardy

    I don't know if what you posted is all that is in that as file, but you need to declare a package, then call the import statements, then declare the class name.  Like this:
    package {
         import flash.display.Sprite;
         import flash.events.Event;
         import fl.video.FLVPlayback;
         import fl.controls.List;
         public class Main extends Sprite {
              public function Main() {
                   var vid:FLVPlayback = new FLVPlayback();
                   vid.source= "fashion.flv";
                   addChild(vid);
                   vid.skin="SkinOverPlayStopSeekMuteVol.swf";
                   vid.x=100;
                   vid.y=300;
                   vid.skinAutoHide="true";
                   vid.width=500;
                   vid.height=280;
                   var vidList:List = new List();
                   vidList.x= vid.x+10;
                   vidList.y= 200;
                   vidList.width=200;
                   vidList.height=100;
                   vidList.addItem({label:"Bathroom Behavior",data: "bathroom.flv"});
                   vidList.addItem({label:"Chase Scene",data: "chase.flv"});
                   vidList.addItem({label:"VMCAD Fashion Design Commercial",data: "fashion.flv"});
                   addChild(vidList);
                   vidList.addEventListener(Event.CHANGE,playVid);
              function playVid(e:Event):void{     
                   vid.source=e.target.selectedItem.data;
    Then click on your stage in Flash, then open the properties window, and fill the Class text field with:   Main
    Make sure the as file is saved in the same folder as the flv.

  • Dreamweaver Flash Video Player

    Hi,
    I am a newbie to Flash and DreamWeaver. I thought I posted
    this yesterday but cannot find Posting.
    Can someone please help? Flash player and video work fine in
    Dreamweaver CS3 but do not work at all on Windows Vista PC with IE
    7. I have all the files installed on the web server's root. Don't
    think wrong path is the issue.
    Website: www.wepsicklecell.org
    Problem Page: Home page (index.html)
    Could someone please tell me what I am doing wrong?
    Thanks
    Julie

    Html doesn't control flash players. The skins, controls,
    buttons, etc are
    referenced by the SWF file. You would have better control
    over your video
    player if you compiled the FLV/SWF in a Flash program instead
    of DW.
    Nancy O.
    Alt-Web Design & Publishing
    www.alt-web.com

Maybe you are looking for