Play multiple videos (all on xml file) to play on button action

I am trying to make a swf with one FLV playback player and 6 buttons.
I've got 6 different videofiles that I want to have linked to this swf. Some of the videos are quit large.
When starting the Swf, the first video has to start, after playing it, it has to stop. Then you must be able to choose which video to play by clicking one of the buttons. I don't want to have small thumbnails of the video, just plain and simple buttons.
I have to have all my files, both fla, swf and xml files in the same directory (I cannot have them stored in different folders, since I have to upload this to a cms system which has limited upload properties).
I've tried to find the right script on the internet, I'm not very good at scripting myselve, actually rather poor educated there...
It seems to me that I have to make an xml file with a list of all my videos, I have my default swf ready, with a FLVplayback and buttons.
Now there's just the coding part....
Please can someone help me out here?

assign your flvplayback component an instance name (eg, flv).  you can then assign its source property to play your flv files.
for example:
btn1.addEventListener(MouseEvent.CLICK,f1);
function f1(e:Event0:void{
flv.source="yourflvcorrespondingtobtn1.flv";

Similar Messages

  • Snow Leopard iTunes 10.5 will not play multiple video tracks in QuickTime .MOV files

    I recently discovered that Snow Leopard iTunes version 10.5 won't play multiple video tracks in a QuickTime .MOV file.
    Both video tracks appear and play correctly when playing the file in:
    - QuickTime Player 10 or QuickTime Player 7.7 on the same Snow Leopard machine
    - iTunes 10.3.1 on another Snow Leopard machine
    - iTunes 10.5 on Leopard or Windows 7
    So I think the problem is iTunes 10.5 on Snow Leopard (although I haven't been able to test iTunes 10.4).
    First test file is two 640x480 video tracks side-by-side (total dimensions 1280x480):
    http://160.94.17.23/demo/two-video-tracks-1280x480.mov
    All I see is the first (left) video track, and not the right one.  iTunes "Get Info" command incorrectly reports the video dimensions of the file as 640x480.
    Second test file is two 640x480 video tracks played one after another (duration of 10 seconds each):
    http://160.94.17.23/demo/two-video-tracks-640x480.mov
    All I see is the first video track, and although it reports the correct file duration (20 seconds), the second video track never appears -- it simply freezes on the final frame of the first video track for the last 10 seconds.
    Anyone else see similar behavior?  Unless I'm missing something, I suppose I should submit this as a bug to Apple.

    I have the same problem, i tried re-installing, converting it to AVC H264 but none seems to work so far

  • Using ControlBarSample to Play Multiple Videos

    I'm trying to modify the ControlBarSample to play multiple videos and I'm running into a wall. I've made a few simple modifications to the control bar sample to try to play a second video file. The problem I'm having is the control bar doesn't have a reference to the new video I play and therefore can't update it's view. I'd like to be able to remove the video element playing in the ParallelElement and add a new child MediaElement and have the controlbar refresh it's reference to the new target. Also the controlbar shouldn't have to reload itself, but should stay right where it is in the display list and in the root parallel element. Can someone guide through this? Here is my simple modification to the ControlBarSample class as a starting point.
    package
         import flash.display.Sprite;
         import flash.events.MouseEvent;
         import flash.text.TextField;
         import org.osmf.elements.ParallelElement;
         import org.osmf.events.MediaFactoryEvent;
         import org.osmf.layout.HorizontalAlign;
         import org.osmf.layout.LayoutMetadata;
         import org.osmf.layout.VerticalAlign;
         import org.osmf.media.*;
         import org.osmf.metadata.Metadata;
         [SWF(width="640", height="360", backgroundColor="0x000000",frameRate="25")]
         public class ControlBarPluginSampleMod extends Sprite
              public function ControlBarPluginSampleMod()
                   // Construct an OSMFConfiguration helper class:     
                   osmf = new OSMFConfiguration();
                   // Construct the main element to play back. This will be a
                   // parallel element, that will hold the main content to
                   // playback, and the control bar (from a plug-in) as its
                   // children:
                   osmf.mediaElement = constructRootElement();
                   osmf.view = this;
                   // Add event listeners to the plug-in manager so we'll get
                   // a heads-up when the control bar plug-in finishes loading:
                   osmf.factory.addEventListener(MediaFactoryEvent.PLUGIN_LOAD, onPluginLoaded);
                   osmf.factory.addEventListener(MediaFactoryEvent.PLUGIN_LOAD_ERROR, onPluginLoadError);
                   // Ask the plug-in manager to load the control bar plug-in:
                   osmf.factory.loadPlugin(pluginResource);
                   // button to play the next item
                   var label:TextField = new TextField();
                   label.text = "PLAY NEXT";
                   label.x = 10;
                   label.y = 3;
                   label.mouseEnabled = false
                   button = new Sprite();
                   button.buttonMode = true;
                   button.addChild( label );
                   button.graphics.beginFill(0x00FFFF,1);
                   button.graphics.drawRect(0,0,90,20);
                   button.addEventListener(MouseEvent.CLICK, onButtonClick);
                   addChild(button);
              // Internals
              private var osmf:OSMFConfiguration;
              private var rootElement:ParallelElement;
              private var button:Sprite;
              private function onPluginLoaded(event:MediaFactoryEvent):void
                   // The plugin loaded successfully. We can now construct a control
                   // bar media element, and add it as a child to the root parallel
                   // element:
                   rootElement.addChild(constructControlBarElement());
              private function onPluginLoadError(event:MediaFactoryEvent):void
                   trace("ERROR: the control bar plugin failed to load.");
              private function constructRootElement():MediaElement
                   // Construct a parallel media element to hold the main content,
                   // and later on, the control bar.
                   rootElement = new ParallelElement();
                   rootElement.addChild( constructVideoElement(VIDEO_HTTP) );
                   // Use the layout api to set the parallel element's width and
                   // height. Make it as big as the stage currently is:
                   var rootElementLayout:LayoutMetadata = new LayoutMetadata();
                   rootElement.addMetadata(LayoutMetadata.LAYOUT_NAMESPACE, rootElementLayout);
                   rootElementLayout.width = stage.stageWidth;
                   rootElementLayout.height = stage.stageHeight;
                   return rootElement;
              private function constructVideoElement(url:String):MediaElement
                   // Construct a metadata object that we can append to the video's collection
                   // of metadata. The control bar plug-in will use the metadata to identify
                   // the video element as its target:
                   var controlBarTarget:Metadata = new Metadata();
                   controlBarTarget.addValue(ID, "mainContent");
                   // Construct a video element:
                   var video:MediaElement = osmf.factory.createMediaElement(new URLResource(url));
                   // Add the metadata to the video's metadata:
                   video.addMetadata(ControlBarPlugin.NS_CONTROL_BAR_TARGET, controlBarTarget);
                   return video;
              private function constructControlBarElement():MediaElement
                   // Construct a metadata object that we'll send to the media factory on
                   // requesting a control bar element to be instantiated. The factory
                   // will use it to parameterize the element. Specifically, the ID field
                   // will tell the plug-in what the ID of the content it should control
                   // is:
                   var controlBarSettings:Metadata = new Metadata();
                   controlBarSettings.addValue(ID, "mainContent");
                   // Add the metadata to an otherwise empty media resource object:
                   var resource:MediaResourceBase = new MediaResourceBase();
                   resource.addMetadataValue(ControlBarPlugin.NS_CONTROL_BAR_SETTINGS, controlBarSettings);
                   // Request the media factory to construct a control bar element. The
                   // factory will infer a control bar element is requested by inspecting
                   // the resource's metadata (and encountering a metadata object of namespace
                   // NS_CONTROL_BAR_SETTINGS there):
                   var controlBar:MediaElement = osmf.factory.createMediaElement(resource);
                   // Set some layout properties on the control bar. Specifically, have it
                   // appear at the bottom of the parallel element, horizontally centererd:
                   var layout:LayoutMetadata = controlBar.getMetadata(LayoutMetadata.LAYOUT_NAMESPACE) as LayoutMetadata;
                   if (layout == null)
                        layout = new LayoutMetadata();
                        controlBar.addMetadata(LayoutMetadata.LAYOUT_NAMESPACE, layout);
                   layout.verticalAlign = VerticalAlign.BOTTOM;
                   layout.horizontalAlign = HorizontalAlign.CENTER;
                   // Make sure that the element shows over the video: element's with a
                   // higher order number set are placed higher in the display list:
                   layout.index = 1;
                   return controlBar;
              private function onButtonClick(event:MouseEvent):void
                   playNext(VIDEO_RTMP);
              private function playNext(url:String):void
                   rootElement.removeChildAt(0);
                   rootElement.addChild( constructVideoElement(url) );
              /* static */
              private static const VIDEO_HTTP:String = "http://mediapm.edgesuite.net/osmf/content/test/logo_animated.flv";
              private static const VIDEO_RTMP:String = "rtmp://cp67126.edgefcs.net/ondemand/mediapm/strobe/content/test/SpaceAloneHD_sounas_640_500_short";
              private static var ID:String = "ID";
              // Comment out to load the plug-in for a SWF (instead of using static linking, for testing):     
              //private static const pluginResource:URLResource = new URLResource("http://mediapm.edgesuite.net/osmf/swf/ControlBarPlugin.swf");
              private static const pluginResource:PluginInfoResource = new PluginInfoResource(new ControlBarPlugin().pluginInfo);

    It appears that this may be accomplished more easily if I do something similar to the StrobeMediaPlayback implementation. Looking at the StrobeMediaPlayback source code it looks like Adobe has done something a little different than their ControlBarPlugin, placing the controlbar and root media element inside separate MediaContainers and then adding those containers to the display list. Is this recommended over using the frameworks ParallelElements? If so, is communication between the control bar and root media element still a matter of just updating the target reference via metadata?

  • Why does my music player on my iPhone 4 always revert back to the same song when in shuffle mode even tho I have played multiple songs since that first song was played.very frustrated

    Why does my music player on my iPhone 4 always revert back to the same song when in shuffle mode even tho I have played multiple songs since that first song was played.very frustrated

    SHuffle does not play songs in a truly random fashion.  Like all computer related random generators the sequence is pseudo-random

  • What is good practice for playing multiple video's in a single swf?

    Hello,
    I have build in the past a video wall with video's inside. After building this i came across some problems.
    If you have too many video players loading at once it takes a lot of processing and the tweens in the
    page while loading the video's where not moving fluidly, but more in a stuttering way.
    After lot's of test i found a good working solution.  I imported the flv video's into flash en exported them on the timeline
    as a embedded swf.  Then i externally loaded these swf files and that performed much better.
    Is it even good practice to load multiple video instances at once? I used this time the LoaderMax of greensock but the video's
    only play after it's completely loaded. I would like to find a way to progressive play all video's at.
    Does someone has experience with this?
    Regards,
    Chris.

    How about an XML file which supplies the title for each movie and the location or source of the video to be played?  Simple version below.
    <?xml version="1.0" ?>
    - <playlist>
    <video src="Gfx/video/Alex1.f4v" title="John Deere 330" />
    <video src="Gfx/video/Benni1.f4v" title="Hitachi Z240F" />
    <video src="Gfx/video/Scotti1.f4v" title="Hitachi Z350F" />
    <video src="Gfx/video/Scotti2.f4v" title="Hitachi Z350F" />
    </playlist>
    JR

  • Playing multiple videos in sequence

    Hello all. I'm a complete newbie to Flash development, but
    have been thrown into it with not just a deadline, but a (to me)
    "complex" project. I have a Flash project which currently opens and
    plays a video as part of whats on "the stage". I now need to add 2
    more videos which will play, in sequence, after the first one
    finishes. I've gone through the tutorials, read the help files, and
    now I'm just feeling a bit "DUH" because I still can't figure out
    how to do this. Anybody out there care to help a poor ol' graphics
    guy avoid the bitter wrath of his boss?

    A single instance of FLVPlayback can handle multiple videos.
    I can't remember what the upper limit is. So you can switch between
    them based on user input. But I believe it can only ever play one
    at any one time. I've used FLVPlayback quite a lot but not for what
    you're describing, so can't answer from direct experience.
    Check out this page, and the trivial example at the end
    (whether its streaming or progressive is irrelevant here, streaming
    should work just as well, but perhaps you need to use SMIL files
    for the streaming contentPath?)
    http://livedocs.adobe.com/flash/9.0/main/00002980.html#wp3780233

  • Playing multiple videos on the same page in Dreamweaver CS4?

    Suppose on my website, I have a few dozen videos, all of them embedded YouTube videos. When the user goes to the page, Video 1 is up and ready to be played. Below Video 1 is a list of the other videos (Video 2, Video 3, and so on), each with a thumbnail picture. When the user clicks this thumbnail page, the new video is loaded (eg: if they click on the thumbnail for Video 2, Video 2 is up and ready to be played).
    What do I do in Dreamweaver CS4 so the new video loads without redirecting the user to another page? With so many videos, I imagine that it isn't efficient to have a separate page for each video. 

    Hi
    You can do this by using an xml playlist for your videos, (do a search for "creating flash xml playlists").
    PZ

  • Sending multiple IDocs (all in single file) to FTP via XI

    Hi All,
    We have a requirement as below where we are looking for various feasible solutions.
    The requirement is to collect multiple IDocs in ERP (2000-5000 in number) per day (either Flat File or XML) and needs to be sent as a single File (which has all these IDocs) to FTP Server via XI.
    BPM is not allowed to use and we are working on PI 7.0, so IDoc packaging is also not applicable. There is no mapping required, we need to just route them to FTP from ERP System.
    Looking forward for various solutions.
    Regards,
    N. Jayanth Kumar.

    Hi,
         Using the XML file port at R/3 to collect the Idocs would be a feasible solution. Also, as Sunil as already pointed out, you can configure this as a pass through interface, which will improve your overall processing time.
    Another solution can be to pass the Idocs to PI and then use the append mode in the receiver file adapter to collect the days idoc into a single file.
    To append only idocs for a particular day, try using dynamic filename, where file would have the date in it. This way, only Idocs for a particular day would be appended.
    Regards

  • Play multiple videos in sequence

    Hi,
    I've multiple videos stored in FMS and would like to merge them into a single video object in order to play all of them in sequence (so that a user thinks it's a single longer video). Is it possible?

    This is a link from 3.5 but have you tried this:
    http://www.overdigital.com/2009/08/02/flash-media-server-as-video-editingstitching-tool/

  • Captivate 7 HTML 5 publish does not play multiple videos on same slide on Android devices

    Hello,
    I have a captivate module which has 2 videos on same slide. There are 2 buttons, clicking on which the videos appears. However when i test this on iPad or any Android device, it plays on 1 video. I used Event video. Can someone please help me on this?
    Regards
    Manoj

    I don't think you are missing anything. I am using the "Light_PAssage" animantion, but switching to the one you used has no impact.
    For me, if there is a text animation on slide one, it will play in File->Preview->Play Slide. It will not play in FIle->Preview->Project, From this slide, or Next 5 slides.
    The issue occurs in all my Captivate 5 projects, including projects that previously generated properly working outputs as recently as 2/23/2011.
    Is it possible it's related to Flash player? I am using Adobe Flash Player 10 ActiveX 10.2.152.26.
    I will send an example cptx to your email address. The example includes a blank slide one, and the text on slide 2 plays as expected in the previews and in the generated output. If I remove the blank slide 1, the text animation on the new slide 1 no longer plays.
    Thanks.

  • When playing a particular Shockwave (swf) file, the shockwave program stops playing when trying to read XML files. How do I fix this?

    The shockwave program accesses data that is stored in multiple XML files.

    You know what's odd?
    Yesterday I said it wasn't working and gave up on it. I read this message and I know I had all my animations set to 0.125 - thanks to some past forum questions you've answered- to which I double checked within InDesign.
    Anyway, I went to check the saved folio preview - the one that didn't work- and now it works.
    I didn't' change anything from when I gave up on it yesterday.
    I guess this is answered, although I do not know what happened to the same folio that didn't work yesterday, to work today.
    -Shawn

  • Playing multiple videos in single FLV instance.

    Hi, I'm trying to get a video application to work. The basic
    question I have is: can i get multiple videos on a flash streaming
    server to play in a single FLVPlayback instance? (I want the user
    to be able to choose the video based on a button, not play in
    succession.) Or do I have to set up a custom player using
    NetConnection and NetStream classes along with the
    NetStream.play(vidname) method ?
    I really need to be pointed in the right direction on this
    because the project is due asap.
    Thanks!!!

    A single instance of FLVPlayback can handle multiple videos.
    I can't remember what the upper limit is. So you can switch between
    them based on user input. But I believe it can only ever play one
    at any one time. I've used FLVPlayback quite a lot but not for what
    you're describing, so can't answer from direct experience.
    Check out this page, and the trivial example at the end
    (whether its streaming or progressive is irrelevant here, streaming
    should work just as well, but perhaps you need to use SMIL files
    for the streaming contentPath?)
    http://livedocs.adobe.com/flash/9.0/main/00002980.html#wp3780233

  • Aperture crashes upon trying to play video. Exporting .AVI file wont play.

    Hi,
    I uploaded my holiday pictures and 4 videos into Aperture and when I try to play the videos I get pretty bad beachball with no playback of the video. When I export the file I am presented with a SAM_xxx.AVI file. (SAM from Samsung camera). I have tried to play the file with Quicktime, VLC & MPlayer X. I ran the 4 files through DivFix++ and I am given the error, "Input file is not .avi"
    Any thoughts as to whats going on? Aperture shows a thumbnail for the videos and VLC shows correct length but no playback.
    Thanks

    I have both an iPad and iPhone connected to my Mac. I disconnected both, then restarted my Mac and Safari. No improvement. Used Lion Recovery System to reload Lion. Interesting thing, Safari 5.1.7 was installed rather than Safari 6. This made me happy, as Safari 6 has been nothing but trouble for me. When I opened Safari, it took me back to apple.com, even though my homepage is yahoo.com. I was immediately confronted with the infamous Steve Jobs video, that has crashed my computer every time it's popped up on my screen. This time, however, it didn't crash ... I just got the spinning beachball for about 30 seconds, then the Quicktime thermometer at the bottom started moving and I was sure it was going to work. After the thermomter passed about one-fourth of the way over, the screen blanked and the Quicktime thermometer started all over again. This behavior persisted until I got tired of it and went to my home page. However, I can open Quicktime and watch videos again, even the YouTube ones that were crashing every time. Now I just have to figure out how to never let a Software Update stick me with Safari 6 ever again. If it does, I'm simply through with it and will make Firefox my default browser. Thank you so much for getting me this far. I will keep monitoring these discussions to see if Apple ever gets Safari 6 to the point that I'll give it another trial.
    Eddie

  • Capturing Hi Def Video and transfering XML files from IMovie

    ...I'm new to Mac, and FCP...worked on AVID for years...I have two questions
    I have a new Imac which came with FCP HD...I've hooked up my sony HDR-HC7 camcorder...When I attempt to capture, I cannot seem to find the capture screen, with machine control and mark in/out functions, that is referenced in the user guide. Instead, the capture mode displays a small box and then engages automatically and digitizes from where ever my camcorder happened to be parked. The actual digitize screen has no buttons other than a stop function. Is there some system setting that has to be selected to give you the capture screen with machine control?
    The system works perfectly in I-Movie, where I have full machine control....
    As a work around I tried to do a rough edit in I Movie and import the project into FCP HD. I was able to export the project, but when I went into FCP and selected import file, it would not open the "XML File.xml" I could see it, but it remained light grey and was not selectable...any thoughts?
    Thanks!

    Going back to the first part of your question about capturing HD from a camcorder in FCE:
    Importing standard DV into FCE you can set in and out points for importing clips, and FCE controls your camera like in iMovie. If you are importing HD footage to FCE, you can only start importing using the capture control, and FCE will start its capture from where ever the camcorder head is in the video. There are none of the camera control features available like in standard DV and iMovie.

  • Quicktime playing multiple videos question

    Hello Everyone.
    This is probably more of a html/java/flash based question but I thought I would start here as it revolves around the QT Player.
    I have a webpage
    http://www.drewwfilms.com/Temp/Ket/KetWedding.html
    On this page is the QT Player.
    Beneath the player are 3 buttons. When a viewer clicks one of those buttons I want it to load the respective video related to that button into the player without the browser loading a new page. Is this possible?
    Can someone steer me the right direction? Or help me out? I'm not even sure how to google search this. I tried Multiple Videos, 1 QT player Web - and I didn't get anything that helped.
    Thanks!

    I've been having this truly obnoxious problem ever since I installed Lion. Whenever I open a Quicktime video or a preview jpeg (and sometimes a Word document) - the last two or three documents I've viewed in these programs also open.
    This is the normal default mode for Lion which now "remembers" what documents (files, movies, images, etc) were opn when you last "Quit" each application. Either learn to close the documents before "quitting" the app or turn this feature off. (I.e., deselect the "System Preferences > Personal > General > Restore windows when quitting and re-opening apps" option.)

Maybe you are looking for

  • How can I change a wrong e-mail adres in the Adobe ID for an E-Reader.

    I have an Adobe ID for Digital Editions for my pc. Then I connected an E-Reader to my pc and I had to authorize the reader with an Adobe ID. I thought it would be the same as the ID for my pc, but the system send my the message that this ID already w

  • Best Practice to use one Key on ACE for new CSR?

    We generate multiple CSR on our ACE....but our previous network admin was only using one key for all new CSR requests. i.e.......we have samplekey.pem key on our ACE we use samplekey.pem to generate CSR's for multiple certs.. is this best practice or

  • All of a sudden my itunes tv/movie purchases are not playing on my air?

    Hi all, I used to be able to watch show/movies I purchased from itunes on my MacBook Air but all of sudden I have started to have issues. When I download something and press play all I get is a green screen. I have tried different shows and nothing s

  • Re-sizing, align right while keeping the menu fixed using flash AS2

    contact khuon mau My problem is recreating the align right effect while keeping the menu fixed using flash AS2 mostly for re sizing as well as different screen sizes. While i can do one or the other but both is just not happening. I have tried all so

  • Converting Flex classes to Flash

    Hi, I am working on a project that is implemented in Flash CS3 (AS3) but needs some utility classes previously developed in Flex2. Are there any guidelines/libraries/etc that I can use to convert the Flex classes to Flash. As an example, some of the