loading photos and make them buttonable!

Hello!

I have 12 pictures that I need to load and then make them available as buttons or - when the user presses the photo it initializes a function.  What is the best way to do it?

I went to loading an image via URLRequest and URLLoader road but I need to load 12, place them on the stage, to pass to NextBnt press and and when the user selects the photo., the view then goes to another screen. who is?

Do not know what route to go or which tools to use so if you could just tell me 'you should use the etc... blah and table. It would be great!

Thank you!!

I would like to use arrays, that allow a code cleaner and shorter and easier accessibility.

Fast code, did not check errors, typed just to give you an idea about how I would probably do it.

Make an array of URL the pictures

var arr_PicsURL:Array = ["mainMenuPics/01.jpg", "mainMenuPics/02.jpg""mainMenuPics/03.jpg", "mainMenuPics/04.jpg"];

Create your clips and put them in a table for easy access later

var ldr_One:Loader = new Loader();

var ldr_Two:Loader = new Loader();

var ldr_Three:Loader = new Loader();

var ldr_Four:Loader = new Loader();

var arr_Loaders:Array = [ldr_Two, ldr_Three, ldr_One, ldr_Four];

Add them to the stage (remember to set their positions, right now they are all at 0,0)

for (var x: int = 0; x)< arr_loaders.length;="">

addChild (arr_Loaders [x]);

load images

