Universal programmer through several images

Hello again

I am creating a flash quiz, and each question is timed. When the timer is up, I have a few actionscript that says that "when the timer reaches 0, go to and stop the frame x', but the problem is that I have quite a few pages and some of my timers are contradictory." Is it possible that I can do a single clock control everything?

At the moment, I have a timer that controls when the clock expires

var count:Number = 6;
var myTimer:Timer=new Timer(1000,count);
myTimer.addEventListener(TimerEvent.TIMER, countdown);
myTimer.start();


function countdown(event:TimerEvent):void {
myText_txt.text=String((count)-myTimer.currentCount); 


if(myText_txt.text == "0"){
gotoAndStop(5);
}
}

I have "correct" and "incorrect" pages, so when a question a question we answer correctly, you will jump to the 'correct' frame on the timeline. Then I have a timer that controls when you leave this page

Example of

var myTimer2:Timer;


myTimer2 = new Timer(3000, 3)
myTimer2.start();


myTimer2.addEventListener(TimerEvent.TIMER, backtoStart2)
function backtoStart2(evt:TimerEvent):void{
    myTimer2.start();
    if(myTimer2.currentCount == 3) (gotoAndStop(3));
    trace (myTimer2.currentCount)
}

My problem is that I have 8 questions, and it seems silly to make a new timer for each page, especially when I go if a function definition error duplicate. What is the best way to address the issue if I want that all my actionscript on an image?

You don't need to jump through all these hoops.

Code below on the first image will automatically advance your film. Just replace image sequence with executives from the target you want in the table frameSequence. Also make sure that the layer with this code is continuous. Remove all the code from other frames - I mean everything.

Read the comments in code.

stop();

var count:Number = 6;
// sequence of frames through which movie should go
var frameSequence:Array = [5, 10, 20, 30];
/**
 * frame to jump to after countdown is finished,
 * first value is the first element of frameSequence array
 */
var frameToGo:int = frameSequence[0];

var myTimer:Timer = new Timer(1000, count);
myTimer.addEventListener(TimerEvent.TIMER, countdown);
myTimer.start();

function countdown(event:TimerEvent):void
{
    myText_txt.text = String(count - myTimer.currentCount);

    if (myTimer.currentCount == count)
    {
        // get index of frameToGo in the array
        var index:int = frameSequence.indexOf(frameToGo);
        /**
         * get next frame in sequence if there is any left
         * if no frames left to go - set value to 0
         */
        frameToGo = index < frameSequence.length - 1 ? frameSequence[index + 1] : 0;
        // move timer to the original state
        myTimer.reset();
        /**
         * if next frame is not 0 - proceed
         * otherwise - do nothing
         */
        if (frameToGo > 0)
        {
            myText_txt.text = String(count);
            // restart timer
            myTimer.start();
            gotoAndStop(frameToGo);
        }
        else
        {
            myText_txt.text = "done";
        }

    }
}

Tags: Adobe Animate

