Randomly Load External VDO w/o Repeat the Same File while Playing

Hey! I have nearly done programming my Flash file. But, I'm so tired of making it not repeat the VDO file it is playing.
I hope that you guys will have that solution for me. *()*
This is my source code
////////////To Load any VDO///////////////
import flash.net.NetStream;
import flash.net.NetConnection;
import flash.media.Video;
var video;
var nc;
var ns;
nc = new NetConnection();
nc.connect(null);
ns = new NetStream(nc);
ns.client = this;
video = new Video(550,400);
addChild(video);
video.attachNetStream(ns);
/////////////Array for VDO Files/////////////
var VdoStore:Array = new Array("westler.flv","TomAndJerry.flv","GetThere.flv");
/////////////Keyboard and Screen Show////////////////
import flash.events.KeyboardEvent;
import flash.events.Event;
stage.addEventListener(KeyboardEvent.KEY_DOWN,onDown);
stage.addEventListener(KeyboardEvent.KEY_UP,onUP);
function onDown(e:KeyboardEvent):void{
var SelectedVid = VdoStore[Math.floor(Math.random() * VdoStore.length)];
//var DontRepeat:Array = new Array(); << I tried create another array to keep the file which was played
if (e.keyCode==49)
  ns.play(SelectedVid);
  stage.removeEventListener(KeyboardEvent.KEY_DOWN,onDown);
  //onUP(null);
if (e.keyCode==69)
  ns.play(SelectedVid);
  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 thst is the code that I have removed all the things I have experimented out. Only the code that is working is shown above.
I don't need them all to be played before start new random. Just That, it shouldn't play the same vdo that is playing at the moment when I click any button after.
FYI,I will add more vdos, about 20, and more keyboard buttons to click as the same numbers.
Anyone? **Pleaseeeeeeee >///<

One way would be to remove the played video from the array when it is played so that it cannot be licked again.
Another way, since you don't mind a repeat later on, would be to store the index of the selected video when it is played in a variable that you compare to the selected index.  If the selection matches the variable then you run the selection processing again until you successfully pick another video.  To do this it will be easier to have a separate function that does the selection.

Similar Messages

  • Problem with SQL*Loader and different date formats in the same file

    DB: Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bi
    System: AIX 5.3.0.0
    Hello,
    I'm using SQL*Loader to import semi-colon separated values into a table. The files are delivered to us by a data provider who concatenates data from different sources and this results in us having different date formats within the same file. For example:
    ...;2010-12-31;22/11/1932;...
    I load this data using the following lines in the control file:
    EXECUTIONDATE1     TIMESTAMP     NULLIF EXECUTIONDATE1=BLANKS     "TO_DATE(:EXECUTIONDATE1, 'YYYY-MM-DD')",
    DELDOB          TIMESTAMP     NULLIF DELDOB=BLANKS          "TO_DATE(:DELDOB, 'DD/MM/YYYY')",
    The relevant NLS parameters:
    NLS_LANGUAGE=FRENCH
    NLS_DATE_FORMAT=DD/MM/RR
    NLS_DATE_LANGUAGE=FRENCH
    If I load this file as is the values loaded into the table are 31 dec 2010 and 22 nov *2032*, aven though the years are on 4 digits. If I change the NLS_DATE_FORMAT to DD/MM/YYYY then the second date value will be loaded correctly, but the first value will be loaded as 31 dec *2020* !!
    How can I get both date values to load correctly?
    Thanks!
    Sylvain

    This is very strange, after running a few tests I realized that if the year is 19XX then it will get loaded as 2019, and if it is 20XX then it will be 2020. I'm guessing it may have something to do with certain env variables that aren't set up properly because I'm fairly sure my SQL*Loader control file is correct... I'll run more tests :-(

  • Just bought a new iphone4 and was loading os6 and now it won't turn on. the apple glows like it is starting up, then the screen goes black and then repeats the same process over and over. i have tried to reboot multiple times now

    just bought a new iphone4 and was loading os6 and now it won't turn on. the apple glows like it is starting up, then the screen goes black and then repeats the same process over and over. i have tried to reboot multiple times now

    I am assuming the phone was working prior to you installing IOS 6? Did you use itunes to install IOS 6 or just run from the phone?
    When I tried to do the Over The Air update to IOS6 on my iPhone 4, it errored out and I had to connect it to iTunes and select "Restore" from the summary screen after iTunes finds the phone is connected. If this works for you, it will go through a couple of reboots that take a few minutes to complete. It should then give you the option to start with a fresh new phone or to use one of your previous backups to load your contacts and other information, provided you have backed up the phone previously.
    I hope this helps you my friend!

  • Cisco Load balancer and Web Dispatcher to the same portal

    Hello Experts,
    We have implemented intranet portal with Cisco as the load balancer. Now we need to expose this intranet to the outside world as an extranet portal. So the same portal will be accessed from both intranet and from outside. We are thinking of installing a web dispatcher in the DMZ so that outside users can access the Web Dispatcher URL to access the intranet portal. In effect intranet users will use load balancer and extranet users will use Web Dispatcher to access the same portal. Now my question is if we configure Load Balancer and Web Dispatcher to the same portal, will the portal be able to load balance properly? Is this the right approach?
    Thank You,
    mansooralip1

    Dear Andrew,
    We need to provide access to our intranet to some outside companies for them to also use some of our portal applications. As per your answer, I understand that I can configure Web Disptacher to talk to the Cisco Load Balancer of our portal. In this case Web Dispatcher will work just as a reverse proxy. But when I discussed this with one of our basis resource, he told me that when we install and configure Web Dispatcher, it always ask for the Message Server URL and Port number, even if I just want to use Web Dispatcher as a Reverse Proxy. If his concerns are valid, I do not think I will be able to configure Web Dispatcher to access the cisco Load Balancer because I cannot put Cisco load banacer URL and port instead of the Message Server URL and Post Number. Can you kindly share your comment on the same?
    Now the second part of my question, if Web Dispatcher cannot be configured to talk to Load Balancer(as mentioned by our basis resource), I will have to use two load balancers. One web Dispatcher in DMZ as a Load Balancer *** Reverse Proxy for the external users. Second the internal Cisco Load Balancer for the intranet users. So the same portal will be accessed by two load balancers. My question here is, in this set up, can the portal work efficieintly here by distributing equal loads two both the server instances?
    Thank You,
    mansooralip1

  • I delete some emails ,there are moved to trash . I delete them from trash folder too and they still appear in a folder called 'all messages". I repeat the same actions and after a while they appear again!what should i do to delete them permanently??

    I delete some emails ,there are moved to trash . I delete them from trash folder too and they still appear in a folder called 'all messages". I repeat the same actions and after a while they appear again!what should i do to delete them permanently??

    If you are using Apple's Mail app 6.5 is the latest version irrespective of what a previous poster says. It does sound though that you are using a gmail account online via a web browser. Please confirm and fill in missing information.

  • How do I repeat the same row more than once in report 10g

    How do I repeat the same row more than once in report 10g
    So I can print the bar code more than once
    in report;
    Edited by: user11106555 on May 9, 2009 5:50 AM

    GREAT THAN X MAN
    It is already working, but with the first ROW
    select ename from emp
    CONNECT BY ROWNUM<=5
    ENAME
    SMITH
    SMITH
    SMITH
    SMITH
    SMITH
    ALLEN
    WARD
    JONES
    MARTIN
    BLAKE
    CLARK
    SCOTT
    KING
    TURNER
    ADAMS
    JAMES
    FORD
    MILLER
    BUT I want this result
    Item1
    Item2
    Item3
    to
    Item1
    Item1
    Item1
    Item2
    Item2
    Item2
    Item3
    Item3
    Item3

  • How can I repeat the same program automatically with a time-plan?

    Hello Everyone,
    I have a question here.
    I want to start the same program more time, but I would like to define the number of repetitions and time delay between each repetition with a dialog windows.How can I do that? 
    e.g. I want to repeated the same program for 4 times, first time this program will be started by press "Start", second time it will be started in 10 seconds after the first start, the third time it will be started in 16 seconds after the first start and last time ist in 30 seconds after the first start.
    With which node can I do that?
    Regart,
    Johnny

    Hi,
    try something like this.
    Mike
    Attachments:
    Unbenannt 5_LV80.vi ‏12 KB

  • 2 computers at home working with the same files i keep on an external hard drive to free up space the internal drives. I have an airport extreme time capsule to back up both computers. how can i get it to back up the hard drive plugged into time capsual?

    I want to run both my macbook pro and imac from a single external hard drive.
    i bought a time capsual and set it us as my network and plugged my external hard drive into it. so now both my computers can access it and work on the same image and film files. the time capsual does a lovely job of backing up both my computers and my wifes. but i cant get it to back up the external hard drive that is conected to it. ive looked on the forum and it seems to me that its not possible, which seems odd to me that mac would enable you to plug a hard drive into the time capsual but not let you back it up, what is the point in that!?
    so my question is can i back up the external hard drive with time machine, and if not how do i set up my home network so that all my computers can access the same files and time machine will back everything up?
    I did the upgrade to maverics on my imac which has caused me a major headache as now all my apature albums have been updated to 3.5.1 but my macbook pro can no longer open them because im unable to upgade it to maverics, but thats another story.
    If anyone can help me with my time machine issue i would be very greatful.
    many thanks

    i cant get it to back up the external hard drive that is conected to it. ive looked on the forum and it seems to me that its not possible, which seems odd to me that mac would enable you to plug a hard drive into the time capsual but not let you back it up, what is the point in that!?
    so my question is can i back up the external hard drive with time machine, and if not how do i set up my home network so that all my computers can access the same files and time machine will back everything up?
    The TC for whatever it is promoted as,, is still a simple hard disk in a router. It was designed for laptops to use as a backup. A desktop can use a USB drive, faster cheaper and more reliable than a network drive but the laptops need a network wireless storage. Hence the TC. It is NOT nor was it ever designed to do the job you are trying to use it for.. it is not a NAS.. it has no internal backup.
    What is more Time Machine has no ability to backup network drives no matter what their format.
    So the solution is to either use a real backup software.. eg Carbon Copy Cloner which can do far more than TM can or ever will. It is around $40 so hardly expensive. But since the TC was never designed for it, this will be slow.. and the next question is where are you going to back to. Using the TC as backup location for your files is less than great. Primarily because all your files are still on the same device albeit on different disk. It is also because mixing data and TM backups is not so great. The TC cannot be partitioned although you can alleviate some of the issues..
    See this info.
    Q3 here http://pondini.org/TM/Time_Capsule.html
    Let me go back to the question.
    so my question is can i back up the external hard drive with time machine, and if not how do i set up my home network so that all my computers can access the same files and time machine will back everything up?
    Fundamentally the TC is the wrong place to do this.
    The right place is to plug the USB drive into the iMac.. since it is a desktop machine and you are probably not lugging it around. Simply share the USB drive to the network.
    The MBP can then access the USB drive, and it will be around twice the speed of networking to the same drive on the TC. TM on the iMac can then also backup the USB drive to the TC as part of the normal TM backups.
    The only thing is the iMac needs to be turned on to allow MBP access.

  • HELP, PLEASE.. I'm looking for a App that I can install on both my iPad and iPhone, then when I load a document, picture, or anything on that app on iPhone or iPad, it will Sync with the other Device so both devices will end up with the same file .

    HELP, PLEASE.. I'm looking for a App that I can install on both my iPad and iPhone, then when I load a document, picture, or anything on that app on iPhone or iPad, it will Sync with the other Device so both devices will end up with the same file ...

    iCloud Drive: https://www.apple.com/icloud/icloud-drive/
    Dropbox: https://itunes.apple.com/us/app/dropbox/id327630330?mt=8
    OneDrive: https://itunes.apple.com/us/app/onedrive-for-ios/id477537958?mt=8

  • I worked with files in LR that were originally on my C drive, then were moved to an external HD for storage. I now want to do some more work on those files (which have the same file name as on the C drive). I plugged the drive into my computer and it show

    I worked with files in LR that were originally on my C drive, then were moved to an external HD for storage. I now want to do some more work on those files (which have the same file name as on the C drive). I plugged the drive into my computer and it shows in LR under folders as the F drive and the little green light is on, but LR is showing only the first 6 files and not the remaining 200 or so. How do I expand the F folder to expose all files?

    I worked with files in LR that were originally on my C drive, then were moved to an external HD for storage. I now want to do some more work on those files (which have the same file name as on the C drive). I plugged the drive into my computer and it shows in LR under folders as the F drive and the little green light is on, but LR is showing only the first 6 files and not the remaining 200 or so. How do I expand the F folder to expose all files?

  • Hi i have 50 infoobjects as part of my aggregates and in that 10 infoobjects have received changes in masterdata.so in my process chain the Attribute change run in running for a long time.can i kill the job and repeat the same.

    Hi i have 50 infoobjects as part of my aggregates and in that 10 infoobjects have received changes in masterdata.so in my process chain the Attribute change run in running for a long time.can i kill the job and repeat the same.

    Hi,
    I believe this would be your Prod system, so don't just cancel it but look at the job log. If it is still processing then don't kill it and wait for the change run to complete but if you can see that nothing is happening and it is stuck for a long time then you can go ahead and cancel it.
    But please be sure, as these kind of jobs can create problems if you cancel them in the middle of a job.
    Regards,
    Arminder Singh

  • Trying to update my credit card for Creative Cloud account but chat support is always repeating the same thing?

    I'm just trying to update my credit card info for my Creative Cloud account, it's been 6 times I've contacted chat support.
    Every time they repeat the same questions & answers over & over.
    "What's the name on the card?"
    -I give it to them.
    "It will take 4 to 5 hours to update."
    -I wait a day, same problem, then contact them again, same question & same answer. They don't give me a reason or any indication why my card didn't get charged.
    I re-phrase my questions, always same answer:
    "Your payment details are updated, your account will be activated in 4-5 hours."
    Are they robots?
    Is there actually somebody on the end of the chat, is it possible to talk to a supervisor or someone that could help me give you money so my account doesn't expire?

    Well, today my tools are going to be deactivated because my account is expiring.
    Still no solution or feedback on the status of the issue relating to the fact that my valid credit card is stuck in a processing limbo in their payment system.
    The biggest lesson learned is that subscription software & cloud based services are too risky for a professional production pipeline.
    Imagine if I had employees and a huge deadline this week, I would have to explain to my clients that the reason I can't deliver is because Adobe can't process my credit card for whatever reason, and they deactivated my tools.
    Now, I probably won't be able to work today but at least this situation as forced me to re-evaluate how I'm going to build my new workflows and those of my clients.
    I was actually planning to convert my video production pipeline to Adobe Premiere but now, it's guaranteed I'm staying with Final Cut.
    Same thing for my photo retouching & motion workflows, I'm stripping out every Adobe Cloud tool from it.

  • Help. My iPod nano is stuck on repeat. it will only repeat the same song over and over. How can I change the settings

    Help. My ipod nano is stuck on repeat. It repeats the same song over and over and wont play songs on the same album consecutively. How do I fix this

    Hey cemccarty,
    Thanks for the question, and welcome to Apple Support Communities.
    The option to turn off repeat will depend on your iPod nano model. Here is the information for the latest model, the iPod nano (7th generation):
    (click to view larger images)
    via page 18 of manuals.info.apple.com/en_US/ipod_nano_user_guide.pdf
    If you have an earlier model of the iPod nano, see the relative user guide from this page:
    Apple - Support - Manuals
    http://support.apple.com/manuals/#ipod
    Thanks,
    Matt M.

  • How do I get my ipod to quit repeating the same song over and over?

    How do I get my ipod nano to quit repeating the same song over and over again?

    The control for repeating a selection is available when the Music app is open and the iPhone is in the portrait position. There are three settings Off, repeat one song and repeat album or playlist. You change the setting by tapping the icon.
    OFF
    Repeat one song (current selection)
    Repeat album or playlist

  • How do i get my music off repeat. the same song keeps repeating.

    I am having difficulty getting my ipod touch off repeat. It just keep repeating the same song. I tried shuffle and it just goes to the next song and keeps repeating that song.
    does anyone have a solution for this dilemma?  James Jr.

    Turn off the repeat control. If you touch the screen in album view this control will be to the left side of the scrubber bar.

Maybe you are looking for

  • WorkFlow - Binding / Container Operation

    Hi WF Gurus I am creating a Sale Order Change Start Event & want to collect a field (KNVV-KLABC) i.e. Customer ABC Class of that Sold-to-party of that sales order. Is it possible through binding or container operation. please give steps in details. M

  • No upgrade package found for component SAP_BASIS

    Hello, I'm just upgrading from NW 7.01 to NW 7.4. During the EHP_INCLUSION phase I'm getting this error: The program has not found a matching SAINT package for 'SAP_BASIS'. "Last error code set: Enhancement Package inclusion failed, no upgrade packag

  • Client not yet reported

    Hello, Setup a new Windows Server 2008 Standard R2 domain with WSUS. Added a new OU & linked a WSUS GPO to it. Added one Windows 7 Pro 64 bit test client to the domain & moved it to the OU. Confirmed WSUS sees the client machine under both 'All Compu

  • Creative Cloud Alternate Profile-Help!

    My computer will not work after installing the 30 day trial of Adobe Creative Cloud. Installed Photoshop and InDesign and used both programs without incident yesterday. However, upon shutdown and restart, NOTHING ON MY COMPUTER WORKS AT ALL. There wa

  • How much does it cost to replace a broken iphone 4s

    my iphone 4s has been water damaged and i know that it isnt covered under warrenty how much would it be to replace it as a trade in at the apple store