for (x = 0; x< arr_picsurl.length;="">

{

arr_Loaders [x] .load (new URLRequest (arr_PicsURL [x]));

arr_Loaders.contentLoaderInfo.addEventListener (Event.COMPLETE, loadedPic);

}

Add the earpiece button after finished loading

function loadedPic(e:Event):void

{

for (var x: int = 0; x)

{

arr_Loaders [x] .buttonMode = true;

arr_Loaders [x] .name = String ("name" + x);

arr_Loaders [x] .addEventListener (MouseEvent.clickButton);

}

arr_Loaders.contentLoaderInfo.removeEventListener (Event.COMPLETE, loadedPic);

}

function clickButton(e:Event):void

{

Switch (e.Target.Name)

{

case "name0:

action here

break;

case "Name1:

action here

break;

case 'name2 ':

action here

break;

case "Name3":

action here

break;

}

}

Hope that helps.

Tags: Adobe Animate

Similar Questions

  • Scanning multiple photos and save them in dependent files

    Have a new printer, a large Format HP Officejet 7500 a.

    ProductName; C9309A - SSN {removed privacy}.

    Installed on Windows 7 Pro and Mac OS X

    Question; Scanning multiple photos and save them in dependent files, as it used to be with the series HP4500. Possible or not? No msg error but boring...

    This is possible, plaurier, but you will need to select it in the printer for scanning software. When you are scanning from your computer, there should be a window that appears with information about the type of file you want to save as only as well as the details of the analysis.

    Here there should also be a button or a link for the "Advanced" options You can choose if you used to save the scans as a single file or multiple.

    Let me know if it helps!

  • Is there such a thing has a picture on adobe viewer where I can store my photos and navigate them, view it on the screen?

    Is there such a thing has a picture on adobe viewer where I can store my photos and navigate them, view it on the screen?

    Something like the mac iPhoto,

    Yes, as Trevor mentioned, with the bridge, you can press the space bar and the images will become full framework, then you simply use the arrow keys to scroll though them and the space bar to return to the visualization of bridge normally. There is also a slide show option.

  • How to change the font size of the copyright on my photos and make so comment

    How to change the font size of the copyright on my photos and make so comment

    Open the watermark editor (Menu > edit > modify watermarks...)

    Select the watermark to delete in the drop-down list box.

    Click on the drop down a second time.

    Choose the option 'delete '.

  • My color, setting for LR and PS is ProPhoto RGB. If I want to export my photos and place them on OneDrive or watch on TV of the photo, can I change the color setting in sRGB?

    My color, setting for LR and PS is ProPhoto RGB. If I want to export my photos and place them on OneDrive or watch on TV of the photo, can I change the color setting in sRGB?

    In general, I would recommend sRGB, if images must be consulted on the screens of TV or PC monitors. sRGB is usually the universal profile for sharing photos on the web. If you want to share your images on a single disc, most of the people will see their best, without changes in color, with an sRGB profile.

    So it really depends on your goal. You use a player for sharing and viewing on backup and storage devices.

  • How can I download the plugins and make them work

    I found a great and free with several plugin.  First, I tried to download one of the free plugins for Adobe C6.  Following all the instructions.  Then open them Adobe photoshop I opened a picture and went to change == plugins == and see listed that I had just installed, so I choose what it and said ok. is nothing happned.  So, how do you use plugins?  Can someone help me please?

    Thank you

    Thank you

    The plugin is called redfield Fractalius and I saw it on a video from Adobe for PS6 == I managed to install one of their free plugins, but when I installed the Fractalius demo he just went to his destination file, but will not do anything else == I'm new to all this, but will go back and try to review question forum.

    Thank you

    Date: Wednesday, March 12, 2014 02:05:07-0700

    From: [email protected]

    To: [email protected]

    Topic: how to download plugins and make them work

    Re: how to download plugins and make them work

    created by c.pfaffenbichler in Photoshop for beginners - discover complete discussion

    Nice day!

    If the plug-in is indeed suitable for use in Photoshop CS6 you can ask the plugin creator/s said.

    As you have not revealed which plugin you are talking about, nor what are your OS and hardware etc, it seems unlikely that you can expect a lot of relevant help here.

    Kind regards

    Pfaffenbichler

    Please note that the Forums Adobe does not accept attachments to emails. If you want to embed an image on the screen in your message please visit the thread in the forum to incorporate the image into the http://forums.adobe.com/message/6202124#6202124

    Replies to this message received to everyone subscribed to this topic, not directly to the person who posted the message. To post a reply, or reply to this email or visit the message page: http://forums.adobe.com/message/6202124#6202124

    To unsubscribe from this thread, please visit the page message to http://forums.adobe.com/message/6202124#6202124. In the Actions box to the right, click on stop Notifications by e-mail.

    Start a new discussion in Photoshop for beginners to the Adobe community

    For more information on maintaining your email forum notifications please go to http://forums.adobe.com/thread/416458?tstart=0.

  • Load a fill color values and make them applicable

    I have a main FLA and when a button is cliked some sovereign wealth funds charge in it. I need to get a fill color applied to an object depending on which button is cliked.

    E.g. my_btn - click - my.swf of loads and to #333333 'my_mc.

    I want to associate a db MySQL here since I'm loading data with the command delivery the same buttons.

    Is this possible? If so how can I get the script?

    :

    var c:Color = new Color (my_mc);

    {my_btn.onRelease = Function ()}

    c.setRGB (0 x 333333);

    }

  • Very much a beginner. How can I cut someone on a group photo and move them to another part of the same photo?

    I have a group photo and I would like someone from one side of it to the other. I would like to know how to select this person, cut him and stick him in a different place on the image. Is this possible? If so, how? Thank you!

    Try this

    Using Photoshop | Moving and Patch content-Aware

  • 10 iOS is picking up strangers in the photos and adding them to the list of people.  How can I get rid of them completely.  That is, pictures that I don't like this person speak

    perfect strangers (people standing or sitting in the background of an image that I took) are appearing in my list of people and there is no obvious way to get rid of them.

    The only thing you can do about them is hide people or ignore them, if they appear in the section "Add people" from the album of peoples.

    If you hide a person detected, no photo with this person will be added to a memory.

    See this help page: http://help.apple.com/iphone/10/#/iph9c7ee918c

    Hide and show people. Tap Albums, people, press Select, tap on the people you want to hide, and then select hide. To redisplay the people, press on show hidden people, press Select, people, then press display. Photos that contain hidden people appear not in Moments, Collections, the years and memories but are visible in albums.

    Show hidden people. Press Albums, people, drag upward, on view hidden people. To see all the pictures with hidden people, tap Albums, tap Hidden.

  • Making predefined and make them disappear

    I had pre-defined and intended to use as a watermark for my photos.  Now, when I opened CS5 upward, they are more in the area of "brush".  Where did they go?  What happened to them?

    Hello

    Please open the brush presets Panel:

    Do you see your brush in there?

    Julia

  • How can I sort the selector non-unique values and make them unique in the structure of the case?

    I want to clarify 3 ranges as breeders of the case.  For example, I am able mV and I want 0.10, 10.20 and 20.30, but, when I enter them in this way, I get an error that says that the selection values are not unique.

    I want case to answer when the input is greater than 0 but less than 10.

    I want the second case to react when the input is greater than 10, but less than 20.

    I want the third case to react when the input is higher than 20, but less than 30.

    And there is the case by default, 0.  The case structure think my default is bunk with my case?  How a list correctly these ranges in the Tag Chooser structure cases to avoid the error?

    Also, I plugged in my blood "to LONG integer" and then to the Terminal case structure to convert entire for the entry of case structure (blue wire).  Is it the right thing to do, because my values of tension will certainly be decimal numbers, not integers.

    Before converting in I32, for example, use "turn to + inf" and settle the case accordingly.

    (A plain to_I32 rounds to the nearest integer, making it impossible to meet limits).

  • How to multiply 2 strings and make them part of it

    Hello, I have a problem. I need to multiply two signals and then make an integral of it. "Because my signals coming out of the cluster, they are strings, so after having multiplied I can't wire it" block "integral. Can someone help me how to convert and wire properly? You can see what I'm talking to the screenshot.

    They are SOME of the channels.

    LV simply uses a color very similar to clusters and the strings, bnut the shape of the wire is different.

    In addition, the multiplication does not with strings at all.

    And it works with clustes if

    • both groups have only numeric values (or in your case tables of numbers)
    • and the quantity of the components of the cluster is the same

    That your code is that the two paintings in the two groups are multiplying... that multiplies each value in each table.

    As an integral function doesn't accept that a single Bay, there is a data type mismatch.

    What you have to do is to calculate the integral for each table, so it may be better to multiply the berries explicitly instead of using the cluster...

    Norbert

  • How to burn a cd with mp3s on a disk and make them stay in the order that I put

    original title: I want to burn a cd with mp3s on a disc and have their stay in the order I put them can not be rearranged by windows media player, can develop an option of engraving for that matter?

    I want to burn a cd with mp3s on a disc and have their stay in the order I put them can not be rearranged by windows media player, can develop an option of engraving for that matter?

    Hi Patriotson,

    Thank you for your response back!

    There is no update of the tel. This is normal. Are there additional features added in Windows Media Player, and then she will be notified on the Microsoft Web site.

    Hope this information is helpful and let us know if you need more assistance. We will be happy to help.

  • Convert all files to PDF / leader/acrobat photoshop and make them editable

    Hello

    I will start a small business where customers will download the files that I need to change then. I want to allow customers to download any type of file so that I can then convert it to a PDF file or any file acrobat / illustrator file etc so that I can change it.

    Is this possible?

    If so, what software adobe would allow me to do this? will it be illustrator, photoshop, or any other?

    TIA

    There is no single solution and PDF is a choice very little helpful for editing. You need ro be accurate and precise. People slow to download files created with a particular software THAT YOU OWN. Change in the original software. You may need the exact version.

    When the installation is FINISHED, make a PDF, not before.

  • How to paste images and make them look like they belong

    I've been messing around with photoshop for a few weeks. I'm trying to find a way to copy and paste a person (or object) in another image and do seems like it belongs. Is not like you just copy - paste! Any help?

    image.jpeg

    Hey Kevin,

    Please check the tutorial below.

    How to merge photos with realism in tutorial Photoshop CS6 - YouTube

    Let us know if that helps.

    Kind regards

    ~ Mohit