Similar Questions

  • Lightbox with several images accompanying a vignette?

    Is it possible to have a thumbnail allow you to scroll through several images without having to click on another image?

    For example, let's say I have three projects with 10 images per project.  I want to only have three thumbnails that allow the user to see each project by clicking on its thumbnail "master."

    Thank you.

    The only real difference is that there is no way to automatically select images as in the version of slideshow. You must add them manually.

    Thanks for asking this question though. I added to a list of tutorials to Muse that I'm trying.

    Post edited by: Brad Lawryk

  • Cannot change the metadata in the grid of the library through several selected Images

    This was bugs me for some time. It started there when I did a CC updated a few versions (about 2015.2, I think). I wrote chalked it up to a bug that they would fix it soon, but it has not been resolved.

    Since I started using Lightroom 2, I used to be able to select several images in the grid view library and then modify the metadata in the Panel to the right and he would write to all. For example, I select 12 photos and set the title information and location. So when I watched each picture they would have the new title & location applied to them.

    After a CC update I lost this ability - metadata only, can I change through selected images is using keywords.

    Because I've lost this ability, I serve the copy metadata (SHIFT-ALT-CMD-C) and paste (SHIFT-ALT-CMD-V) to change the metadata in multiple images, but it's a clunkier and more time-consuming method. I really liked being able to hold down the Command or SHIFT and select several images to change all their metadata quickly.

    Could someone help me? Am I missing some setting or preference?

    This happens in Lightroom CC 2015.6 on my iMac OSX 10.9.5 running

    and also on Lightroom CC 2015.5 on my MacBook OSX 10.11.5 running

    johnrellis - problem solved! I did a reset of Lightroom preferences (How to reset preferences in Lightroom?-the Lightroom Queen).

  • Help to load several images through LoadVars

    Hello everyone.

    I need a hand load several images using the LoadVars with a text file. I can get it to upload 1 image but no more than that. I'm aware of other methods such as the use of components, but I'm looking for a method where I can access and modify all data of the 1 text file (there will be a text variable in the file aswell to, but I am more concerned about the images at the moment).

    In any case on the issue. I created a simple .fla file of many that describes my problem.

    The film contains 3 layers:

    -top layer contains ACE

    -middle layer contains a clip empty film with the name of the instance of mcImage1

    -lower layer contains a snippet of film empy with the name of the instance of mcImage2

    The AS level contains the following code:

    ImageData = new LoadVars()
    ImageData.Load ("Data.txt")
    imagedata.onLoad = {function (ok)}
    {if (OK)}
    mcImage1.loadMovie (this.) Image1)
    mcImage2.loadMovie (this.) Image2)
    } else trace ("loading issue")
    }


    In the same folder of my .swf file, I have a text file called data.txt that contains the following

    & Image1 = image1.gif
    & Image2 = image2.gif

    In the same folder of my .swf file, I also image2.gif and two image image1.gif.

    When I run the flash the image2.gif is correctly imported. Image1.gif does not appear.

    You can download my source files and all images here

    http://www.myrealpage.com/projects/var_test/var_test.zip

    Any help that can be made on this problem is highly appreciated.

    Thank you

    Matt

    Hi again Rothrock.

    I just wanted to say thank you for taking the time to help me. I have the file works as expected today.

    For those who are interested here is what I ended up doing

    In my data.txt file:

    & Image1 = image1.gif & Image2 = image2.gif

    All first framework covering the timeline with the video clips.

    var img1:String;
    var img2:String;
    var img3:String;
    var img4:String;
    var img5:String;
    ImageData = new LoadVars();
    imagedata.onLoad = {function (ok)}
    {if (OK)}
    img1 is this. Image1;
    img2 is this. Image2;
    img3 is this. Image3;
    img4 is this. Image4;
    img5 is this. Picture5;
    } else trace ("loading issue");
    }

    ImageData.Load ("Data.txt");

    And on each individual framework where I wanted my movieclips mcImage

    mcImage1.loadMovie (_root.img1); or mcImage2.loadMovie (_root.img2); and so on.

    Thanks again for your time. It was very appreciated.

    Matt

  • Place several images at once

    I tried to programmatically import several images in InDesign, but I'm having a small problem. As I understand it, a multiple selection returns an array, but the script is up on top of me. Here's what I have so far:

    var slideshowImages = File.openDialog ("choose the pictures you want included", "files: * .jpg", true);

    If ((slideshowImages! = "") & & (slideshowImages!) (= null)) {}

    var slideshowItems = tabletSlideshow.pages.item (0) .place (slideshowImages);   < = this is where I get the value of «invalid parameter 'Filename' method 'place'...» "error.

    slideshowItems = slideshowItems [0];

    Can I place one, but not multiple. Any ideas?

    The usual way. Use slideshowImages.length to get the number of images; Then, you can loop through all of the images and place each of them:

    for (i=0; i
    

    -even if you need to think of a way to place each image on a page that is unique, because this loop will stand on top of the other on the first page.

  • Combine several images via action sequences (and script?)

    My problem is quite simple.

    After that installation of the release of minutes of my 3d in photoshop (32-bit) application and changing the appearance through several CC layers in the layer modes different (e.g., hue/saturation in overlay mode) I'm done with my component printing purposes. The model is complex, with several hidden folders, single-blind CC layers and layers of the image (some with masks).

    Now the client asked me to animate the part of the image. No problem, I thought. But the trick is to know how to assemble different image sequences (diffuse, specular, reflection, masks, etc., etc.). I came with a PS action that has loaded the images simple and classified in the same way as the master file.

    But now PS does not load additional images to the batch.

    Images are named in a Diffuse_00001, Specular_00001,... fashion. The first set of loading, but Diffuse_00002, all work goes wrong and PS load files 00001 (with the exception of a file which loads the proper incremental way).

    I can't transfer anything like that on AE as it is much too complex and I don't no AE very little.

    I assumed that the PS should be able to solve this task of batch processing, but a simple gesture batch seems to fail.

    Anyone knows a solution?

    See you soon

    Thomas

    Here is a basic outline (not tested) it will be necessary to do a fantasy Action to do what you want, at the moment the action to close all four input files.

    What the script will do is open 4 files in each folder

    Your name of the action and the defined action must be changed in the code

    Once your completed action it must be only the left file to save, it will be saved as a png in Renders folder and the file closed.

    It will then repeat as abobe.

    Hope this is a start for you.

    Select folder Renders
    var inputFolder = Folder.selectDialog ("Please select makes folder");
    Set the folders
    diffuse var folder = (decodeURI (inputFolder + "/ broadcasts"));
    var specularList = folder (decodeURI (inputFolder + "/ specularList"));
    var reflection = folder (decodeURI (inputFolder + "/ reflection"));
    var alpha = folder (decodeURI (inputFolder + "/ alpha"));
    The list of files
    var diffuseList = diffuse .getFiles (/ \.) (HDR) | (exr) / $i);
    var specularList = specularList.getFiles (/ \.) (HDR) | (exr) / $i);
    var reflectionList = reflection.getFiles (/ \.) (HDR) | (exr) / $i);
    var alphaList = alpha.getFiles (/ \.) (HDR) | (exr) / $i);
    Create a loop to open and process the files
    for (var a = 0;<>
    Open all the files of four
    Open(diffuse[a]);
    Open (specularList [a]).
    Open (Reflection [a]).
    Open (alpha [a]).
    get your action name and action series
    At present, the action will have to close four files!
    doAction ("ActionName", "ActionSet");
    Do your backup etc.
    var saveFile = file (decodeURI (inputFolder + "/ Image_" + diffuse[a].name.match(/\d+/) + "png"));
    Save in png 24-bit
    SavePNG (saveFile);
    Close document
    app.activeDocument.close (SaveOptions.DONOTSAVECHANGES);
    }
    function SavePNG (saveFile) {}
    pngSaveOptions = new PNGSaveOptions();
    pngSaveOptions.embedColorProfile = true;
    pngSaveOptions.formatOptions = FormatOptions.STANDARDBASELINE;
    pngSaveOptions.matte = MatteType.NONE;
    pngSaveOptions.quality = 1;
    pngSaveOptions.PNG8 = false; 24-bit PNG
    pngSaveOptions.transparency = true;
    activeDocument.saveAs (saveFile, pngSaveOptions, true, Extension.LOWERCASE);
    }

  • Why does the camera on iPhone last several images when I press the button once?

    Why does the camera on iPhone (5 c) last several images when I press the button once?

    Also, WHY when I email it to myself not come to my Inbox in?

    Sylvee

    1. When you press the button for too long, you take, what we call, Photos of Burst. It's getting so you can choose the one that needs to be said, a sequence of quick action. Practice a tap faster the button to avoid this problem.

    2. Please explain in more detail.

  • I'm trying to select several images (Forms), but I have not found a selection tool. This selection tool to transform the mouse cursor in an arrow and it is possible to select several images or figures. I use Microsoft Excel for Mac 2011 Version 14.5.3.

    I'm trying to select several images (Forms), but I have not found a selection tool. This selection tool to transform the mouse cursor in an arrow and it is possible to select several images or figures. I use Microsoft Excel for Mac 2011 Version 14.5.3. Thank you!

    tupensi wrote:

    use Microsoft Excel for Mac 2011 Version 14.5.3. Thank you!

    Then you should post on the Microsoft Mac forums where to hang out the gurus of the Office, as is the Microsoft product, with that you are having problems:

    http://answers.Microsoft.com/en-us/Mac

  • How can I delete several images in the Finder at the same time

    How can I delete several images in the Finder all at once rather than one by one

    Click on an image and the successive images to press the SHIFT, or command key by clicking on the image to add it to the selection. Then Ctrl-click (tap two fingers) on any icon and choose to put in the trash. If the icons are in an easily selectable column or online, you can click on the window that contain, and then drag around them for a multiple selection.

  • Presario c771us: several images presario

    My laptop screen displays several images permanently - 2 columns of 3 1/2 images.  Other positions for recent laptops suggest removing the battery and the power supply or by simultaneously pressing the Fn and F key. On this laptop, I tried Fn and F4; two icons appeared, but I wasn't able to move the cursor and switch between the two.

    Any other ideas? How to rule out a faulty screen or graphics card?-this baby probably don't spend a ton of $$$.

    Thank you

    Hi @oscarmeyerwiene ,

    Thank you for visiting the Forums HP's Support and welcome. I looked in your question about your HP Compaq Presario C771US and problems with the display on the screen. Here is a linkto a document that will help you to troubleshoot the image on the screen flickers, has lines or distorted colors.

    Most of the time it does not appear on an external monitor if the LCD screen or the inverter, or the screen itself. Have you connected the laptop to a monitor and the image appears on the monitor?

    Here is a documenton how to connect to a monitor if you need.

    Here's a document on an overheat, as dust debris could cause image problems.

    Hope it helps (LOL for creative name)

    Thank you.

  • Button "Exit", used in several images of the sequence

    I hope that there is a more elegant way to do...

    See the VI attached for a much simplified program that is typical of what I am trying to accomplish.  Basically I have a button that I want available in several images in the sequence.  In this case, I used a button "quit".  When you press on, the program passes by remaining sequence frames until it ends.  The last image "unclicks" the button "Exit".  This last image is necessary because I had to put the mechanical action of the Exit button for "switch when released" because I used local variables in all the images in the sequence after the first.

    Is there a way I can accomplish the same functionality of this program without using local variables and/or during the definition of the mechanical action of the 'exit' switch to ' lock releasing?  Specifically, I'm looking for solutions that will work in several images of a structure of stacked sequence (I realized there are ways for the three lights without using a structure of stacked sequence, but I'm not interested in doing).

    Any help would be greatly appreciated!  Thank you!

    Something where you're looking at a sequence of steps, you really recommended using a state machine architecture.  (Search the forums for examples).

    Having several structures event with cases duplicated in different settings of a structure of stacked sequence (it would be a little better if you used a structure rather flat sequence), only to request trouble on the road.

  • I have deleted the content of several image files and now want to remove the file names. I don't find a way to remove the names.

    * Original title: file names of photos of Deletig Windows after emptying the file

    I have deleted the content of several image files and now want to remove the file names. I don't find a way to remove the names. How can I delete the file names?

    Right-click on the name of the image file, then choose 'delete '.

  • using a hp 6500 - how to scan several image documents and keep them in a single image file

    using a hp 6500 - how to scan several image documents and keep them in a single image file instead of hafving to create a separate file for each page?

    http://h30434.www3.HP.com/T5/scanning-faxing-and-copying/HP-OfficeJet-6500-scan-multiple-pages-into-one-PDF-file/TD-p/252650

    This previous thread should help you.

  • Adding several images and videos to DVD Maker

    When you create a DVD Maker project, I am able to add several images, and then I added successfully a video at the end of the photos. In order to catch up with my story, I would now like to add another group of images after the video. In other words, my goal is to have three scenes, IE 1 scene will be the first batch of images. Scene2 will be video and scene 3 to be the second batch of photos
    However, I find that whenever I try to add the second batch of photos they're all in the first group of photos automatically. I find myself with a larger size Scene1 and the Scene2 video.
    How can we separate the two groups of photos, when I open the DVD maker I see only a folder with pictures and the folder with the video. Can I change the order of these two, but I can't create the third folder of photos.
    All my photos are in .jpg format and the video is in .wmv format
    Thanks for any help and advice

    When you create a DVD Maker project, I am able to add several images, and then I added successfully a video at the end of the photos. In order to catch up with my story, I would now like to add another group of images after the video. In other words, my goal is to have three scenes, IE 1 scene will be the first batch of images. Scene2 will be video and scene 3 to be the second batch of photos
    However, I find that whenever I try to add the second batch of photos they're all in the first group of photos automatically. I find myself with a larger size Scene1 and the Scene2 video.
    How can we separate the two groups of photos, when I open the DVD maker I see only a folder with pictures and the folder with the video. Can I change the order of these two, but I can't create the third folder of photos.
    All my photos are in .jpg format and the video is in .wmv format
    Thanks for any help and advice

    =====================================
    If you need three specific scenes on your DVD... your best bet
    would be to create three projects Live Movie Maker and
    Save each in the. WMV Movie format. Then, when you
    import the three. WMV video clips DVD Maker intp... each
    one is a scene (chapter).

  • Apply preset on several images that partially work

    I'm used to apply autotone import order of difficulty of exhibition. But then, I usually apply a preset (like for example the VSCO) affecting many things BUT show and usually affecting highlights, shadows, blacks and whites to fixed values, among other things.

    My problem is: I can apply the preset to an image and it works, but not a lot. I know how to apply a preset to several images: library in grid or develop mode with activated automatic synchronization. The problem lies elsewhere: the preset can change things like the curves of a large number of files, but as highlights, shadows, blacks and whites are concerned, the values are changed to only a small number of photos arround the "plus" selected, but not for each selected image. However, each photo is known to have the prest applied, even if it is not fully applied. I don't know if the preset is only partially implemented, or if it is fully implemented, but your car is applied again instantly for a reason any.

    I tried many things including the reset of LR and replace same. I tried to back up the catalog and open the backup instead. Can you help me?

    This is a long-standing bug. Please add your vote and the details of your problem to this bug report in the official feedback forum Adobe: Lightroom : changes to the settings not applied to all photos of batch development | Community customer Photoshop family

    As you can see in this bug report, when you apply the auto tone to a batch of photos, LR postpones the real parameters calculation until you select the image and perhaps see with a magnifying glass. The presets applied before its auto settings are actually calculated will be ignored.

    The annoying workaround should wait the auto tone is actually applied - select each image in the library grid view, wait a few seconds and if it does not, open it in magnifying glass.

Maybe you are looking for