button that makes random location of objects, when clcked new del the old stuff.help tips & reputs

Hello everyone I am doing a program when I click on the randomize button it puts random objects in a given area and if you click on the button again it must remove objects and put on a new random object model.

need help!

from the moment I have only an error message "or is unexpected", but I'm afraid that my night idea does not work help please!

to import flash.geom.Point;

import flash.events.MouseEvent;

var number: Number = 1

var scale: Number = new Number().

var treeList:Array = new Array();

var grass1List:Array = new Array();

var grass2List:Array = new Array();

var grass3List:Array = new Array();

var grass4List:Array = new Array();

var grass5List:Array = new Array();

rdm_btn.addEventListener (MouseEvent.MOUSE_UP, Random);

random function (e:MouseEvent): void

{

If (no < 3)

for (var p:Number = 0; p < 500; p ++)

{

var grass5:Grass5 = new Grass5();

var tempPointGrass5:Point = new focus();

tempPointGrass5.x = Math.floor (Math.random () * 1000);

tempPointGrass5.y = Math.floor (Math.random () * 1000);

If (checkBoundary (tempPointGrass5.x, tempPointGrass5.y))

{

grass5.x = tempPointGrass5.x;

grass5.y = tempPointGrass5.y;

grass5. ScaleX = grass5.scaleY = (tempPointGrass5.y/650);

grass5List.push (tempPointGrass5);

addChild (grass5);

}

on the other

{

p-- ;

}

}

for (var q: Number = 0; q < 500; q ++)

{

var grass4:Grass4 = new Grass4();

var tempPointGrass4:Point = new focus();

tempPointGrass4.x = Math.floor (Math.random () * 1000);

tempPointGrass4.y = Math.floor (Math.random () * 1000);

If (checkBoundary (tempPointGrass4.x, tempPointGrass4.y))

{

GRASS4.x = tempPointGrass4.x;

GRASS4.y = tempPointGrass4.y;

GRASS4. ScaleX = grass4.scaleY = (tempPointGrass4.y/650);

grass4List.push (tempPointGrass4);

addChild (grass4);

}

on the other

{

q-- ;

}

}

for (var v: Number = 0; v < 500; v ++)

{

var grass3:Grass3 = new Grass3();

var tempPointGrass3:Point = new focus();

tempPointGrass3.x = Math.floor (Math.random () * 1000);

tempPointGrass3.y = Math.floor (Math.random () * 1000);

If (checkBoundary (tempPointGrass3.x, tempPointGrass3.y))

{

grass3.x = tempPointGrass3.x;

grass3.y = tempPointGrass3.y;

grass3. ScaleX = grass3.scaleY = (tempPointGrass3.y/650);

grass1List.push (tempPointGrass3);

addChild (grass3);

}

on the other

{

v-- ;

}

}

for (var t:Number = 0; t < 500; t ++);

Ingore the code here

var grass2:Grass2 = new Grass2();

var tempPointGrass2:Point = new focus();

tempPointGrass2.x = Math.floor (Math.random () * 1000);

tempPointGrass2.y = Math.floor (Math.random () * 1000);

If (checkBoundary (tempPointGrass2.x, tempPointGrass2.y))

{

Grass2.x = tempPointGrass2.x;

Grass2.y = tempPointGrass2.y;

Grass2.scaleX = grass2.scaleY = (tempPointGrass2.y/650);

grass2List.push (tempPointGrass1);

addChild (grass2);

}

on the other

{

t-- ;

}

}

for (var j: Number = 0; j < 500; j ++)

{

var grass1:Grass1 = new Grass1();

var tempPointGrass1:Point = new focus();

tempPointGrass1.x = Math.floor (Math.random () * 1000);

tempPointGrass1.y = Math.floor (Math.random () * 1000);

If (checkBoundary (tempPointGrass1.x, tempPointGrass1.y))

{

GRASS1.x = tempPointGrass1.x;

GRASS1.y = tempPointGrass1.y;

GRASS1. ScaleX = grass1.scaleY = (tempPointGrass1.y/650);

grass1List.push (tempPointGrass1);

addChild (grass1);

}

on the other

{

j-- ;

}

}

for (var i: Number = 0; i < 20; i ++)

{

var: tree = new Tree();

var tempPointTree:Point = new focus();

tempPointTree.x = Math.floor (Math.random () * 1000);

tempPointTree.y = Math.floor (Math.random () * 1000);

If (checkBoundary (tempPointTree.x, tempPointTree.y))

{

Tree.x = tempPointTree.x;

Tree.y = tempPointTree.y;

tree.scaleX = tree.scaleY = (tempPointTree.y/650);

treeList.push (tempPointTree);

addChild (tree);

}

on the other

{

i-- ;

}

}

