View and play video clips at random.

Hi followers!

I am trying to put 6 video clips in a table and to access randomly so that when you press a button on a movieclip appears and plays randomly.

All MCs are in a setting with this code:

Stop();
BLK1._visible = false;
blk2._visible = false;
blk3._visible = false;
ppk1._visible = false;
ppk2._visible = false;
ppk3._visible = false;

storeCartons = new Array();
storeCartons = (blk1, blk2, blk3, ppk1, ppk2, ppk3);

startButton.onMouseUp = function() {}
trace (MyNumber);

myNumber = Math.floor (Math.random () * 7) + 0;
activeCarton = storeCartons (myNumber);
activeCarton._visible = true;

}
How can I get it work?

Here is the updated code.

Stop();
BLK1._visible = false;
blk2._visible = false;
blk3._visible = false;
ppk1._visible = false;
ppk2._visible = false;
ppk3._visible = false;

storeCartons = new Array();
storeCartons = [blk1, blk2, blk3, ppk1, ppk2, ppk3];

startButton.onRelease = function() {}
myNumber = Math.floor (Math.random () * storeCartons.length);
trace ("myNumber" + myNumber);
activeCarton = storeCartons [myNumber];
activeCarton._visible = true;

};

Tags: Adobe Animate

Similar Questions

  • Just downloaded first 6.2 and my video clips read the faded gray blur

    I just downloaded first CS6.2 and my video clips play back all washed-out and colorless.

    Please post in the forums of Premiere Pro here http://forums.adobe.com/community/premiere/premierepro_current?view=overview. They will be able to help you.

  • Loading of several video Clips in random order

    I have a flash file that loads video clips at random. The code below is the Framework 1. I have a gotoAndPlay at the end of the timeline to start over so it allows to scroll all the clamps instead of playing one. I don't think that this way is really the best way to do it... but that's what I have so far. Ideally what I need to do, is have it Browse clips in random order, preference not to resume until he got through them all, but at least don't play is not the same one twice in a row. Any suggestions are greatly appreciated.


    Suggestions were very helpful. Thank you! This is the code that we ended up using it. This code was part 1 and forces us to a loop by putting a gotoAndPlay (1) at the end of the main timeline. I don't know why he did that but it didn't work without it.

  • I can import and edit video clips from Sony in Movie Maker 5 on PC but not in moviemaker 6 on my laptop?

    I can import and edit video clips from Sony in Movie Maker 5 on PC but not in moviemaker 6 on my laptop?

    in moviemaker 6 it appears as a line across the screen, the sound is ok but the canoe edit because I do not see?

    can you help me?

    Hello

    Check with the Sony Support, their documentation online, and their forums as this is probably a known issue.

    Sony - Contacts
    http://eSupport.Sony.com/us/Perl/contact-land.pl

    Sony - drivers
    http://eSupport.Sony.com/Perl/select-System.pl

    Sony - Support
    http://eSupport.Sony.com/

    Sony - Forum
    https://Forum.sel.Sony.com/?XID=M:Showcase:eSupport

    ==========

    Hello

    My friend John Papa - MVP - is the expert on Windows Movie Maker.

    PapaJohn.org
    http://Papajohn.org/

    PapaJohn - online tutorials
    http://www.Papajohn.org/mm2-online-tutorials.html

    Windows Movie Maker Tutorials - check the sounds of the addition in the left menu and others on the
    main screen.
    http://www.windowsmoviemakers.NET/tutorials/

    Windows Live Movie Maker that works on Vista and Windows 7, see the link under Windows Live Essentials.
    http://windowslivehelp.com/

    ====================

    These might help:

    Getting started with Windows Movie Maker

    Import video, photos and audio on Windows Movie Maker

    Import video from a videotape

    Get a movie in Windows Movie Maker

    Make a movie quickly in Windows Movie Maker (AutoMovie)

    Publish a movie in Windows Movie Maker

    I hope this helps and happy holidays!

    Rob Brown - Microsoft MVP<- profile="" -="" windows="" expert="" -="" consumer="" :="" bicycle=""><- mark="" twain="" said="" it="">

  • Is it possible to use a black and white video clip as a mask?

    It's kind of a strange question, so I hope I can explain it well enough.

    I made a black and white video clip in a 3D program to act as a mask for the correction of an area specific during the animation of the colors (rather than make many separate images and load each as a channel for each frame of the real animation). Is it possible to use video in Photoshop as you would with an alpha channel, or should it be done in After Effects?

    If she need After Effects, might well want to just point me in the right direction with regard to the basic steps required it? I'm not too familiar with After Effects, and I have not yet used its masking or monitoring functions.

    Thank you very much in advance for any advice.

    I think that I figured it, it cannot be done in Photoshop (correct me if I'm wrong well), but is easily done with a Luma mask in After Effects.

    Thank you.

  • IPhoto to my Macbook Pro doesn't let me play video clips (usually taken with iPhone). I get a message: "Error OSStatus-54."  Anyone know how to fix this? Thank you!

    IPhoto to my Macbook Pro (old version) won't let me play the video clips more (it was). They are mostly of clips to iPhone. When I try to open them I get a dark white page with an error message:

    "Error OSStatus-54".

    Someone has seen this and someone has suggestions on how to fix it?

    It's so frustrating because with most of these clips, that is the only place where I stored them - some clips I get from family members as well... (In iPhoto, I see a picture of the first frame of the clip, but the clip does not play). Even when the new version of iPhoto appeared on my computer, my old version slept and I continued to use the old because I liked it is better (more familiar).  The videos were still on the old version when I got the new version, but they stopped play several months ago. Help! Please? Thank you!

    What version of iPhoto? The operating system?

  • What program CC do you recommend for viewing and organizing videos?

    Quick history: I have more a TB of family video clips.  Some are mine, some are old family movies transferred from the 1960s and others are video clips taken during the meetings and weddings of members of the family who chose to get something from them. I did the photography for years and use Lightroom & Photoshop.  Now with my CC account I've been teaching myself how to use first Pro, so I can start working on this family project.

    Question:  I'm looking for the equivalent of Lightroom for the video.  A program I can use to import my clips, rename, organize, see metadata, discovers, perhaps minor edition & trimming, rate/flag, and (perhaps more importantly) to allow a kind of keyword tagging.  Then open for more extensive editing in Premiere Pro.  It would be great if, like Lightroom, the finished project could then be exported in finished format I need.

    What I tried: I understand that Lightroom can import video, I tried with a sample of clips, but found LR limited to work with videos (which makes sense).  There are many programs CC that I do not know the function of.  I read a little on the prelude, but I can't find a recent tutorial on Lynda.com; I tried searching "Adobe Prelude", but that only turned up prelude CS6 workshops April 2012?  This makes me wonder if the program of the prelude is not very popular because tutorials of his updated version are not available or in high demand? (Research on Lynda.com for 'Adobe Prelude CC 2014' nothing found).

    So that's where I thought the Adobe community would be an excellent resource.  What are 'video people' out there to help?  And that I should stay away from?  thank you so anyone who can take the time to share their expertise and help me launch this project on the right foot.

    Michele

    The question of change of naming conventions and/or native folder hierarchy has little to do with the solid state media and everything to do with the data container and header that connects audio/video broadcasts with metadata, allowing the content or the 'essence of media' decoded properly and play.  Is the reason to use a tool like prelude or first media browser or even bridge or Lightroom or a third-party tool like metafuze or shotputpro or software format camera record dedicated like sony xdcam clipbrowser or panasonic p2 browser, redcine x, ect, as these tools are designed to analyze A decision-making / changes correctly syntaxed data and make sure v metadata is integrated directly in the media or in the prelude and first case container can also be enrolled in a sidecar XMP file, which is a flavor of XML that contains all the metadata of original capture associated as well as changes or additions made through these tools.

    Hazards come into play when the file changes native naming convention or a folder hierarchy are are directly on the content of media via the finder on mac or explorer Windows, any change at this level can break the relationship between the metadata stream and the essence of media, because changes are not written to the metadata or content of the headers or dealt with in a manner known as transmuxing...

    Media browser prelude & first time allow the search in the native files safe and destructive amending either the metadata related to the indigenous media or also allows a transcoding to do which will be then to copy or recreate a new media file in any format selected and a new metadata stream.

    Prelude is a nice utility and Media Browser of first a great tool to organize, edit and selectively ingesting media and or meetings and selects fast.

  • Permutation of position of list view for dynamic video clips

    Hi all

    I have a question that is difficult to explain. I have a class file that loads an external XML file, analyzes the main nodes in an array, and then creates a movie clip instance for each of the nodes, the text inside the movie clip based instance fields on the child nodes in the XML file.

    Each added movie clip instance dynamically has a built in clip that acts as a tab. I have update the dynamic text of this integrated clip, based on the name of each main XML node.

    Now, where I'm stuck, it's that I have attached an event listener to each clip tab which is created dynamically within the video clip. I want to do is when the user clicks on this tab have this movie clip will move to the top of the list of display on all other dynamically created movie clips. My problem is that I don't know how to get correct references.

    When I create movie clips dynamically I store objects in a table. The problem seems to be that the event is triggered for a clip inside the dynamic clip so I don't know how to reference the clip parent. Maybe it's something else, but I don't know how to refer to the main movie clips that I want to switch.

    I hope that makes sense. My main question is how can I use the swapChildren or setChild functions when you click the clip is in the clip I want to change in the display list as well as the fact that this clip is created dynamically.

    Any help or advice would be appreciated!

    Here is my code:

    {classes package

    flash.xml import. *;
    import flash.display. *;
    import flash.events. *;
    flash.net import. *;
    import flash.utils. *;
    import flash.text. *;

    public class estimatesheet extends Sprite {}

    public var allEstimateSheets:Array = new Array();
    public var allEstimateSheetsMC:Array = new Array();
    public var textFields:Array = new Array();
    public var startX:int = 5;
    public var startY: int = 5;
    public var field_increment:int = 15;
    public var bg_increment:int = 50;
    public var selected_tab:int = 0;

    public void estimatesheet (file:String) {}

    xmlLoader (file);

    }

    public void xmlLoader (file:String) {}
    var loader: URLLoader = new URLLoader();
    loader.dataFormat = URLLoaderDataFormat.TEXT;
    loader.addEventListener (Event.COMPLETE, handleComplete);
    Loader.Load (new URLRequest (file));
    }

    public void handleComplete(event:Event) {}
    try {}
    var allXml = new XML (event.target.data);

    addChild (container);

    Store each node parent to estimate leaf in the table
    for (var i = 0; i < allXml.children () .length (); i ++) {}
    allEstimateSheets.push (allXml.children ([i]));
    createSheet (allEstimateSheets [i], i);
    }

    } catch {(e:TypeError)}
    trace ("cannot parse for XML");
    trace (e.message);
    }
    }

    Create a timesheet for each node in the XML file
    public void createSheet (data: XML, sheet: int) {}

    Duplicate the clip estimateSheet for each node in the XML file
    var estimateSheetBg:EstimateSheet = new EstimateSheet();
    estimateSheetBg.x = 0;
    estimateSheetBg.y = 0;
    addChild (estimateSheetBg);
    allEstimateSheetsMC.push (estimateSheetBg);
    trace ("the sheet name:" + data.@name);
    allEstimateSheetsMC [plug].bg.tab.tab_name.text = data.@name;
    allEstimateSheetsMC (factsheet).bg.tab.addEventListener (MouseEvent.CLICK, tabClick);


    For each sheet in the first estimate sheets move the tab down
    if(Sheet>0) {}
    allEstimateSheetsMC (factsheet).bg.tab.y += 25;
    }

    Analyze the XML child nodes
    for (var i = 0; i < data.children () .length (); i ++) {}

    Create dynamic text fields
    var textFormat:TextFormat = new TextFormat ("Verdana", 11);
    var textField:TextField = new TextField();
    textField.setTextFormat (textFormat);
    textField.text = data.child (i) .@label;
    textField.border = false;

    textField.x = startX;
    textField.y = startY + field_increment;

    startY = startY + field_increment;

    allEstimateSheetsMC [sheet] .addChild (textField);

    textFields.push (textField);

    }

    }

    public void tabClick(event:MouseEvent):void {}

    This function to share footage, essentially taking the selected_tab and exchange it with the one that was clicked
    trace ("what is it?" + this.parent.name);

    container.swapChildren (allEstimateSheetsMC [selected_tab], this.parent);


    }

    }

    }

    "this" trace and see what it gives you...

    The "event.currentTarget" will identify the object with the event listener are entrusted to him.

    Try tracing...

    trace (this, event.currentTarget);

    and see if they look like the same object.

  • Most sites work OK, YouTube loads and plays videos, if I try the connection that the page does not load, and all I get is a page of random characters?

    The above doesn't happen if you use Firefox and not other browsers?

    You can check the preferences of network.http. * on the subject: config page and delivery to zero all users "BOLD" network.http set prefs by default via the context menu-> reset.

    Check at least:

    • Network.http.Accept - Encoding (default: gzip, deflate)
  • Firefox does not save passwords and plays videos without sound

    My firefox is not asking to save passwords since I updated to the latest version. There passwords saved in the earlier version, that work well. but he adds more new passwords. It is not connected with banks and these sites. It does not save password for any site, and it does me not even an option to record. (I kept recording Yes password option). Another problem is that it plays without volume youtube videos while my IE works fine for these Web sites.

    This has happened

    Each time Firefox opened

    Since I upgrade 3.6.3

    User Agent

    Mozilla/5.0 (Windows; U; Windows NT 6.0; Chrome/5.0.375.70 en-US) AppleWebKit/533.4 (KHTML, like Gecko) Safari/533.4

    Make sure that you are not running Firefox mode of private - browsing using Firefox without saving history .
    In private browsing mode that some menu items are disabled (in gray) and some features like the visited links and others are disabled and does not.
    You're in private browsing mode, if you see "tools > stop private browsing."
    See Private Browsing - use Firefox without saving history and http://kb.mozillazine.org/Issues_related_to_Private_Browsing
    .....
    You enter private browsing mode, if you select: Tools > Options > privacy > History: Firefox will be: "don't forget the story ever.
    To view all the history settings, choose: Tools > Options > privacy, choose the setting Firefox will: use the custom settings for the story of
    Uncheck the box: [[] 'Automatically start Firefox in a private browsing session']

    See also http://kb.mozillazine.org/User_name_and_password_not_remembered (bookmarklet)

  • I have problems with viewing and downloading videos

    Hi I'm trying to watch videos in youtube and windows media player, but I can't do it. I use Windows XP Professional when I start watching a video, it starts to download and then I get the circle to peas autour going around and around but it does not play when she plays it stops and how can I solve this problem?

    Thank you
    E-mail address is removed from the privacy *.

    Hi upthearts,

    One of the possible reasons could be the speed of the internet thanks to which time can take to the buffer. It has one or more of the following could cause this;

    ·         The Internet connection speed

    ·         Amount of RAM (Random Access Memory) used on the computer

    ·         Amount of memory available on the computer

    Method 1: You can pause the video and let the video buffer for a few minutes before selecting the 'Play' button again. Giving the download a few minutes to catch up while the video is paused can help solve the problem.

    When the bar of State indicates the video transfer or the download is complete, resume playback of the video using the controls.

    Method 2: You can also contact your ISP (Internet Service Provider) to check connection problems.

  • Media Player will not play "video clip.

    Ive recently bought a car with a camera who writes on a microSD card.

    Yesterday everything worked absolutely fine when you view images in Media Player, but today, he won't play at all.  I just get the message "Windows Media Player cannot play the file. The player might not support the file type or does not support the codec used to compress the file"it comes on every video taken today, but as I've said above, all the yesterdays work very well and they are all the same type of file.

    Is there a problem with the card or files, or do I need something in Media Player.

    Please help, its very frustrating.

    Thank you

    Sounds to me like the problem likely exists with the files.  Maybe they don't have copy to or from the card properly, or maybe the card has reached the end of its service life.

    I would try that well.  Saving test or by downloading a video file, you know works, like this little Trick Microsoft OneDrive MP4 video in my OneDrive.  Save it to your computer and see if you can play it.  If so, you know that at least your Media Player is working.

  • Urgent need help, playing video Clips

    I'm a complete noob when it comes to ACE. I know some basic things like stop(); and gotoAndPlay.

    Here's my dilemma.

    Dear Professor gave us a task to create a Web site in Flash. You must have 15 links or 15 pages. He says that you can only go frame-by-frame in the main timeline without space interpolation between the two. I'm practically creating all my animations in symbols.

    This isn't a problem... I created a title of short video introduction in Flash using a Movie Clip symbol... placed on the main timeline on the first page and then called ActionScript to play the video.

    This is the problem... Then... the movie will play, but it will make a continuous loop... I tried to put a stop(); on the homepage, under the ACE... I'm just completely lost on how to get it to read the short clip and go directly to the home page... Could someone PLEASE direct me on how to do it and give me an explanation as to why this way is the way, that's... I want to understand how it works.

    Thank you

    Noob Flash

    Inside this movieClip opening change:

    Stop();

    This (parent). Play();

    TO:

    Stop();

    MovieClip (parent) .play ();

  • Since an update to Adobe Flash Player (10.3?), I had many problems to access web sites and play 'videos' on them.

    Since an update to Adobe Flash Player (10.3?), who apparently is not 64-bit capable, I had many problems to access the websites and "videos" by playing on their. There is also a special site that charge but the screen displays a full blank page. What can or should I do? The adobe site indicates that the new application does not support 64-bit, but it doesn't seem to be a solution for it or the option of returning to the previous flash drive that was no problem.

    Hello

    Read this interesting information and use the 32-bit IE browser:

    'http://kb2.adobe.com/cps/191/tn_19166.html '.

    Troubleshoot installation of Flash Player for Windows

    http://kb2.Adobe.com/CPS/141/tn_14157.html

    Uninstall Flash by using the uninstall program Flash Adobe link above.

    Flash is sometimes corrupted.

    http://get.Adobe.com/flashplayer/?promoid=BUIGP

    Reinstall Flash, after 1st unchecking / unchecking the Google Toolbar download option there.

    http://pietschsoft.com/post/2006/12/Vista-experience-update-Windows-Vista-x64-runs-32-bit-Internet-Explorer-by-default.aspx

    The Internet Explorer shortcut in the Quick Launch toolbar, and in the x 64 Vista Start menu will run the 32-bit version of Internet Explorer by default. Why run the 32-bit version if IE on the 64-bit version of Vista?

    There are actually two shortcuts for Internet Explorer in the "Programs" menu Why two and what is the difference?

    This is the title of each and they run exe:

    Internet Explorer
    "C:\Program Files (x 86) \Internet.

    Internet Explorer (64-bit)
    "C:\Program may Explorer\iexplore.exe.

    One runs IE in the "Program Files (x 86)" folder, this is the 32-bit version. The second is the 64-bit version.

    http://kb2.Adobe.com/CPS/000/6b3af6c9.html

    Trial of Adobe flash 64-bit

    http://www.ehow.com/how_4670030_adobe-Flash-bit-browsers.html

    Read the above article on the 64-bit browsers

    http://social.answers.Microsoft.com/forums/en-us/InternetExplorer/thread/babaa5f8-FF06-4EA2-aef6-a9416d65f981

    Read the above information about Flash and 64-bit browser by PA bear MVP"

  • adding video clips at random to the scene with ACE

    Hello

    I need help with my code.

    I have 3 different film clips.

    They are called butterfly00, butterfly01, butterfly02. They are exported for ACE

    I need to add to the scene by ACE. Randomly. With the help of a timer.

    I put them in a table and the idea was to get out of here, but it is not working properly.

    At the moment it works fine for the first 2 butterflies. After that, it adds the butterflies to stage 2 on the same time and then 3 and 4 and etc. Accumulates.

    Maybe someone can comment on the code.

    Thanks in advance!

    var timerLeft: timer = new Timer (5000, 10);

    var liblikas00: butterfly00;

    var liblikas01: butterfly01;

    var liblikas02: butterfly02;

    var liblikas: MovieClip;

    var symbolArray: Array;

    var symbolButterfly: int;

    symbolArray = new Array();

    1. symbolArray.push (liblikas00);

    trace(symbolArray[0]);

    1. symbolArray.push (liblikas01);

    trace(symbolArray[1]);

    1. symbolArray.push (liblikas02);

    trace(symbolArray[2]);

    1. timerLeft.addEventListener (TimerEvent.TIMER, butterflyToStage);
    2. timerLeft.start ();

    function butterflyToStage(event: TimerEvent): void

    {

    symbolButterfly = Math.floor (Math.random () * symbolArray.length);

    trace ("symbol is" + symbolButterfly);

    Switch (symbolButterfly)

    {

    case symbolButterfly = 0:

    var liblikas00: butterfly00 = new butterfly00();

    liblikas00.x = stage.stageWidth / 2;

    liblikas00.y = Math.floor (Math.random () * (1 + 150 - 350)) + 150;

    stage.addChild (liblikas00);

    break;

    case symbolButterfly = 1:

    var liblikas01: butterfly01 = new butterfly01();

    liblikas01.x = stage.stageWidth / 2;

    liblikas01.y = Math.floor (Math.random () * (1 + 150 - 350)) + 150;

    stage.addChild (liblikas01);

    break;

    case symbolButterfly = 2:

    var liblikas02: butterfly02 = new butterfly02();

    liblikas02.x = stage.stageWidth / 2;

    liblikas02.y = Math.floor (Math.random () * (1 + 150 - 350)) + 150;

    stage.addChild (liblikas02);

    break;

    by default:

    trace ("Nothing");

    break;

    }

    }

    This is a reduced version of the code:

    var timerLeft: timer = new Timer (5000, 10);
    var symbolArray:Array = new Array("butterfly00","butterfly01","butterfly02");

    timerLeft.addEventListener (TimerEvent.TIMER, butterflyToStage);
    timerLeft.start ();

    function butterflyToStage(event: TimerEvent): void
    {
    var butterflyClass = symbolArray [Math.floor (Math.random () * symbolArray.length)];
    trace ("symbol is" + butterflyClass);

    var ClassRef: Class = Class (getDefinitionByName (butterflyClass));
    var classInstance: * = new ClassRef();
    classInstance.x = stage.stageWidth / 2;
    classInstance.y = Math.floor (Math.random () * (1 + 150 - 350)) + 150;
    addChild (classInstance);
    }

    If you want to be able to target objects then you can place them in a table as you add them and target them to that.

Maybe you are looking for