MC placed several times and given the same instance name?
Hi all, I'm pretty new to the code in flash.
I especially used to use object oriented programming, but in flash, I do everything in an image.
I'm a car game. A little style GTA, but very simple. You are a police car and chasing you a thief through a city.
The thief uses ground nodes to know where it can lead, and where he can turn.
Basically, here's the scene. I placed these objects directly on the stage and given some of them instance names. :
_________________________________
| O
| I have o
| _______________________
| |
| |
| |
| |
| ^ |
| | |
| X |
The is a MC named node_switch.
The O is the two objects of the same MC, who both are named node_stop
The X is the thief (mc), and it's driving up along the road.
When the thief strikes node_switch, it will look up, down, left and right if any node_stop is placed.
This is done with hitTestObject. the thief 'beams' invisible in 4 directions, inside it's MC.
The problem is as follows:
When several nodes are placed on the stage, the thief faces only one of them.
As I said, they have the same instance name.
Is there a way to be able to place them directly on the stage, give them all the same instance name and make a loop where it goes through each of them and check the collision?
Edit:
Or maybe it is possible to place them directly on the stage, give them the name of bodies such as 'node_switch01', 'node_switch02' and then check for them all at the same time in a loop for or in some other way? There will be a lot of knots, then...
If you name them all differently, you will have an easier time of it. Loop through them with the naming convention, you suggested that you can use the notation of support, but it would be easier to get rid of zeros...
for (var i: uint = 1; i<=numNodes;>=numNodes;>
{if (Thief.hitTestObject (this ["node_switch" + String (i)])}
don't go that way
}
}
Tags: Adobe Animate
Similar Questions
-
worked very well and when was time to save I get the cyclic redundancy check, I try several times and made the same thing I need help please
Hello Hans,.
Thanks for choosing Microsoft Community!
According to the description of the problem, you have problems when you use the backup on Windows 8 feature.
Please answer these questions to better understand the issue and help you:
1. are - what you're talking to backup and restore functionality on Windows 7?
2 have you made any changes to the computer before the show?
It is perhaps to cause bad sectors on the hard drive, run the disk check to repair bad sectors
Check your hard drive for errors:
http://Windows.Microsoft.com/en-us/Windows7/check-your-hard-disk-for-errors
Important: Running chkdsk on the drive if bad sectors are found on the disk hard when chkdsk attempts to repair this area if all available on which data can be lost.
For more information:
Backup and restore: frequently asked questions
http://Windows.Microsoft.com/en-us/Windows7/back-up-and-restore-frequently-asked-questions
Hope the helps of information. Don't answer if you need assistance, we will be happy to help you.
-
Ideas: I'm trying to download the updates to my computer, but can't. I get the error code 646 and the download fails. I tried to download the update several times, but get the same answer. What is the problem?
- Pragrams you have problems with
- Error messages
- Recent changes to your computer
- What you have already tried to solve the problem
Remember - this is a public forum so never post private information such as numbers of mail or telephone!
Hello
Try this 1st to see if it helps, and it should:
Description of the Patch registration cleanup tool
http://support.Microsoft.com/kb/976220/------------------------------------------------------
If necessary :
Try this - Panel - Windows Updates - on every update that will not be installed - click on the important updates
or the update itself - double click a view more information (or click top then discovers on the right)Those who will take you to a page where you can download the update.
Or go here and the KBxxxxxx number to download it.
Download Center - mount the KBxxxxxx.
Microsoft Download Center
http://www.Microsoft.com/downloads/en/default.aspxDownload - SAVE - go to where you put them - click on - RUN AS ADMIN
Then you can right click on the update in the updates Windows and HIDE.
If you get an error Installer install this version:
Windows install 4.5 Redistributable
http://www.Microsoft.com/downloads/details.aspx?FamilyId=5A58B56F-60B6-4412-95B9-54D056D6F9F4&displaylang=en----------------------------------------------------
Then run this:
How to reset the Windows Update components? -a Mr Fixit
http://support.Microsoft.com/kb/971058Description of the system for Windows Vista, Windows Server 2008, update tool and
for Windows 7
http://support.Microsoft.com/kb/947821------------------------------------------------------------
Because these are all Office updates you might get more information if necessary in the Agency of those groups that
may have experienced the same problem.Office newsgroups
http://www.Microsoft.com/Office/Community/en-us/FlyoutOverview.mspxMicrosoft.public.office.misc discussions
http://www.Microsoft.com/communities/newsgroups/list/en-us/default.aspx?DG=Microsoft.public.Office.misc&cat=en_us_01cb749f-c998-4762-8099-df71793c11c7&lang=en&CR=us------------------------------------------------------------
If necessary you can incident free get reports however the above should take care of it for you.
Windows updates - free Incident report
Go here and click on-> Windows Update fails while searching, downloading or installation of updates
http://support.Microsoft.com/GP/wusupport#tab3The security updates, you can get free support Incident report
http://www.Microsoft.com/protect/resources/support.aspxI hope this helps.
Rob - bicycle - Mark Twain said it is good. -
When I download creative cloud and go into apps download illustrator, under the applications section, it says download error. tried to download several times more, again the same error. What can I do?
Hello
I think that you have found the "download error" in the Apps Panel.
Please check the help below document:
Download error in the applications tab of Creative Cloud Desktop Application
You can also view the threads below:
https://forums.Adobe.com/thread/1832357
Persistent Cloud error - error download - creative
Re: Creative Cloud "Download error" message
Kind regards
Sheena
-
Try to install purchased box. Alls well until the last window when this message appears. INCONSISTENCY IN THE DATABASE OF THE INSTALLER. RESTART YOUR COMPUTER AND INSTALL IT AGAIN. Fact as stated several times and redisplays but same message?
Run the cleanup tool and manually delete the caps.db file.
Important directories | Error postal codes of Mylenium
Use the CC cleaning tool to resolve installation problems. CC, CS3 - CS6
When you reinstall, make sure that you run with user privileges sufficient and external tools like virus scanners do not interfere. This is why you have the question in the first place.
Mylenium
-
Firefox crashes because as his tent to update the last website I went to have uninstalled and reinstalled several times and always the case. How can I erase this site so it seems not for her? Also happens in safe mode.
Follow the suggestions mentioned in the following article:
- Get help to solve this Crash
- Answer with your Crash IDs
-
Hi all
New customer to CC, cc said constantly that he lost the functionality and to re - install, I have done this several times and used the CC cleaning tool. What's the point of having CC if you cannot use this?
Thanks for your reply, but I spent some time with support online yesterday which has managed to make me sort, I do not have a UPDATER AAM file, I could not delete the contents of the OOBE folder either, I had to rename the folder creative cloud. I was sent then the application manager - who was then updated to the new until I'm able to get apps. Long-term, but it worked. I tried the procedure you have above, just not all the steps worked for me. Thanks to the Member of the support staff who helped me, I have been literally pulling my hair out!
-
Photoshop retains a recovery time and again the same image. How can I get him to stop?
Photoshop retains a recovery time and again the same image. How can I get him to stop?
I don't need the image. I tried to register on multiple locations.
Looks like you have an orphaned recovery file. See thread http://forums.adobe.com/message/4664463#4664463
-
Multiple MovieClips with the same instance name
I'm a tutorial of defence tower and part of the code is set up so I can build towers in the video for "grass". I wanted to add patches more 'grass' and gave them all the same instance name so I can be able to place towers on them, but I have the problem that I can only place towers on the first point, I placed and bears the name of the instance of the "grass". I can't place towers on the other patches of grass.
I removed the name of the instance of the first patch of grass and it let me build towers on the second task, but the second patch only.
I followed this tutorial: http://www.goofballgames.com/2010/01/31/how-to-build-a-tower-defense-flash-game-part-2-pla five-tours /
Here's the code for what I believe:
onClipEvent (load)
{
Active = 0;
}onClipEvent (enterFrame)
{
If (current == 1)
{
setProperty ("", _x, int ((_root._xmouse-10) / 20) * 20 + 20 ");
setProperty ("", FLF, int ((_root._ymouse-10) / 20) * 20 + 20 ");
hitTestOnGrassMovieClip = _root.grass.hitTest (_x, FLF, 1);
If {(hitTestOnGrassMovieClip)
gotoAndStop (1);
_root.Ranger.gotoAndStop (1);
}
else {}
gotoAndStop (2);
_root.Ranger.gotoAndStop (2);
}
_root.Ranger._x = _x;
_root.Ranger._y = FLF;
_root.Ranger._width = donut _root ["tower_" + round] * 2;
_root.Ranger._height = donut _root ["tower_" + round] * 2;
}
}
(press)
{
hitTestOnGrassMovieClip = _root.grass.hitTest (_x, FLF, 1);
hitTestOnDeSelectMovieClip = _root.deselect.hitTest (_x, FLF, 1);
If (hitTestOnGrassMovieClip: hitTestOnDeSelectMovieClip) {}
If {(hitTestOnGrassMovieClip)
++ _root.towerCount;
_root ["tower_" + round] .duplicateMovieClip ("t" + _root.towerCount, 500 + _root.towerCount);
a = _root ["t" + _root.towerCount];
a ._x = _x;
a ._y = FLF;
a.active = 1;
}
Active = 0;
setProperty ("", _x, 1000);
_root.selectedTower = "";
_root.Ranger._x = 1000;
_root.Ranger._width = 10;
_root.Ranger._height = 10;
}
}1. you cannot use the same instance name for different objects and expect more from a being targeted. You must assign a unique name, or you can store references to them in an array and use the table to target.
2. you send AS2 code messages in the forum of AS3. You should repost in the AS2 forum. http://forums.Adobe.com/community/Flash/flash_actionscript
-
Need to re - register a completed form on in Acrobat Reader and keep the same file name.
I did collect a form developed for our client in. They need to access and save it several times without making several versions.
Now that they can open, fill out some fields and "save under" a different file name. They must then go back and edit or add additional information to train at a later date.
He won't let not the re - save the file with the same file name, only "save under". It is not very practical because they will end up with many versions of the same shape and all earlier versions would be obsolete and useless for them.
You must disable the preview in Windows Explorer or close Windows Explorer.
-
Artists showing several times but in the same media folder?
Hi people,
A bit of an irritating problem and that, despite several attempts to trouble shoot, I have been unable to solve.
As iTunes traditionally organizes the library along the lines of the "Album Artist", I always used this tab to keep my library in order regarding artists.
What I've noticed in recent weeks, it is that when I select artists in the sidebar, I could see:
AC/DC: 5 albums, 70 song etc.
Then below in the column of artists AC/DC, 3 albums 40 songs etc.
I thought that this could be easily fixed by say changing the artist album to 'AAA' tags and which would group them together under a single artist label.
Unfortunately no, what I get instead is the same as above only in AAA, that is to say
AAA: 5 albums, 70 song etc.
Then below in the column of artists another AAA, 3 albums 40 songs etc.
Even when I try and change all new back to AC/DC, its still in the form view. As far as I can see, all the other values in the "Get Info" tab are the same.
Basically when you go and look at the drive where the folder media, AC/DC of all albums are in one folder. They display properly in the media folder but showing not correctly in the application?
Any ideas how I can fix it more irritating?
On my mac, media folder is stored on external hard drive because of the size, the rest of the files in the folder music as a default value.
Appreciate your help people
Simon.
See if this user tip solves your problem:
-
window 7
updated several times, always the same questionWhere it says that you are not on the latest version? You can attach a screenshot?
If http://www.google.com/firefox is the page telling you this, it is not true that Google is not maintain this page. Change your home page about: Welcome to the place.
-
two nodes ASM has the same instance name
Hello
I created a grid of ASM of two nodes, when the grid facility (11.2.0.1) finish he created the + ASM1 as instance name for my two knots.
I have install the ORACLE_SID in + ASM1 and + ASM2 node1 and node2, respectively prior to installation.
What is wrong, I do it for the installation of the grid? Please suggest.
Thank you
To create a virtual environment of RAC in VirtualBox or to share devices in an environment of ASM, you should turn off the virtual machine and change devices in VirtualBox using the following command:
$ VBoxManage modifyhd asmdisk1.vdi - shareable type
Then you can add the same features and use the disgroups on different nodes of the DSO. BTW, this is rather a question of the use of VirtualBox for which there is a special forum.
-
How to tune a myself to several files/folders at the same time?
- I have a lot of music and video files that have suddenly become unresponsive to any media player after a connection Xbox Media Center (music/videos appear, but no action follows after that as they are accessible, media players and the Xbox Media Center don't always work correctly).
- I can play one song/video after changing its properties (security permissions), which gives full control to me, the administrator manually. -Too much work for 4000 + files.
- My current media player is iTunes, but also Windows Media Player fails to play the music/videos.
Thanks for the reply, but I need to know how to proceed for several files/folders at the same time. This particular set of directions only explain how to set permissions to a single.
In Windows Explorer, select all the folders that you want to change the property on, then right click on ONE of these folders (your selections will remain)
Choose Properties > Security > advanced > owner > edit
Make your changes and do not forget to check the "Replace owner...". "downstairs.With thousands of files, it may take a few minutes. VP Tech Services
-
I just switch to CC to photographers. I downloaded and uninstalled Manager creative cloud several times and whenever I do tab apps under creative cloud wrote "the installation is no longer functional. Uninstall and reinstall... I continue to do this with the same results
Please follow the steps below.
- Follow the Solution 1 and 2 of error: "unable to install". Creative Office Cloud
- Install Creative Cloud Desktop Application using Download Adobe Creative Cloud apps | Adobe Creative Cloud free trial
Hope this will help you.
Kind regards
Hervé Khare
Maybe you are looking for
-
I get messages on my IPAD, "Safari cannot download FOXFIRE.". Help!
Simple. How to download FIREFOX on my IPAD? I've already downloaded SAFARI. I get the message that I can't download FIREFOX for free using SAFARI browser. What should I do?
-
I recently bought an Apple TV 3rd generation and realized I wanted to buy a 4th generation. Apple will allow a return or Exchange?
-
Why albums I didn't rate are assessed?
I have a very strange problem with itunes. Suddenly, a bunch of albums are listed (not in greyed out, realised on the way for rating songs, but as if I actually noticed the albums). I only did this, but 0.O so now my sides playlists and so on include
-
I am a novice with the games. I used to have Upwords on an old computer, but the CD does not work on my new laptop. It is used to open with Direct X, so I installed on my new computer. I downloaded 4Shared Upwords & unfortunately I do not know how to
-
WRT110 and poor download speeds
I installed originally a WRT110 on a Vista network and it worked perfectly. The network consists of a wired office, one wired printer, a wireless laptop and a Wii wireless. I converted to Vista for Win7RC when firstly, it is noticed and came about