change the location of an array element (Animation)

Hello

our teacher asked us to do a class project with Flash and I have decide to do one demonstration for the different kinds of sorts and whom I need to show this process step by step:
1 - compare two elements table
2 - exchange their location in case of verification of the State


yet I managed to create a table and fill with the random number I alos fact exchanging the first two elements

Here is the code:


var tab: Array = new Array();

var min = 0;

var max = 10;

function complete (tab) {}

for (i = 0; i < 5; i ++) {}

tab [i] = Math.floor (Math.random () *(max-min+1)) + min;

}

}

T0 = tab [0];

T1 = tab [1];

T2 = tab [2];

T3 = tab [3];

T4 = tab [4];

//t0,t1,t2,t4 are the dynamic text variable 

var speed = 5;

move function (a, b, c and d, p) {}

If (a > b) {}

c._x += speed;

d._x = speed;

If (d._x == p) {}

Speed = 0;

}

}

}

onEnterFrame = function () {}

MOVE (t0, t1, 0, 1, 54);

//to0 and to1 are the Instance Name of the Dynamic Texts 

};

My problem is how do the other elements in the Table (they are 5 items)

I want to say I can't just create a for loop and replace 0 by [i]

(I don't know if possible or not, but I try and it did not work)

Thank you

To target an object using a counter, you always use the brackets but what you put in the brackets must be a string value for the name of the instance of the object...

This ["on" + i] will target the textfield to1 when I = 1, etc.

Tags: Adobe Animate

Similar Questions

  • Impossible to change the location of the screenshot

    Hi all

    I need assistance to change the default location for my screenshots. I tried all the advice I could find so far, the default terminal command 'defaults write com.apple.screencapture location' does not work.

    I did the 'killall SystemUIServer' and also tried a manual reboot.

    When I use the command 'defaults read com.apple.screencapture' it displays the right folder (i.e. ...Desktop/Screenhots), but when I take a screenshot it still saves on the Desktop and not in the folder.

    I tried to restore the location to it's default value, I also tried to change the location using Onyx, I checked to see if the folder has the correct rights.

    So anything else I can try other than a fresh install?

    Kind regards,

    Nick

    See the ~/Library/Preferences/com.apple.screencapture.plist file and open it, you see the change?

  • Change the location of several pictures at the same time?

    I see how to change the location of a photo at a time. Is it possible to change the location of several pictures at the same time?

    Thank you

    Phil

    Select the photos and info - enter the location (or any other field of the info) and it is applied to all photos

    This is described in using Photos - a good place to get help with Photos

    View and add information about the photos

    To view or change information for the photos, you select one or more photos, and then open the information window.

    • Open the Info window: Double-click a photo to view it, and then click the Info button in the toolbar or press on command I.
    • Add or change information: Change the following.

      • Title: Enter a name in the title field.
      • Description: In the Description field, type a caption.
      • Favorite: Click the Favorites button to mark the photo as a favorite. Click the button again to deselect.
      • Keywords: Enter the keywords in the keywords field. When you type, Photos suggest keywords that you have used before. Press enter when you have finished a keyword. To remove a keyword, select it and press DELETE.
      • Faces: Click on and type a name to identify a face. Click on several times, and then drag the identifier of the face different faces to identify many faces in a photo.
      • Location: Enter a location in the location field. When you type, Photos suggest places you can choose. To change a location, you can search a different location or change the location by dragging a PIN on the map. To remove location information, delete it or choose Image > location, then choose Remove location or back to the original location. You cannot assign a location if your computer is not connected to the Internet.

    LN

  • Cannot permanently change the location. Failed guard in Evansville, Indiana

    before the recent Mozilla Firefox update of my new glasses homepage displays local news. When I said a search for local businesses, I always sites of the region of southwestern Ohio. Now, I went by default to Evansville Indiana and nothing that I makes no difference. I manually change the location and it works until I have shut down the browser or whenever history is cleared. I like not having history clear automatically when I close Firefox. This has never been a problem before the update. I tried to restore the previous version, but it made no difference. Any suggestions?

    These details can be stored in a cookie.

    Allow all cookies expire when Firefox is closed.

    • Firefox/tools > Options > privacy > "Use the custom settings for history" > Cookies: keep until: "closing of Firefox".

    Create an exception to "allow" cookie for the cookies you want to keep.

    • Firefox/tools > Options > privacy > "Use the custom settings for history" > Cookies: Exceptions

    In case you use "clear history of Firefox closing:

    • do not delete Cookies
    • do not delete Site preferences

    Note that compensation "Preferences of Site" clears all exceptions for cookies, images, pop-up windows, installation of software, passwords, and other specific data from Web site.

    Deletion of cookies will delete all specified (selected) cookies, including cookies with an exception allowing you want to keep.

  • How to change the location of my dropbox...moz-storage-calendar://?

    I'm trying to Setup lightning with my box storage for a calendar shared between different devices.
    is it possible to change the location for this?

    Use a network schedule.

  • How can I change the location of the files? (buffers, history)

    I want to change the location of my history and my SSD to a flashdisk buffers. [Reason: to overcome the wear and back on my SSD.] How can I do this?
    Open question: what other locations of files (paths) I should change?

    You can disable the disk cache by using "Clear history of Firefox closing" to clear the Cache.

    You can check that on the topic: cache page (entry of the disk cache is missing).

    History and bookmarks are stored in the same file and cannot be separated.

    You'd have to move the complete record of the Firefox profile to this other player or use the private browsing mode.

    It's probably a good idea to regularly make backups of valuable profile in case of disk failure data.

    Flash drives also do not last forever and are also generally slower.

    See also:

  • I can't change the location of the iTunes library

    I used iTunes with my Mac Mini, and all the music and video have been stored in the main hard drive. As I added a 120 GB SSD inside the Mini and installed OS X (El Capitan) in it, I want to change the default location my iTunes library in the folder iTunes, in the old disk, because I want only the OS X and applications of this SSD because its space is short. But when I go into iTunes preferences I change the location of the media file, iTunes nothing happens. In the iTunes folder, I found the following:

    A folder called Album art

    A folder called automatically added to iTunes

    Files (all grayed out):

    iTunes Library Extras.itdb

    iTunes Libraty Genius.itdb

    The iTunes Music folder

    A class (grayed) called: iTunes Music Library.xml

    A folder called Mobile Applications

    A folder called Previous iTunes Libraries

    Any help? I tried several options but I could not.

    First of all make sure that you really understand what is a library. It is not the location of the media file.  That just tells iTunes where to store any media added from there.  For most people, a library is all the contents of the iTunes folder.

    Looks like your old drive still has various parameters of authorization in this regard.  On my other computer, I used several discs and in the window of Finder read information for each player, I've marked to ignore permissions on my data drives.

  • You cannot change the location of the Web site folder

    Greetings,

    When I change the location of the Web sites folder in the server application by changing ' Store Site Files In: ", the files in the default location of continue to load and not those of the location, I've specified. The location, I put is saved in the server application. I can leave the Server app and start again and see the location I specified, but it does not use this place.

    Thank you

    Read https://help.apple.com/serverapp/mac/5.1/#/apd1AB74EDF-C5B3-4C20-AD02-42120FF3B2 08 and try to stick to these principles as much as possible.

    The steps under does not include the method to change the location of the root folder, as Apple has as focus not exactly that.

    Add or change Web pages on your Web site

    To change what is available on the Web site, change the files in the folder to root for the document to your Web site. Folder document root is the folder that contains your website files.

    Use the server application to find the root of your Web site. Default document root is/Library/Server/Web/Data/Sites/Default /. In addition, when you create a site and let the application Server automatically creates a new folder for you, he places the site filesin/library/server/Web/Sites/data/domain_name/.

    1. Selection of sites in the sidebar the Server app.
    2. Select the Web site, and then click the button change .
    3. Click the arrow to the left of the menu pops - up Store Site files in. The Finder opens at the location the document root. Edit files in this folder to change what is available on the Web site.

    They wanted to provide a foolproof server where effective MDM can be performed. Therefore, they went very far to ensure that it should not be messed with. The integrity of services that ensures the effective management of Apple devices are paramount.

    Therefore, I think that you try unfairly to move the part of the services and server would not allow you to do so, as the Profile Manager and Wiki should still work after you have set up to host your Web sites (which Apple documentation referred to as virtual hosts).

    Thus, you need to configure the "Virtual Hosts" with their root of the document.

    HTH

    Leo

    Edit: If you had read: /Library/Server/Web/Config/apache2/ReadMe.txt

    and scroll down to sites you'd understand more.

  • How can I change the location of the cache of Firefox 20.0.1

    Greetings. Does anyone know how to change the location of the cache of firefox 20.0.1? I want to place it on a RamDrive, but can't seem to find any information on this and other versions of FF methods don't work or are not applicable.

    Hello darkbreeze, the following preference help? http://KB.mozillazine.org/browser.cache.disk.parent_directory

  • Hello, am unable to change the location in the app store

    6 +, am unable to change the location in the app store. Change to is not the location of payment information

    Today, there is a problem with the App Store. Please try again later.

  • Change the location of the video Cache

    I need to find a way to change the location of the video cache. I did the "browser.cache.parent_directory" and it redirected to my other drive. I get some use of it, a few megabytes of memory cache and files. But when I always go on youtube, I tend to get the "disk space on C: becomes low." Only to get stuff on my C: drive is out of the question. I need to find a way to change the cache flash/video directory. Anyway I could push on: config and fix this?

    Try changing the location of the setting %tmp% and % TEMP % environment variables temp folder in a folder on this drive (X:\TEMP)

    • Control Panel > system > advanced > environment variables
  • How to change the location where the scan of the computer updates the file?

    I would like to know how to change the location where the scan updates the file.

    HI ROT2,.

    It depends what printer and the software you use?

    Normally, you will find a 'save to file Option save' like the screenshot below.

  • Change the location of the bookmarks

    I would like to change the location of my favorites. In the past, I managed by typing in "subject: config ' and then enter a name, preferably new"browser.bookmarks.file"with a value of my new location of the bookmark file. With the 3.6.13 version, it does not work. How can I do this?

    You cannot change the location of the Favorites file, the bookmarks places.sqlite file must be in the profile folder.

  • How can I keep windows update to change the location of folders of rediredcted

    My work computer is in a domain.  I am running Windows XP Pro SP3.  Due to the large size of the 'My pictures' folder I redirected it to on of my local readers rather than let him lie on our server (Windows 2003 SBS).  I also redirected "My music" folder on a local drive and the 'My Favorites' folder on the server where the "My Documents" folder is also.  It works very well without any problem, most of the time.  In some way, some, but not all, windows updates will change the location of the "My pictures" folder on the server.  When this happens, I know that as soon as I login after the reboot because it will take about an hour before the computer can be used.  The reason for this is that the folder is moved (not copied) on the server with a connection to ethernet 100 base-T.  My another stay of redirected folders where they are supposed to be, just the 'My pictures' folder is moved.  I tried to find all the registry entries that have to do with the location of this folder and found only two, those who originally, I changed to redirect the folder in the first place.  This has happened for the 4th time, when I greeted Windows Update to install the latest updates last night (13/02/13).  It becomes very boring and time would trust because I have to put the folder on the local drive and reset the folder redirection and the whole process takes about an hour, plus time lost after reboot.  Help please.

    Hi Steve,.

    Thanks for posting your question in the Microsoft Community forums.

    I see from the description of the problem, you have a problem with the location of the folder my pictures change after installing Windows updates.

    The question you posted would be better suited in the Small Business Server Forums. I suggest you send the link.

    http://social.technet.Microsoft.com/forums/en-us/smallbusinessserver/threads

    Hope this information helps you. If you need additional help or information on Windows, I'll be happy to help you. We, at tender Microsoft to excellence.
  • Change the location of the taskbar

    original title: Windows XP task bar

    I still use Windows XP and to change the location of my taskbar to the top of the screen. How do I do that?
    Jim

    Right-click on the taskbar and unlock it. Take an empty place and drag it to the top. Relock it.

Maybe you are looking for

  • FN key not working after installing winxp on Satellite A200 1CJ

    Hello I got my winxp pr satellite. And I found all drivers xp, including shortcut keys for my mobile on www.toshiba.nl.But now no longer works FN - F6, F7, F8, F9 & F10. These are the functions to configure the brightness, wireless network, power & u

  • There

    I live in Wellington, NZ and am eager to try the XPS 13 Ultrabook before you consider buying. Anyone able to help?

  • My hotmail account is sending spam email.

    I changed the password and it is always the case. Someone is spoofing, do not access my account directly, because there is no way that they brute forced my second password, and even if they did, there is nothing to gain by it. I scanned my computer w

  • wmdcBase.exe running task maneger

    I see wmdcBase.exe running in the Task Manager, this is the process for windows mobile thing Center I found the process for this information, it says that it can be a dangerous process and should be removed immediately. http://www.file.NET/process/wm

  • HP Pavilion p7 1010: reset to factory default?

    Hello Initially provided this hp desktop computer with Windows 7 Home Edition built in.   Last year Windows changed the OS to Windows 10 on this PC for free.   It works fine without any problems.   If in the future, if this PC never had to recover to