How would you reference respective video from diff class?

Hi. I wanted to get a couple of points of view (if you're willing to look ) on how others would do this because Im not sure where to even start.
I have a buttons class that puts 9 pictures on the stage and each one represents a different movie and leads to that movie when clicked (or will lead there once I figure out how to reference it to the specific movie).
I have 9 movies referenced through XML. And I am using flvPlayer. Currenly I can only have one movie loading. I am not sure how to get each one to play upon click of the respective btn.
Here is some of the code I think is pertinent if figuring how to go about this:
ProjectOneButtons class
//I have each picture loaded through an array and each button is waiting for the right code through a Switch statement:
public function onButtonClick(e:MouseEvent):void {
     var releventImageAray:Array = this["rowOfImages" + MovieClip(e.currentTarget).row];
     var imageWanted:String = relaventImageArray[MovieClip(e.currentTarget).column];
     switch (imageWanted) {
          case "Video1" :
               //Have not figured out the specific video code in class below
               //This switch statement continues for the rest of the buttons.
               //this code works but it just loads one movie and so I don't think this is what I need.
               projectOneVideos = new projectOneVideos();
               addChild(projectOneVideos);
               projectOneVideos.x = 0;
               projectOneVideos.y = 0;
Here is the ProjectOneVideos class where the videos are loaded and played:
package asFiles.projectOne{
     //import statments taken out for post
     public class ProjectOneVideos extends Sprite {
          public var videoX:Number;
          public var videoY:Number;
          public var projectOneVideos:XMLList;
          public var projectOneTotal:Number;
          public var projectOneXML:XML;
          public var xmlLoader:URLLoader;
          public var player:FLVPlayback;
          public var playBtn:VideoPlayBtn;
          public var pauseBtn:VideoPauseBtn;
          public var videoContainer:MovieClip = new MovieClip;
          public function ProjectOneVideos() {
               xmlLoader = new URLLoader();
               xmlLoader.load(new URLRequest("projectOneVideos.xml"));
               xmlLoader.addEventListener(Event.COMPLETE, processXML);
          public function processXML(e:Event):void {
               projectOneXML = new XML(e.target.data);
               projectOneVideos = projectOneXML.VIDEO;
               projectOneTotal = projectOneXML.length();
               makePlayer();
               addButtons();
          public function makePlayer():void {
               player = new FLVPlayback();
               player.skinBackgroundColor = 0x47ABCB;
               player.skinBackgroundAlpha = .85;
               player.x = 40.3;
               player.y = 220;
               player.width = 1200;
               player.height = 594.2;
               videoContainer.addChild(player);
               player.addEventListener("complete", backToVideoMenu);
          public function addButtons():void {
               trace("addButtons initiated");
               playBtn = new VideoPlayBtn();
               videoContainer.addChild(playBtn);
               playBtn.x = 625.6;
               playBtn.y = 930;
               pauseBtn = new VideoPauseBtn();
               videoContainer.addChild(pauseBtn);
               pauseBtn.x = 625.6;
               pauseBtn.y = 930;
               pauseBtn.visible = false;
               addChild(videoContainer);
               videoContainer.x = 0;
               videoContainer.y = 0;
               playBtn.addEventListener(MouseEvent.CLICK, playVideo);
               pauseBtn.addEventListener(MouseEvent.CLICK, playVideo);
          public function playVideo(event:MouseEvent):void {
          // this is where I have the video referenced to play.
               trace("play/pause button clicked");
               if (player.playing || player.paused) {
                    if (player.paused) {
                         player.play();
                    } else {
                         player.pause();
                    playBtn.visible = player.paused;
                    pauseBtn.visible = ! player.paused;
               } else if (player.stopped) {
                    player.play();
                    playBtn.visible = false;
                    pauseBtn.visible = true;
               } else {
                                //this will obviously not work because then its just this one movie referenced
                    player.play("videos/projectOneVideos/videoOne.f4v", 0, false);
                    pauseBtn.visible = true;
                    playBtn.visible = false;
The reason I included a bunch of code is to show that there is a play/pause button that is supposed to play the movie. But the thing is I only have the one movie referenced and I am not sure how to have it variable as to which movie is played and make it depend on the button that is clicked from the button class above.
thanks for any input you can give!!! 
Note: All of this code works as it is and I am getting no errors.

Ok, how about this:
After reviewing my code again, this is what I find.
I process the xml and then never use it when playing the video. To play the video I had just put the path straight to the video and not even used the xml. In the xml.
So I guess my question is how to I refer to the xml to load the video and then when dealing with the buttons lead to the right video from the xml.
kglad: Now I think I see why you were saying define a method of the ProjectOneVideos class that accepts a path/name string to the load target.
I think the code I need to change is:
     if (player.playing || player.paused) {
                    if (player.paused) {
                         player.play();
                    } else {
                         player.pause();
                    playBtn.visible = player.paused;
                    pauseBtn.visible = ! player.paused;
               } else if (player.stopped) {
                    player.play();
                    playBtn.visible = false;
                    pauseBtn.visible = true;
               } else {
           //this is the part that needs to be changed to recognize from the xml
                    player.play("videos/projectOneVideos/videoOne.f4v", 0, false);
                    pauseBtn.visible = true;
                    playBtn.visible = false;
But then I have to be able to pull the right video when I hit the button.
So, what tools should I be using?

Similar Messages

  • We are evaluating the use of iPod touch devices to record best practice videos on our manufacturing floor and to post to an internal Moodle web site. How can you upload a video from the iPod touch to a site other than YouTube?

    We are evaluating the use of iPod touch devices to record best practice videos on our manufacturing floor and to post to an internal Moodle web site. How can you upload a video from the iPod touch to a site other than YouTube? The Moodle upload interface is expecting a file selection dialog box like windows or OSX. I do not want to have to go through an intermediary step of messing with a pc.
    Thanks!

    It should be around 7 and a half gigs. In iTunes, across the bottom there should be a bar that show how much storage is being used and by what. (music, movies, apps, etc.) To make music take up less room, you can check the box to make it convert the music to 128kbps AAC. This lowers the quality, but with most earbuds and speakers, you can't even tell the difference.
    The iPod touch has parental controls built in. You'll find them in Settings. I think they only work for enabling/disabling Safari, Mail, YouTube, and App Store. Here's an app that does more: http://www.mobicip.com/online_safety/ipod_touch

  • , how do you put a video from the phone onto imovie

    how do you put a video from the iphone onto imovie

    Import it to your mac (http://support.apple.com/kb/HT4083) then import it to iMovie.

  • How do you call a method from  another class without extending as a parent?

    How do you call a method from another class without extending it as a parent? Is this possible?

    Why don't you just create an instance of the class?
    Car c = new Car();
    c.drive("fast");The drive method is in the car class, but as long as the method is public, you can use it anywhere.
    Is that what you were asking or am I totally misunderstanding your question?
    Jen

  • How do you import a video from Home Videos into Keynote?

    Some one cleverly (not) decided that imported videos now must go in "Home Videos" but Keynote cannot import from there? How do you import a "Home Video" into Keynote?

    This means that your file extension is set to playback on Windows Media Player thats all.
    Change your folder settings in Windows Explorer, go to Folder Options, View tab, and uncheck hide extensions for known media types.
    Then look at your filename and it should read "video name.mp4" or .m4v or .mov, these are the only file types that will play back on the 5G ipod.

  • How do you get a video from the video app to your photos

    I am trying to get a video from the video app on the iphone to go to my photos, but I can't figure it out,,, Help?

    http://support.apple.com/kb/HT4083

  • How do I reference a MovieClip from a class

    Hi. Trying to learn AS3 and having a hard time ; (
    I'm working on a game. I have a Ship class that uses addChild
    to add a linked Bullet MovieClip to the stage. The Bullet MC is
    linked to the class below. I've got it working so it moves up the
    screen, but now I need to build a hitTest, however I cant get
    access to a movie clip I've placed on the stage, "enemyDisplay_mc".
    How do I reference this MC? In AS2 I would just do a _root.
    Thanks!
    package {
    import flash.display.*;
    import flash.events.Event;
    public class Weapons extends MovieClip {
    private var _thisWeaponMC:MovieClip;
    private var _enemyHit:DisplayObject;
    private var _speed:Number;
    public function Weapons () {
    this.addEventListener (Event.ADDED,Initialize);
    private function Initialize (event:Event):void {
    //trace ("Weapons");
    _thisWeaponMC =
    MovieClip(this.parent.getChildByName(this.name));
    trace ("_thisWeaponMC: " + _thisWeaponMC);
    _thisParent = event.currentTarget.parent;
    trace ("_thisParent: " + _thisParent);
    _enemyHit = this.parent.getChildByName("enemyDisplay_mc");
    trace ("_enemyHit: " + _enemyHit);
    _speed=20;
    this.addEventListener (Event.ENTER_FRAME,moveShip);
    private function moveShip (event:Event):void {
    this.y-= _speed;
    }

    This code is called from my Ship class.
    The Ship class is the Base class of the ship movie clip.
    VulcanShot is the linkage class name of the bullet movie,
    it's base class is Weapons.
    Thanks!

  • How do you stop a video from playing after you use removechild?

    I am new to flash and asc3.  I am currently developing a website using cs3.  I have the main swf that calls in other swfs using the add child.  The swfs that I am calling in, have video using the standard flvplayer.  The problem that I am encountering (and is driving me nuts) is when I use the remove child, you can still hear the audio from the video that was just removed.  How to I stop it?  Please help.  If you need more details, let me know.  I really need to fix this asap.  Thanks.

    Try adding this to your code:
    SoundMixer.stopAll();

  • How do you import music videos from a dvd into iTunes?

    I have got a music cd and includs a music dvd. I want the music videos to be imported into iTunes so I can watch them on my iPod touch. How do I do this?

    I had a friend who got a dual-format music album on DVD of the band Chicago for his birthday. He didn't have a system that could play the remixed 5.1 surround sound version on the DVD, but he could play it back in his Mac OS X on the DVD player in good old stereo. However, he wanted a copy he could play in his car CD player.
    So I used Audio Hijack to record the output of the DVD played back as stereo through the Apple DVD player in Mac OS X. I had Audio Hijacj write the output to the hard drive as AIFF 16-bit 44.1KHz stereo. Then I used iTunes to burn it to a CD.
    Of course it took 45 minutes to make a recording from a 45-minute audio program; it happened in real-time.
    (This was all perfectly legal because he owns the DVD and he's using the CD recording as a backup audio copy for his own personal use--basically like ripping a CD you own for use in your iPod).
    I did an a/b comparison between the original DVD and the AIFF recording I had generated, and I was pleasantly surprised by its good quality.
    Since then I've been an Audio Hijack fan.

  • Does anyone use the Veho MUVI mini camcorder?  If so how do you download your video from it.  I plugged it into the USB port and my Mac doesn't show a removable disc on my desktop.

    Any help would be greatly appreciated.  I am new to Mac and am not sure how to get my camcorder to be recognized by ny Mac.

    Welcome to the forums.
    To get the best array of responses, you should post your question as a new inquiry. Perhaps save yourself the time, however, and do a search on "MPEG Streamclip" in this forum and you'll see a variety of suggestions. Also, here are a couple websites:
    http://www.sjoki.uta.fi/%7Eshmhav/SVCDon_a_Macintosh.html#edit_convertMPEG
    Using MPEG or DVD footage
    http://www.danslagle.com/mac/iMovie/tips_tricks/6010.shtml
    John

  • How do you copy a video from a disk to a Mac or to an iPad?

    I have a DVD disk with video content that I have rights to copy and use, but I don't know how to copy it onto my computer or my iPad. Can anyone help me?

    Due to Apple's terms of use, no one here can explain this procedure to you, but we can give this link.
    Google is your friend.
    http://handbrake.fr/
    Good Luck!

  • How do you import iPhone video from Aperture into FCPX?

    I need to import some iPhone 4 video files from Aperture into FCPX. For some reason there seems to be no way to do this. Please do not suggest I import the videos directly from my iPhone. #1 the videos are already off my phone and #2 I have no desire to import all my iPhone videos separately into FCPX when I am already importing them into Aperture along with my photos.

    You have to drag them from their location, (finder or iPhoto etc) into one of the events in the event list of FCP X.

  • How would you get Microsoft office from apple laptop to Ipad?

    Im having difficulty getting my Microsoft office from my apple laptop to my new Ipad. If anyone has any ideas PLEASE I would really appreciate the help. Thank You!!

    No can do. sorry.  There are apps in the App Store you can buy, such as Pages (for word documents) and numbers (for excel spreadsheets), but there is no way to move your Microsoft software on to your iPad, even if you have it on an Apple Laptop.  They are totally different operating systems..

  • How do you stop relevant videos from you tube appearing on website?

    I have been using You Tube videos for some time in iWeb produced websites without problem Now related You Tube videos are appearing after the selected video has been played. This is not good and related videos can be totally irrelevant and totally in contrast to the website itself. I have left the Show related videos unchecked when entering the URL. I have found some suggestions advising to add either ?rel=0 or &rel=0 at the end of the URL but this makes the URL unrecognisable. What can be done?

    iWeb has no control over youtube.
    If youtube changes what they offer, then that's that.
    Go to youtube, find your video, grab the embed code and paste it in a html snippet.
    It's the same code the youtube widget in iWeb creates. Even the ?rel=0 is there.
    And I have this :
    http://hoyois.github.io/safariextensions/clicktoplugin/
    http://clea.nr/
    as an Safari Extension, so I do not see it.

  • How do you reference assembly resources from MP in PowershellGrid Widget script

    Instead of shipping my custom assemblies to a known location on the system center 2012 server in separate files, I'm trying to use assembly resources to do this.  The issue I am having is referencing these assemblies in the script for the PowershellGrid
    widget I am using.
    As suggested in technet answer -
    https://social.technet.microsoft.com/Forums/systemcenter/en-US/e752fb63-0d5f-43e3-a2be-7db54934e29a/how-to-use-attached-to-bundle-dll-resource-in-powershell-module?forum=operationsmanagerauthoring
    I am using this convention -
    $FileResource[Name=”MyResource”]/Path$
    To illustrate what I am using, I've put in an exception to try and return the assembly path -
    throw "Test that the Assembly Path is returned:" + "$FileResource[Name='PaulsMP!DSUtilsTest']/Path$"
    Part of the exception is the following where you can see the Path$ has not been translated -
      [Microsoft.SystemCenter.Visualization.Component.Library.DataProviders.PowershellProvider,
    Microsoft.SystemCenter.Visualization.Component.Library.DataProviders, Version=7.0.5000.0, Culture=neutral,
    PublicKeyToken=31bf3856ad364e35].Test that the Assembly Path is returned:[Name='PaulsMP!DSUtilsTest']/Path$ ---> 
    So the questions are - can these assembly resources be referenced in Powershell grid widget scripts and if so, what is the syntax?
    BTW, my MP resources fragment looks like this - 
    <Resources>
    <Assembly ID="DSUtilsTest" QualifiedName="DSUtilsTest1, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" FileName="DSUtilities.dll" Accessibility="Public" HasNullStream="false"
    />
    </Resources>
    Many Thanks,
    Paul  

    Paul,
    I was unable to find info specific to the issue you are hitting, however I've found the following links that I believe can help you:
    http://www.systemcentercentral.com/scom-2012-create-an-mpb-to-deploy-files-using-vsae/
    http://overcast.fehse.ca/2014/08/scom-management-pack-bundles-and-vsae
    hth,
    Jose

Maybe you are looking for

  • Sender SOAP Adapter: zipped Payload or zipped Attachement possible?

    Hi, I've a SOAP --> PI --> Proxy Scenario. As the payload of the message can become quite huge (around 10MB), I'd like to zip the message. From the documentation it's not clear for me if the Sender SOAP Adapter can be enhanced with the standard Paylo

  • Which table Transaction KP26 is Updating

    Which Table is getting updated when data in transaction KP26 is saved . <removed_by_moderator>

  • Default Audit policy in 11g

    Hi all, 11.2.0.3.11 aix6 What v$view can I select all information about our database Audit Policy Setting? That shows type of actions, events, and captured information? Thanks, mk

  • How to call a FM of Non R3 system into an R3 System

    Hi, I have a requirement to call a FM which is available in CRM System into a FM of my R3 System. Please let me know the way in which i can meet this requirement. Note : My CRM System is not Integrated with my R3 System and these two system has no re

  • Link aggregation query

    Hi, I've recently taken over a network which has got 4 Linksys switches - 3 * SRW2048 and 1 * SRW2024 One of the SRW2048 devices has 2 LAGs setup (of 4 ports each) connecting to the other 2 SRW2048s (both with a single LAG). So far, so good. However,