Is there a way to create a math.random that don't overlap movieclips?

Hello

In fact, I have two questions. I create a sequence memory game and I was wondering:

1. is there a way to movieclips random position on the stage without overlap?

2. is there a way to have flash draw a vector from one clip to another in the order, and then create a user trace what flash has done? I have 6 clips on the stage, each with their own instance (e.g. obj1_mc, obj2_mc, etc.). Is there a way to tell flash always draw a line between movieclips in sequence, even if the clips are placed randomly on the stage?

Thank you

JO

you don't know.

1. the best way to position objects without too much running, IF you can assume it will always be possible, is to use something like:

var mcA:Array = [your movieclips]

var: index: uint = 0;

positionF();

function positionF() {}

assuming that the points of top-left reg of your movieclips

mcA [index] .x = Math.random () *(stage.stageWidth-mcA[index].width);

mcA [index] = Math.random () *(stage.stageHeight-mcA[index].height) there;

var hitBool:Boolean = false;

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

{if (mcA [index] .hitTestObject (mcA [i]))}

hitBool = true;

break;

}

}

{if (hitBool)}

positionF();

} else {}

index ++;

If (index<>

positionF();

} else {}

localization complete.  No matter what

}

}

}

2. you can use the graphics class to draw dynamic lines.

Tags: Adobe Animate

