How to pause external vdos to play it again after played another vdo

Hey! I have a question.
I have many external vdos which I have loaded and randomly play them once at a time by press some keyboard buttons.
Let's give vdos named a,b,c,... and picture this....
When people press a button a vdo A is playing then someone press another button or the same button the vdo B will be played immediately.
The same thing happen to vdo B if someone press any button on keyboard to play vdo C. After every vdo has been played, the program will set all the vdos back so people can play it again now but, I do want it to play in exact same point where it left.
Right now, my code can ramdomly play all the vdo without repeat them untill it plays them all. But I know because I REMOVE the vdo out so that's why the program don't play it again like this: var NewStore:Array = VdoStore.splice(i,1);
I think this way can't make a program to remember the vdo's timeline. But I don't know whatelse can I do to do what I want.
Anyway,
Someone tell me to try out some index to the array and add ++ after playing. Then after index is more than Array's length, just reset index to 0 again.
So...Any suggestion on how to pause many external vdos??

use the shuffle function to randomize your videos and then play from index = 0 to index=videoA.length-1:
function shuffle(a:Array) {
    var p:int;
    var t:*;
    var ivar:int;
    for (ivar = a.length-1; ivar>=0; ivar--) {
        p=Math.floor((ivar+1)*Math.random());
        t = a[ivar];
        a[ivar] = a[p];
        a[p] = t;

Similar Messages

  • How do I get the iPad to work again after I have erased data (intentionally) and do not have my base computer to plug into to access itunes?

    How do I get the iPad to work again after I have erased data (intentionally) and do not have my base computer to plug into to access itunes?

    If you have iOS 5 installed on it, you don't need a PC.  simply turn it on and set it up.
    if you don't have iOS 5 then you'll need a computer.

  • How do I get my contacts and pictures back after getting another Iphone?

    I just got another Iphone4 from apple today as my older one got broken. After I plugged in my Iphone it did the whole back up thing but all of my contacts and my photos have been erased from my Iphone. I'm wondering how I'm able to get them all back. Some of my friends suggested going on fb and adding everyone back but that will take a while as I had another of contacts on my phone including contacts that do not have fb. Please help me out and give me suggestions. Thanks!!!

    I have tried restoring my Iphone from my old back up on I tunes. It just restored my Iphone back to the state it was in yesterday, with the same apps with no contacts or pictures....

  • HT4623 How do you get your phone to work again after the iTunes update?

    I did an update on my iPhone from iTunes and now the I only have one screen on my phone that has a picture of the iTunes app and the USB cord.  I have plugged and unplugged my phone.  I have tried to turn it off.  I have turned off my computer, but I only get the same screen.  What can I do to get my phone to work properly again?

    That app should have a video on how to do that.  IF not look at their support site.

  • HT1338 how to download safari 6 on mountain lion again after delete it

    hi
    I delete the safari browser by mistake , how can I download it again .
    there isn't any download link on safari website

    If you haven't emptied the trash, move it back.
    Restore it from your backups.
    If you saved the installer, reinstall OSX.
    Last resort, download and install OSX again.

  • How do I get the software to download again after I stopped it to get serial #?

    I was downloading the new software and I had to stop it to locate the serial #. Now I can't get it to download.

    What software? How do you download?
    Mylenium

  • HT1766 How do I get my iPod to work again after is has been disabled because I forgot my password & now I remember it?

    My iPod Touch has been disabled because I had forgotten the password.  Now I remember the password but can't get the iPod unlocked.  I am hooked up to iTunes but can't get it unlock still?  What am I doing wwrong????/

    1: Connect the device to your computer and open iTunes.
    2: If the device appears in iTunes, select and click Restore on the Summary pane.
    3: If the device doesn't appear in iTunes, try using the steps in this article to force the device into recovery mode.

  • How do you get itunes to start working again after you get an error 7 message

    I keep getting the error 7 message when i try and open itunes i am not sure what i should do now. i have followed what they have listed on the website but it didnt change anything i am still getting the same message.
    HELP!!!

    See Troubleshooting issues with iTunes for Windows updates.
    tt2

  • How to show the formatbar in Ibook author again after upgrade

    Since I updated iBook Autor I can't see my formatbar anymore. I looked a lot around but still can't find the menu option to show it up again. Anyone please?

    Mine is broken it seems..I will reinstall now then.
    Update: There was another wordlist bar (woordenlijst in Dutch) that was the problem of NOT showing the format bar.
    So I said hide wordlist and show formatbar and then everything worked fine. It showed the formatbar. To me it seems a bug.
    Message was edited by: renhagedis

  • How do get my ipod to work again after it died

    How do i get my ipod to work again after it died and wont charge?

    Well...hm... Your going to have to replace it, or get it serviced. Or give it to Apple for a 10% discount on another. What gen is it? Some people buy broken iPods like:
    https://www.gazelle.com
    or maybe its spelled https://www.gazzelle.com
    I dont remember

  • Hi, How to reinstall Mac os x 10.7 again

    Hi, How to reinstall Mac os x 10.7 again after format my macbook pro 2.5 17 inch 2008
    First message
    Your payment method was declined
    Please enter valid payment method
    information.
    After that ... I am enter my payment information again then
    opened the new message
    Payment processing is temporarily
    unavailable . please try again later.
    where is problem ?
    How to reinstall Mac os x 10.7 again
    Thank you

    thank you
    I didn't know this way. Is this safe for my current data and my other partitions (windows and ExFAT for both mac & windows data)
    At last could you confirm  this way will regenerate the recovery partition ?
    thank you again
    regards

  • How to code a button to play and pause sound using load sound?

    how to code a button to play and pause sound using load sound?I have used load sound methos to attach the sound.Can anyone help me?

    Hey thnx,
    I have used this code on sound's button's frame.and my stop n play button is on another screen.main sound button and stop button is on diffrent screen.
    Here is my code-
    stop();
    adaDrut1.onRelease = function () {
              mySoundC = new Sound(this);
              mySoundC.loadSound("F#/Bhajni1.ark", true);
    mySoundC.onSoundComplete = function() {
    _root.mySoundC.start(0,999); }
             gotoAndPlay("play2");
            _global.myTaalLaya = "Low1";
    adaDrut1 is a sound button.And there are lot of buttons with diffrent sound.
    Thanks..

  • Any one know how to stop iTunes movies from playing menu music when movie is paused?

    Anyone know how to stop iTunes movies from playing menu music when the movie has been paused?

    JourneyMan24 wrote:
    Anyone know how to stop iTunes movies from playing menu music when the movie has been paused?
    Can't. This is done for the individual movie, not by iTunes.
    Some have it, most don't.

  • How to pause, stop, play a sound that is loaded from the other .swf file?

    Pause and Resume external SWF sound files
    I have this code that plays the sound through linkage. It reside in scene1.fla -> scene1.swf.
    var mc:MovieClip = this.createEmptyMovieClip("mc",1);
    var myLoop:Sound = new Sound(mc);
    myLoop.attachSound("bg_sound");
    myLoopVolume=0;
    myLoop.setVolume(myLoopVolume);
    mc.onEnterFrame = function () {
        if (fadeIn01==1) {
            _root.myLoop.setVolume(myLoopVolume);
            myLoopVolume=myLoopVolume+5;
            if (myLoopVolume>50) {
                fadeIn01=0;  
        if (fadeOut01==1) {
            myLoop.setVolume(myLoopVolume);
            myLoopVolume=myLoopVolume-1;
            if (myLoopVolume<5) {
                _root.myLoop.setVolume(10);
               // _root.myLoop.stop("myLoop01");
                fadeOut01=0;
    fadeIn01=1;
    myLoop.start(0,999);
    The problem goes like this. I want to pause the sound from playing in scene1.fla -> scene1.swf in anytime I want, through my main.fla -> main.swf that loads the scene1 movie. I got stuck.

    you need to use the path from the timeline that contains the controlling code and myLoop.  you can always use trace(this) on both timelines (the one containing the controlling code and the one containing myLoop) to determine the correct path.

  • How can I press keyboard to play vdo only once!

    Hi, I'm here again for your help :{ I have a question which I tried to google it but can't find the answer. Well,..May be there is an answer but I just can't make it works? I'm in a process of learning AS3 so let's say I'm still new here.
    What I'm doing is making a keyboatd to respond with the vdo files I have. It is a very simple idea as press-n-play. Each keys has their vdos to play and if you press another button while the first one is still pressing, it'll play another vdo of its key. I have make this as boolean with function of keydown and keyup like this:
    import flash.events.Event;
    import flash.events.KeyboardEvent;
    import flash.net.NetStream;
    import flash.net.NetConnection;
    import flash.media.Video;
    var isLeft:Boolean = false;
    var isRight:Boolean = false;
    var video;
    var nc;
    var ns;
    stage.addEventListener(KeyboardEvent.KEY_DOWN,onDown);
    stage.addEventListener(KeyboardEvent.KEY_UP,onUP);
    this.addEventListener(Event.ENTER_FRAME,playVid);
                        nc = new NetConnection();
                        nc.connect(null);
                        ns = new NetStream(nc);
                        ns.client = this;
                        video = new Video(550,400);
                        addChild(video);
                        video.attachNetStream(ns);
    function onDown(e:KeyboardEvent):void
              switch (e.keyCode)
                        case 37 :
                                  //ns.play("TomAndJerry.flv");
                                  isLeft=true;
                                  break;
                        case 39 :
                                  //ns.play("westler.flv");
                                  isRight = true;
                                  break;
    function onUP(e:KeyboardEvent):void
              switch (e.keyCode)
                        case 37 :
                                  isLeft = false;
                                  break;
                        case 39 :
                                  isRight = false;
                                  break;
    function playVid(e:Event):void
              if (isLeft)
                        trace("kk");
                        ns.play("westler.flv");
                        isLeft = false;
              else if (isRight)
                        trace("PP");
                        ns.play("TomAndJerry.flv");
                        //isRight = false;
    I have tried making a keydown function without using any boolean or those true of false things to just play a vdo. It worked but, I still have the same problem that I can't find a solution which is ....
    When you hold down the keyboard button the vdo will keep start at the beginning.
    All I want is to play the vdo even the key is press down. If the vdo ends then play again as loop but if the key is up the vdo will play until it ends.
    And  if there are more than one button are holding down just play the vdo of the lastest pressed button.
    T-T"
    Thanks.
    Ps. I have tried removeEventListener but, it made every buttons' function gone.

    Wow! That is the problem like you said.
    I have removed it out and try this:
    function onDown(e:KeyboardEvent):void
              if (e.keyCode==49)
                        ns.play("GetThere.flv");
                        stage.removeEventListener(KeyboardEvent.KEY_DOWN,onDown);
                        onUP(null);
              if (e.keyCode==69)
                        ns.play("westler.flv");
                        stage.removeEventListener(KeyboardEvent.KEY_DOWN,onDown);
                        onUP(null);
    function onUP(e:KeyboardEvent):void
              if(e.keyCode==49)
                        stage.addEventListener(KeyboardEvent.KEY_DOWN,onDown);
              if(e.keyCode==69)
                        stage.addEventListener(KeyboardEvent.KEY_DOWN,onDown);
    And it works!
    But, then I have an error massage says "
    TypeError: Error #1009: Cannot access a property or method of a null object reference.
              at xxx_fla::MainTimeline/onUP()
              at xxx_fla::MainTimeline/onDown()"
    May I ask you something?
    Will it make me any problem if I load more vdos? Let's say about...20?
    Because if it is hard to solve this error and it won't make anything worse (time delay,etc.) then I'm fine with it.
    Thanks :}

Maybe you are looking for

  • How do I delete an obsolete email address?

    I use an iMac OS X 10.9.4 and mail 7.3 (1878.6) I need to delete those email addresses I don't use any more in the 'tom' list in the  'from' list in the composing screen of Mail. Thanks.

  • I Can't Access my Creative Cloud account on my Desktop.

    I frequently use AE Premiere Pro, photoshop, and many other Creative Cloud apps. I used to get these messages that would pop up in the upper right hand of my screen saying that it "couldn't sync with creative cloud" or that it "couldn't log in". I di

  • How can I get my photos stored on iPad back if I do not own iOS device anymore?

    Hi, I need to get my photos stored on iPad back. I do not own iOS device anymore. I think I have been synced the photos with the cloud but not sure. The same with updating to iOS5. It was iPad 2. I have installed the iCloud for Windows, but do not se

  • How to view all the dashboard at user level.

    Hi All, I am using BI Apps 7.9.6.1. I have created all the reports and dashboards on prod. I am facing a problem like I can see all the dashboards and reports at Admin level. But while m trying access those reports and dashboards, I cant see only one

  • Relation Between PR item and Operations Maintenance Order

    I have a PR from Maintenance Order. there are 2 Operation External in Maintenance Order. usually it will create 2 item PR Service. but in my case it's create 3 PR item Service. I look on the IW33(Display Maintenance Order). Operation 10, becomes PR S