limit the area of circulation MC

I have a MC tank, then a background of tiles. Some of the areas on the scene (or tiles) I don't want the tank to be able to walk on. My first idea failed, that is:
-put several MCs called Block1-7 on the stage where I really didn't float walk and then in my script of movement test any collision with one of the blocks and stop the movement. However this failed because it went so slow that flash couldn't handle.
-My second attempt was to combine all the 'block' STM in a big clip the shape of the region, I wanted to unwalkable. It did not work because hitTest apparently through the bounding box and no where is the actual content of the clip. So the tank could never work because he was STILL inside the bounding box.

So, how would limit the area that he could walk? Any ideas would be very appreciated. My code (which runs an enterframe by a white MC off the screen) is attached below.

NOTE: the bottom, well made of tiles, is not created by actionscript
NOTE ALSO: This isn't a game of tiles based with and map array, my character is more important than each tile so what im that is not an option
What do you think?

It's exactly what you're doing. you might knock block1, set your speed to zero and then continue to check the other blocks, repeatedly reset your speed. only the last block will have the desired effect.

to remedy, if you hitTest() is set to true, use the break; to leave your loop hitTest() for.

Tags: Adobe Animate

Similar Questions

  • How to limit the area of custom mouse cursor

    Dear friends,

    I have a swf loaded in another context, I want to display a custom cursor (hand photo). IAM using the following code. his work very well in the loaded swf file. When I move the mouse to the bottom of the screen which is the navigation area in the actual frame the cursor should return to Flash the arrow cursor.

    var hide_m:Boolean = true;

    stage.addEventListener (MouseEvent.MOUSE_MOVE, handmove);

    function handmove(event:MouseEvent) {}

    trace (MouseY);

    If (hide_m & & mouseY < 138) {}

    Mouse.Hide ();

    hand.gotoAndStop (1);

    Hand.x = mouseX;

    Hand.y = mouseY;

    } else {}

    showmouse();

    }

    }

    function showmouse() {}

    Hide hand pic and show mice...

    hand.gotoAndStop (2);

    }

    It does not work, it shows the pic of the hand in the stadium. but when I move the background area that is more than 138, the normal cursor will not please help me.  to reduce the area to display the custom cursor...

    Thanks in advance,

    Syed Abdul Rahim

    unless there is a Mouse.show () in the frame 2 of the hand, who won't have to work.  to remedy, run Mouse.show () in showmouse() and removing a hand from the display list (removeChild).

    use addChild() and Mouse.hide in the first conditional branch of handmove

  • How to limit the area of message are displayed only once times

    Hello

    I use the following script that makes a message box appears. The problem is that people are complaining that the message box displays several times and you have to continusly, click ok as 11 times for the message 'window javascript warning' go away.

    Can I use another script or reduce the number of times that the message?

    If {(this.rawValue > 132)

    xfa.host.messageBox ("leave Maximum is 132");

    this.rawValue = 132;

    Thank you!

    I don't know how to do this, but if this field is any dependent field using which it is calculeted, then the bound field could be used to set the value and then show the pop-up message.

  • Limit the area of text to Alpha-only A - Z using Acrobat 9 Standard

    I'm trying to set a text box for my form to accept only alpha A - Z only.  Can someone tell me how to do this.  I'm working with Acrobat 9 Standard using a PDF file.  Thank you!

    Hmm... Copy the script that you have in the action of Page Open on the first page and paste here. In addition, save the file, close it and test again.

  • limit the advanced search fields

    Hello
    as far as I know, you should be able to limit the areas exposed to the user in the advanced search with the R18.
    I am not able to find the place to set this up. Any tips?

    Thanks in advance
    Michael

    Michael, tere is a new privilege called "all areas of research and lists of" who controls if a user sees all available fields or only the links in the Registration Details page.

  • Limit the number of calls between areas of VCS/subareas?

    Hello

    I wonder if there is a way that we can limit the number of calls between two subareas, areas or VCS.

    The script as below:

    VCS-E (owncompany) < -----neighbor/traversal/dns="" zone="" over="" internet------=""> > VCS-E (partner)

    My intention is to limit to 5 video calls from VCS-E (partner) so that the 6th call (dial in endpoint) will be blocked.

    I know that we can control the total bandwidth between areas using links & pipes but that does not stop the remote end to lower their rate of recall and deal with several endpoints.

    Thank you.

    Hi Hafiz,

    have you tried to disable the 'downspeed by mode of appeal"in a configuration of Bandwidth?

    try disabling the "downspeed" by call OFF mode under VCS config-. > bandwidth--> configuration.

    This will not allow the calls get the downspeed but it must block because of insufficient bandwidth.

    Thank you

    Alok

  • limit the number of vms that are turned on by the user via vcenter

    Is it possible to limit the total number of vms turned on by user? If joe can create as many virtual machines as he wants, but he cannot have than 5 virtual machines powered at the same time.

    I thought about it, but I'm not a big fan of resource pools.

    It is interesting because ALL things made of ESX, pools are my absolute favorite, you can do a lot with swimming pools.  Even monitor the pools by a group of permissions, restrictions, segregation, performance, ease of management... This list is long...

    Pools are the BEST thing about ESX overall in my opinion, I think that you are missing a very crucial feature.

  • How can I limit the number of connections to my PC for an incoming connection at a time. Multiple users are connected to my computer via the network.

    original title: limit incoming connections

    I want to restrict the number of connections to my pc for an incoming connection at a time.  I have several users that connect to my computer, using the same user name & password.  If someone tries to open a session, they fall out of someone who is already connected, without notice. the only solution I can think of is to limit the number of incoming connections to one.

    Hi willard.

    Your question is more complex that most seem to be on the answers. I suggest that you re-post on our TechNetforums where computer professionals can help you.

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

    I hope this helps.

  • How to limit the work area RAM Preview?

    Sorry for the typos, I'm German!

    My RAM Preview is not limited to the area of my work, and I couldn't find a way to change this behavior. Is there a preference to check or any other solution?

    I use (I know not what information is needed, so I'll list what I have in mind):

    Windows 7 64 bit,

    After Effects CS5 10.0.1.19.

    Intel Core 2 Duo 2.4 GHz,

    GeForce 9300M GS

    It would be great a response, so thank you in advance!

    The time in the Preview Panel option replaces the work area. Is - this option checked?

  • How can I limit the number of attempts to print a web page

    I am trying to find a solution to a problem on our network.
    We run several kiosk machines that allow customers to print documents and web pages. However, we find that we are wasting a lot of ink because of the user frequently sending the same print job on the printer.
    Yesterday we had someone print more than 70 pages, because they just keep clicking on print.
    I tried looking for an add-on that would solve this but was not able to find one.
    My question is this, is there an internal setting that can be changed in firefox to limit the number of prints is trying to say once every 30 seconds, or even a way to make a dialog box turns on screen saying that the print request is currently dealing and does nor print before completing the task at hand.

    Sorry, there no setting in Firefox to avoid that from happening. Once the user sees the "native print dialog" box (which is seen when you Ctrl + P for print), the operating system and the printer drivers are here.

    I saw something similar to that on kiosk / PC rental stores Office of FedEx, which inform the user of the cost per page, the user wants to send to a printer, and when the user click again to the same pages again, he asked if you want to spend another $x.xx to print a second copy. Would not too different to simply cut the printing of multiple copies of the same document and warn the user of this action.

    My advice is to discuss it with anyone who put in place these kiosks to be with.

  • How can I limit the number of Web sites on the new tab page?

    Is there a setting where I can limit the number of thumbnails / Web sites that appear on the new tab page? When I opened a new tab - I don't want to see tons of sites I have visited - but also, I don't want to delete them all. For example - there is a setting where the new tab page displays the last ten sites I've visited - with all my pinned sites?

    There are two settings 'hidden' for this 'grid '.

    Browser.newtabpage.Columns

    and

    Browser.newtabpage.Rows

    Type of topic: config in the URL bar and press ENTER.

    So put . browser.newtabpage in the top search bar.

    Each of these preferences in the lower panel right-click and select Edit. Then change the value default of 3 for each of these preferences to what you prefer, for "pinned" both sites all browsing history you want to appear in the 'grid '.

  • How can I limit the number libraries which is to find Photos

    How can I limit the number libraries which is to find pictures?

    I have about 10 libraries I've migrated opening today.

    I followed the advice I got from leonie, (level 10) below.

    Photos will create a new library of Photos in your iPhoto library.  The new library will be named as the iPhoto, with the extension ".photoslibrary" library and your original library will have a new file name extension ".migratedphotolibrary".  Rename the resulting ".photolibrary", so you will always be able to open in Aperture. The icons of libraries will change also. New photo library will display an icon of 'fan photos' with the flower of the Rainbow.


    So, I have now two files in my folder "Images".   One is called "Photo library" (these are ALL of .photoslibrary) the other is 'BACKUP ONLY iPhoto libraries' (these are ALL of .photolibrary).

    When I hold down the option key and start the Photos is to find all the libraries of two files above. How can I say Photos don't not to look in the old folder "iPhoto library"?

    This isn't a feature of Photos

    You can request that Apple itself - http://www.apple.com/feedback/photos.html - but not, it is not an option

    LN

  • How to limit the length of the texts on iOS9?

    Hello

    I just worked on why I am required by my mobile / cell phone provider EA.  They charge any text as a picture message / SMS, it is longer than 120 characters?  Does anyone know how to limit the length of the texts / SMS so that it is impossible to send a more 120 characters or create an alert so that you are aware of the number of characters in the text / sms?

    Thank you very much

    Hello Turnus123,

    Thank you for using communities of Apple Support.

    I see that you will have to pay for SMS more than 120 characters.  To help identify messages exceeds this amount, you can activate a number of characters in the message settings.  Simply go to settings > Messages and activate "number of characters".

    Message settings

    Take care.

  • How to limit the bandwidth for each different devices connected to my router

    Hello

    Thanks in advance!

    Can you help me to limit bandwidth on perticular devices, I use NETGEAR (WNR1000v2 - N150 wireless router) and the version of the firmware of the V1.1.2.58, like almost 4 devices are connected to this router, I want to limit the speed of bandwidth to each device.

    I have not found the Qos in my Netgear.

    It might help if you provided in details with screenshots.

    Thank you

    Samira

    Not possible with this model of router

  • Limit the use of bandwidth per device?

    My father-in-law uses a program that didn't live follow tickers in different stock markets in the world. It takes up bandwidth on our network and does not care if he does or not. It's a real pain, because he will not change his program or get his own connection.

    Is there a method to limit the speed/bandwidth of each system?

    Why not put a QoS rule in place, for this particular device (using IP address or MAC address) and give priority to "low"?

    Allowing him the course "low activity" of others to get optimum bandwidth, and when others are on the same router / network, it will give priority to traffic, via its connection.

    It seems to work at home, where users of League of Legends and Skype (I know who they are :-)) have a low priority, and my work VPN connections have a higher priority)

Maybe you are looking for