No ++

No ++

No ++

on the other

{

non-

non-

non-

treeList.length = 0

grass1List.length = 0

grass2List.length = 0

grass3List.length = 0

grass4List.length = 0

grass5List.length = 0

}

}

function checkBoundary(X:Number,_Y:Number):Boolean

{

If (X > 100 & & X 900 < & & Y > 220 & & Y < 500)

{

Returns true;

}

Returns false;

}

Describe your rectangle and call positionItemsF each time you want to make random/re-randomize the positions of the elements.

var r: Rectangle = new Rectangle (100,200,300,300);

var itemA:Array = [tree, grass1, grass2, grass3, grass4, grass5];

positionItemsF();

function positionItemsF (): void {}

for (var i: int = 0; i<>

If your items have upper left reg

itemA [i] .x is randomF (r.left, r.left + r.width - itemA [i] .width);.

itemA [i] there is randomF (r.top, r.top + r.height - itemA [i] .height);.

}

}

function randomF(n1:int,n2:int):int {}

If (n1<>

Return n1 + Math.floor ((n2-n1+1) * Math.random ());

} else {}

Return n2 + Math.floor ((n1-n2) * Math.random ());

}

}

Tags: Adobe Animate

Similar Questions

  • I changed the creative editing Cloud student and teacher for creative photography plan cloud 21 may 2015 that nothing seems to have changed.  My lightroom is the old version, trying to load LR - 6.  When I log on in Photoshop, I get error message tha

    I changed the creative editing Cloud student and teacher for creative photography plan cloud 21 may 2015 that nothing seems to have changed.  My Lightroom is the old version, trying to load LR - 6.  When I sign in Photoshop, I get an error message that my account is not found. (Because I cancelled it and joined CC?).   I keep going in circles.

    Now better contact Adobe technical support, they can access your computer remotely and fix the problem.

    Click on the button still need help and select the Chat option:

    https://helpx.Adobe.com/contact.html?step=CCSN_downloading-installing-setting-up_licensing-activation_stillNeedHelp

    or

    Contact the customer service

  • I would like an option that reads 'check at startup' on when windows 7 checks the automatic updates.

    I would like an option that reads 'check at startup' on when windows 7 checks the automatic updates. Some people still turn off their computers when you are not using it. And if they do not check to turn on, they will begin the navigation with an operating system up-to-date. This option exists? I have not found. Thank you

    If check you the Manager of tasks shortly after starting your computer (or restart), you will notice that automatic updates (WUAUCLT. (EXE) is "check-in" with the update servers!

    Update Windows FAQ
    http://Windows.Microsoft.com/en-us/Windows7/updates-frequently-asked-questions ~ Robear Dyer (PA Bear) ~ MS MVP (that is to say, mail, security, Windows & Update Services) since 2002 ~ WARNING: MS MVPs represent or work for Microsoft

  • It's been two months that I downloaded photoshop cs6 and it was fine, but now when I try to open the program, he said that I have to uninstall. When I go to the control panel and click on uninstall, so I can install it again, it just says: I need to clean

    It's been two months that I downloaded photoshop cs6 and it was fine, but now when I try to open the program, he said that I have to uninstall. When I go to the control panel and click on uninstall, so I can install it again, it just says: I need to clean my computer or restart, because it can not uninstall the program. I already did and it is still not uninstall. How should I proceed?

    run the cleaner, the use of the CC cleaning tool to resolve installation problems. CC, CS3 - CS6

    and then reinstall it.

    Available downloadable Setup files:

    Download and installation help links Adobe

    Help download and installation to Prodesigntools links can be found on the most linked pages.  They are essential; especially steps 1, 2 and 3.  If you click on a link that does not have these listed steps, open a second window by using the link to Lightroom 3 to see these "important Instructions".

  • Creating a button that highlights himself and another object

    Hi all

    I have a specific function, I am applying for my InDesign document for export to interactive PDF and SWF/html format.
    The function that I am creating is:
    I have a picture of a typical WYSIWYG toolbar. I created highlight buttons that sit on top of each icon in the image. When the reader hovers over this image of an icon (with the cursor) I want it highlight and also a piece of text lower on the page to highlight as well (which is a definition and an explanation of the icon). So I want the reversal of my first button action to also trigger another action, which is to highlight a piece of text somewhere else on the page. I managed to get so I put the cursor on the first button (icon image), it highlights, and the text below the page. But this isn't quite what I want. I want the text already exists, then highlight. Basically I want the two buttons to be connected. So that whenever I have fly over a part of the image of a created button, it will highlight, and a piece of exploratory text highlight simultaneously elsewhere on the page. A bit like an infographic. It is surely possible?

    Thanks in advance for your help.

    Generally, the animations as this is to export a SWF file are better be done in Adobe Flash.

    In Indesign that kind of market, too. Only for export as SWF, you can assign to the action "go to the State." For a text block, you can assign different status, where the 1st State would be 'normal' and the 2nd status would be "highlighted". Highlighted applies to the object "text frame", so that you can assign a contour or background. Better than nothing.

    Example: Dropbox - test_highlight.indd

  • I get a message saying that Firefox must be updated, but when I click on the update box, nothing happens... Why?

    Every time I open Firefox, I get a message that an update is available, but when I click on update, nothing happens.

    I have a Mini Mac OS X, version 10.6.8

    I have a 1.83 GHz Intel Core 2 Duo

    It is 2.5 GB 667 MHz DDR2 SDRAM memory.

    I don't know what all this means, but I thought you should know that. Thank you.

    If he has problems with the update or with the permissions then best is to download the full version and trash the version currently installed to do a fresh install of the new version.

    Download a new copy of the Firefox application and save the file on the desktop disk image (dmg)

    Your personal data are stored in the Firefox profile folder, so you will not lose your bookmarks and other data to personal when you uninstall and (re) install Firefox.

  • Mahjong Titans error 'window that says (subject) and that Windows would let me know when they have solved the problem."

    Original title: executable for Mahjong Titans has stop working

    So, I found how to Activate games under Windows 7 (64-bit).

    However, when I clicked on Mahjong Titans and responsible for turtle, he placed the tiles, but to the high jump this window which says (subject) and Windows let me know when they have solved the problem.

    What is with that?

    Hello

    I did the same thing on my computer, after loading turtle; I didn't get the message.

     

    Method 1: I suggest you turn the game Turn Windows Feature On or Off and see if that helps.

    Step 1:

    See the following steps:

    a. go to start and in the search type 'Turn Windows has or not'.
    b. click on "Turn Windows features on or off".
    c. find the game then uncheck the brand in front of Mahjong Titans.
    d. restart the computer.

    Step 2.

    b. read the following steps:

     


    Go to start and in the search type 'Turn Windows has or not'.
    b. click on "Turn Windows features on or off".
    c. find the game and check the brand in front of Mahjong Titans.
    d. restart the computer.

    Method 2: SFC scanner.

    SFC scanner. System File Checker (SFC) scan will replace the missing or corrupted system files on your computer.

    Reference:

    Use the System File Checker tool to troubleshoot missing or corrupted on Windows Vista or Windows 7 system files:

    http://support.Microsoft.com/kb/929833

  • I updated my Apple ID, but only old man keeps coming up when I try and make updates, and my password does not work with the old id.  Can anyone help?

    I updated my Apple ID, but only old man always appears when I try to update my password does not work with the old id.  Can anyone help?

    You can try to log in to your old account and then sign in with the ID again.  Your applications will be always related to the original account - you must use the old account to update.

  • Motherboard crashed on the old computer. Moved old hard drive to new computer to access all the files. I can't locate my extensive library of bookmark on the old drive. Is there a way?

    The old functions drive crashed motherboard perfectly in this most recent computer as drive "F". However I can't find a way to access the library from the bookmarks that I had before moving here, this player to the newest computer then reinstall fresh Firefox.

    Is there maybe any file system or another that has perhaps kept my bookmarks of Firefox library?

    That should not happen, Firefox would have no reason to look for an old profile everywhere except the reader where the active Windows version is installed. Make sure you Show hidden files and folders in folder-> Display Options in Control Panel.

  • WINDOWS MEDIA 9 ON WINDOWS VISTA, NO NOISE, SNDVOL ENCODER. EXE COULD NOT BE STARTED WHEN I CLICK ON THE MIXER. Help!

    right... I just got a new computer, the vista Home premium 64-bit, and I use windows media encoder 9 series to stream live radio broadcasts... everything installs ok, but when I click mixer to sort my sound levels it gives me this error:

    "the mixer"sndvol32.exe"application could not be started. the system cannot find the specified file (0 x 80070002).

    I searched in google and microsoft, Web sites, I found a fix for vista, but when I try to install that he says theres a problem with this windows installer...

    I tried to run in compatibility mode for xp sp2

    Any help would be appreciated

    Hi DJ_KingSize,

    This problem occurs because some legacy applications use files or components that were developed prior to Windows Vista. The names of these audio components may be different in Windows Vista. If the calling application uses the hard-coded file names, the new files and components could not be found.

    To resolve this problem, use one of the following methods to change the audio settings for a device.

    Method 1: Use the order Volume of Windows

    To use the Volume of Windows command to change the audio settings for a device, follow these steps:

    1. right click on the speaker in the notification area icon and then click recording devices or reading.

    2. double-click on the device for which you want to adjust the settings. For example, double-click on Microphone.

    3. click on the levels tab.

    4. move the cursor upwards or downwards to set the desired volume level, and then click OK

    Method 2: Use the control panel

    For control panel allows you to change the audio settings for a device, follow these steps:

    1. Click Start, click Control Panel, click hardware and sound and then click sound.

    2. click on the playback or recording.

    3. double-click on the device for which you want to adjust the settings. For example, double-click on Microphone.

    4. click on the levels tab.

    5. move the cursor upwards or downwards to set the desired volume level, and then click OK.

    For more information, see the link below:

    You may receive an error message when you run an application that uses the recording feature or audio playback in Windows Vista

    http://support.Microsoft.com/kb/930095

    Thank you, and in what concerns:

    Ajay K

    Microsoft Answers Support Engineer

    Visit our Microsoft answers feedback Forum and let us know what you think.

  • Maintain the PDF overlay when you open in the old version of Illustrator?

    As the title explains, I was wondering if it would be possible to avoid the loss of data when you open a PDF file in an older version of Illustrator. I have a client who still use CS5 and needs to have editable PDF files that maintain their hierarchy.

    Currently standing, I get the error 'this file has been generated by a newer version of Illustrator', which flattens the work in a single layer. Is there a workaround for this, or am I out of luck?

    Thank you in advanced for your help.

    You cannot save a PDF file that is fully editable in an earlier version of Illustrator. But you could save an AI that is somewhat modifiable in an earlier version if you follow the advice of SRiegel.

  • Adding buttons that make my dynamic stamp

    Is there a way to implement a button on a pdf file that resets the Date and time on my custom dynamic stamp? Can it be stamped with the stamp / added after

    No, it can't be done. The only thing you can do is to remove the stamp and

    apply a new instead of him in his place.

  • I often HIT SOMETHING that makes my very small font when you compose a message on hotmail and stuggle to return to the normal size of READING... any help?

    It always happens on my laptop... my font is so small on hotmail for now I can't read

    {Ctrl + 0} <-this is a zero

    See this:
    https://support.Mozilla.com/en-us/KB/page+zoom

  • I have Lightroom 5.7.  My program keeps telling me that I have an update, but when I click on the download button he directs me just to the new Lightroom CC page.  Where is the so-called update and how do I download it please?

    @@

    the latest version of lr 5 (free) is 5.7.1: http://www.adobe.com/downloads/updates/

    LR cc 2015 is a free update for subscribers of cc, but must be purchased by perpetual license holders who want the 5 to lr lr cc 2015 upgrade, products

  • Back to Firefox button doesn't work does not correctly when you navigate to the new Site

    When I open a page to a new site that I can navigate forward and backward on this site very much, but whenever I try to leave this site via the back button it shows as if there are no pages beyond this site, like the opening of fresh on this site page. This is driving me crazy so if someone could help this type of person not techno I would be eternally grateful.

    Yes, how the code page tab, you cannot return to the new tab Firefox's built-in page or a page that you want to substitute for it.

    Since this is your home page, you can use the usual methods to return to your home page:

    • Click on the home button in the toolbar
    • Press Alt + home keyboard

    Or you could try a different extension for the new tab page see if that solves it. For example:

    https://addons.Mozilla.org/firefox/addon/custom-new-tab/

    After installing, you must use the Options page to set the new desired tab page (instead of use subject: config).

    Open the page modules using either:

    • CTRL + SHIFT + a (Mac: Cmd + shift + a)
    • "3-bar" menu button (or tools) > Add-ons

    In the left column, click Extensions. Then on the right side, find Custom new tab and click on the Options button.

    It is easy to enter your favourite homepage address. If you check either of the boxes, the expansion will set the focus in the page as well, for example, the cursor will be in the Google search box. (See attached screenshot).

    I had to leave Firefox and start it up again before new custom tab started working, but this may have been due to tests so many extensions back to back.

    Any improvement?

Maybe you are looking for