Maybe you are looking for

  • Speed wireless advantage with new time capsule?

    I have an old TimeCapsule (without 801.ac) my new Macs have 801 capable cards. AC. Currently when several computers hit activity broadband router (TimeCapsule) (video streaming, etc.) slows down considerably. He asked the last TimeCapsule will fix th

  • Contacts disappeared on iPhone

    My contacts (all the names, telephone numbers, addresses, etc.) have disappeared on my iPhone 6 (iOS 9.3.2) but are still there on my other devices (iPad, Macbook Pro). Any ideas?

  • "searching for leads", how can I get rid of him forever...

    research leads' How do I get rid of him forever, seems embezzling something, he withdrew the search engine options, but it keeps reappearing, having (apparently) not isolated, the Control Panel program, but its still LURKING there somewhere

  • Looking for Non-iTunes Apple TV 4 movies

    The new remote control and the method to search for non-iTunes movies is absolutely useless. So I hope we get an update soon for a search of movies, similar looking for my music.  For people who have a large media library (more than 1000 films), the

  • OS not found on the c: drive, cannot start windows

    Today, I tried to restart my laptop and all of a sudden, they won't let me restart. It keep telling me that I can't or my hard drive is too small. and I tried all the option, even tried to restore my c: drive, but then he told me that I have to choos