Similar Questions

  • Is there a way to create a UNIVERSAL basket?

    Hey the tech guys, I recently installed several systems of OS on my laptop, I deleted some files in different systems, here's the problem,
    each system can display all files that are not removed, but the trash of each system can contain only deleted files in this specific system, while the rest are excluded

    question:
    Is there a way to create a UNIVERSAL basket? while I can easily restore everything the file I want to without restart and go into another system, if it has been deleted in it.

    I need efficiency, it's a big headache for the users of the multi-system I guess.

    The real Bin $Recycle is an integral part of Windows.  If you delete the trash it will recreate itself.  They are protected from the operating system of records. You can hide, but that's all.  Each boot drive you have will have their own $Recycle Bin for this partition.  It will be integrated into the Windows operating system installed.

    Not all versions of Windows are equal, or their trash. So to my knowledge, only you can create a universal basket in a dual-boot configuration.  Like I said try earlier post on TechNet Forum.  They are the professionals and if there is a way, they will show you.

  • Is there a way to create multiple BQY output to one of the Job file?

    Hello

    I use the EPM11.1.2.3.501 version.

    BQY report because of the large amount of data, it is difficult to use WebClient.

    Then share on a quarterly basis.

    However,.

    If change is to occur, there are difficulties must edit each file.

    For example,.

    Save the task BQY for 4th quarter 2014, 2014 3 q, 2nd quarter of 2014, 2014-1 q.

    When you run the task, the output of the work file is created.

    If the work file is changed, you must change all four files.

    This will not be growing creations.

    Is there a way to create multiple BQY output to one of the Job file?

    Please help me.

    Thank you

    It is not possible to have several BQY out in a work file.

    Thank you

    KK

  • I created my site with Muse and uploaded to an external ftp hosting, now my secure log in will not work because I use no BC. Is there a way to create a secure log which will arrange with forced to use BC?

    I created my site with Muse and uploaded to an external ftp hosting, now my secure log in will not work because I use no BC. Is there a way to create a secure log which will arrange with forced to use BC?

    Hello

    Secure area login feature will not work unless you host your website with BusinessCatalyst.

    Please take a look at this as an alternative

    Password protect Pages Widget for Adobe Muse

    Also, check this thread,

    Re: Can I create a login/password in the Muse for a HTML5 page or two?

  • In lightroom, is there a way to create a "Preset" where a brush is running automatically?

    In lightroom, is there a way to create a "Preset" where a brush is running automatically? Example: If I do several different brush adjustments on an image, and I want to change it even accurate on another image, create a preset for that?

    No, brush adjustments are not saved in develop presets.  Here are 3 options

    1 if you want that ALL the brush settings, you can simply copy and paste the parameters of the brush.

    2 If you want just a subset of the brush strokes, you can create a virtual copy of the brush image, remove the brushes you want and which allows copy and paste to other images.

    3. If you want to make the same adjustment brush on several images, you can use autosync and brush the picture more and it will apply to all the other selected images.

  • Is there a way to create a pan and zoom effect in a slideshow in lightroom?

    Is there a way to create a pan and zoom effect in a slideshow in lightroom?

    Yes, 6 Lightroom now supports this.  Simply check the box "Pan and Zoom" on the playback of the slideshow module Panel.  You can also set the amount of pan and zoom from low to high with a slider.

  • The applications listed under Launchpad, is there a way I can delete the ones I don't use on my MAC Air?

    The applications listed under Launchpad, is there a way I can delete the ones I don't use on my MAC Air? I hope that I can free up space.

    Start the LaunchPad and hold the option key. The icons will start to shake and an X will appear in the upper corner of some but not all. Click the X to remove the application. Programs that have an X are only purchased/downloaded from the App Store. Integrated programs in Mac OS (like Safari) or programs you have downloaded/purchased elsewhere will not be a X. You should not delete (or move) programs such as Safari and Mail (built-in programs) because the update from Apple guess they were be on your computer in their installation location. Weird things happen if they are moved or deleted.

    Programs you don't purchase/download from the App Store can be deleted without the help of the dashboard, but you must be careful about this. Third party programs can be installed in different ways: some come in disk images and are trained in your application forms. These can be moved without danger in the trash. Some are installed using an installation program, and these require a little care to remove. In some cases, they set up items in addition to the program and require a special uninstall program, but this is not true in all cases. I always do the note of programs using a Setup program, so I can make sure I have properly uninstall.

  • Is there a way to detect all the keys that the user clicked in AS3?

    Hi all

    Quick question - is there a way to detect all the keys that the user clicked using the AS3 code? I have pimples on my project and I want to that they be disabled once the user has clicked on it, but I wonder if there is a function that I can write that will automatically disable all keys that the user clicked once?

    Thank you!

    Here is an example where the buttons share the same handler... try it and see if it works (I can't due to not having Flash on hand).  The only problem that I could expect it not to love the evt.currentTarget is not identifiable as a particular class type, but sometimes it can't.  If this is the case there is an easy solution.

    Btn1.addEventListener (MouseEvent.CLICK, processBtnClick);

    btn2.addEventListener (MouseEvent.CLICK, processBtnClick);

    function processBtnClick(evt:MouseEvent):void {}

    evt.currentTarget.removeEventListener (MouseEvent.CLICK, processBtnClick)

    }

    If you also want to keep track of which buttons were clicked already you can store in an array...

    var clickedButtons:Array = new Array();

    Btn1.addEventListener (MouseEvent.CLICK, processBtnClick);

    btn2.addEventListener (MouseEvent.CLICK, processBtnClick);

    function processBtnClick(evt:MouseEvent):void {}

    evt.currentTarget.removeEventListener (MouseEvent.CLICK, processBtnClick)

    clickedButtons.push (evt.currentTarget)

    }

  • I have created a form in Indesign. Is there a way to create the default text in a text field that displays the interactive pdf "insert text here" in the text field?

    I have created a form for the company, so that I work. It is a form that will be used in several offices and has buttons, drop downs and text fields. One of the text fields has a requirement that when the PDF file is opened, the text field has something written in there already, as an example (and one only) INSERT the TEXT HERE. I created the text field in Indesign and used the text tool to type in the area of the body-copy required. After that I have to export it as an interactive PDF, text in the text field disappeared.

    Drop-down lists give an option for a default choice, but I don't see a way to create default text in the Panel of buttons and forms for text fields. Is there a workaround or a hidden feature?

    Thank you!

    Set it in Acrobat.

  • is there a way to create a single video file of two separate video and have their output to two separate projectors?

    I started using the first less than two months ago and my tech video background is rather limited . I'm doing an art project where I am projecting two different projections on a large wall that are designed to be in harmony and interact with each other.   I intend to use two laptops, one for each projector.  This is a possible problem.  The docents Gallery in this gallery of the University will have to turn everything on every morning, having to click on both computers at the same time to synchronize the images play together perfectly.  That simple I'd like to think, I know year 19 former students who are the docents sometimes fail to grasp what is obvious.  Is there a way to take two project files and create a single file that could play for two projectors from a laptop outside?  As a split screen monitors?  That way they click on a button. I don't know if it's possible, it can't be.  I just thought to deal with this problem as possible before that happens.   

    Has ny advice would be greatly appreciated.

    You can create a sequence on the front which is double width. For example, 1280 x 720 (720 p) becomes 2560 x 720, which is TWO 720 p side by side videos in a clip. For reading, you may be able to implement the graphics card settings to do it for you, or - get a Matrox DualHead2Go box. You must set the graphics card in your computer to the display size double width, such as 2560 x 720, and the single output of the computer goes in the DH2G unit, which separates the entry into two outputs independent of 1280 x 720.

    There are many models available, depending on whether you are working analog or digital graphics card. There is a ton of information available, including tools for configuration and testers to run on your system. It is important to seek and choose carefully, to make sure that the connections are compatible and that map display of your computer (and Matrox unit) will support both the specific resolution you are looking for.

    Matrox DualHead2Go Digital SE | Multiple monitors for laptop computers

    Thank you

    Jeff Pulera

    Safe Harbor computers

    www.sharbor.com

  • Is there a way to create a table that creates new "lines" when enter is pressed?

    Hi all

    I am trying to create a pdf file for my company to regularly use the packing list. Generally, this packing list is generated by our software, but our software was not designed primarily for delivery and purchase and lack of functionality. With complex or revised orders, we must create our own documents and I wanted to create something that could be used as a standard that reflects what the software has generated.

    Thus, the document itself. Packing lists (or invoices or purchase orders, according to what is required at this time) have a number of elements arranged in a table with properties. These properties is the name of the item, description, how many rooms, the price, the size of the container, etc. Simple packing lists have three or four points that all fit on one page but larger orders have elements which extend into several pages, ending with a 'total' for all areas.

    My question is, is - it possible ot create a table in Adobe Acrobat, DC format that allows me to create a dynamic array that can be extended (with additional lines) when necessary on another page or several pages? Table if it makes a difference, each page would have a header and a footer (information for the transport and logistics) for this 'dynamic' table would be sandwiched between these two areas.

    Thank you

    EDIT: I've been looking around and, I hope that Adobe Acrobat DC has this feature, but it seems the best way to acchieve that is via Adobe Live Cycle Designer, which fortunately, my supervisor has a copy. This youtube video explains, in an overview, exactly what I want to do and how to do it through this program. Perhaps that will help someone in the future who also Live Cycle:

    Creating robust dynamic forms in Adobe LiveCycle® - YouTube

    As you have found, it's more a characteristic of the LCD and not Acrobat. It is possible to add new fields in Acrobat, but there is no "dynamic table". It must be done manually.

    Another option is to create a template page with additional fields and then reproduce a copy of it when necessary.

  • Is there a way to create a plan of action in vCAC and allow a user to select a network?

    Hello

    We have 30 different VLAN used for various tasks within our Organization. I was wondering if there is a way to create a unique model vCAC and alow the user to choose which virtual machine network join to (at the time)?

    It's not like I can use a vCenter customization specification and just set up 'network-> Custom Settings-> interrogate the user'

    Or I have to create 30 Blue each connected to a different network?

    vCAC Build 6.0 - 1720522

    Thank you

    Tom

    This will show you how do

    [virtualjad.com]: vCAC dictionary of properties: customize applications for Service with dynamic Menus

    You use custom properties to achieve this. You won't need 30 blue, build a logic and apply it on a plan of action.

  • Is there a way to create a button to logon with a password to a site section?

    I have a client who needs a login section and a way to create a customer account. Is there a widget or the workaround that allows me to create a button to login and create an account where they specify a username and password? Muse is great for simple sites, but without access to the code, I can't operate the way I used to. When I need to customize the work like that, I'd hire a programmer to create the code, then simply paste it into the code of the site. I can't do this with Muse, and it is a huge obstacle. Does anyone have any ideas or solutions? Please call me directly if you have a solution: 727-466-6888 (Florida).

    You can do quite easily with Business Catalyst accommodation webMarketing plan. With a bit of knowledge Business Catalyst it can be reached quite easily.

    You need create your login forms and your secure outside your site pages and then add the login form and the security of the content on the site with iFrames. A more tedious way and is not ideal to do.

  • Is there a way to create a sitemap xml in Dreamweaver 2014?

    I was wondering if there is a way to create a sitemap xml Dreamweaver 2014 inside.

    No automagic for her button.  You could do this manually in code view, but there are generators online and desktop applications that are better suited to the task.

    Create your Google Sitemap Online - XML Sitemaps Generator

    Xenu Link Sleuth can produce maps of site too.

    Find broken links on your site with Link Sleuth (TM) of Xenu

    Nancy O.

  • Is there a way to create a site of members paying using Muse?

    A customer is willing to a Web site that has an area that is available for paid subscriptions. I already read about how to create secure areas, I was wondering if there was a way to create a part of the paid subscription to the form. I've seen several clues as to what is a possibility. Was wondering if anyone has experience in this particular area? Or even a sense of research.

    Thanks for the info.

    It would be as follows:

    -Create a page in British Colombia, who you want to be the launch page of the safe zone, where users are connecting and then they will be directed to this page.

    -Go to the Site Manager > Secure area > create secure area, check selling member access, set, currency, amount and frequency. Monetary would be the currency of country members, frequency and the amount you want to users to pay would be that time which membership expire.

    -Go to the Site Manager > Web forms > create web form > edit properties, select the area safe in the secure area list > add a user name and password field > specify the payment method

    -Open the page where you want to insert the secure area login form and web form allowing users to enroll in the secure area and make the payment.

    Now with Muse, you can insert the html part of the content that you have created in Colombia-British

    -Open the page in Muse where you want to insert the sign in form, copy the html code of the form that you created in British Colombia and then insert into the Muse Page.

    -In the same way do sign in form.

    Please note that the published site of Muse are hosting sites web which does not include the secure area, so you would need to upgrade the site plan which is a subscription to a different site.

    Although you can first try with a trial site (get in touch with support where they can modify the sitemap of your trial site) as well as how it works, and then after that you finalize your site you can switch to the paid site.

    This document includes instructions how to safe installation zone:

    http://helpx.Adobe.com/business-catalyst/partner/add-secure-area-your-site.html#id_31582

    I uploaded a short video for your reference showing the steps, please download here:

    https://www.dropbox.com/s/5vpg1qu3jpnx1bz/Tut_Eproduct.mov

    Thank you

    Sanjit

Maybe you are looking for

  • ITunes store WAY TOO BIG for my screen after the last update!

    WTH? I got the last update, then when I went to the iTunes store everything was HUGE!  It does not fit on my screen.  Nothing that we do on our side it will change.  East - other famous "glitch" that comes along w / the updates now?  Does anyone else

  • Emergency calls only

    Two weeks ago my G4 motorcycle more suddenly lost network and began to show the only signal of emergency calls. -Tried to charge the phone several times to solve the problem, but has not solved. -Check the network signal strength and the signal was.

  • Relocation of Snow Leopard on an iMac Mid-2011

    I recently bought a used iMac for my daughter (27 mid-2011 "Core i7, 3.4 GHz) who's been upgraded to El Capitan. I want to set up as a dual-boot machine, with a small Snow Leopard partition so that it can run some old but still useful PowerPC under R

  • Photosmart 7520: back to back printing (duplex printing)

    I used to be able to print back to back and somehow, I changed it, but I can't for the life of me find where to change my printing to double sided printing preferences.  I have manual in PDF format to print and do not want to waste paper - it's a mat

  • Soundcard not detected

    Hello world My pc is a few years older than a year and works very well in all respects with Visa 32 bit. the sound card is a Sound Blaster X - fi 5.1 speakers, 2 GB memory and four hearts. I shrunk the drive to create a partition, etc. and installed