Why doesn't this hitTestPoint work?
Probably I'm missing something on which settings I'm supposed to be in the way.
Here is the code:
In the first class (the object hit belongs to this class):
gp.lockPiece (e.stageX, e.stageY);
In the second class (referred to above as gp, the object to be affected belongs to this class):
public void lockPiece (gx, gy) {}
If (this.hitTestPoint (gx, gy, true)) {}
this.isLocked = true;
this.gotoAndStop ("Lock");
trace (this.isLocked);
}
else {}trace ("failed.");
}
}
It traces always "did not work" when I drag the instance of the class from the instance of the second class first. As I understand it not on the function hitTestPoint?
What is highlighted could be added to a table and every time you check your hittest, check if each element of the array is hit. If this is not the case, turn off highlight it.
Tags: Adobe Animate
Similar Questions
-
Why doesn't my password work?
I signed up for an account in the last 30 minutes. I chose a password and confirmed. Then I went to the Android store to download Firefox for Android on my phone - and it has worked successfully. But when I tried to login, my password was rejected. I checked to make sure it was the same thing, and it is. Why doesn't my password work? Oh, and it is 9 characters long with two digits.
In addition, I tried to change my password of Firefox on my desktop PC to be rejected for the same problem. So I can't even change my password (it takes the old password).
Password for what?
This forum?
The synchronization service account of Firefox?
Or? -
Why won't this script work?
Well so yesterday I posted a question I had with join InDesign files, I thought that I had found a solution and I was wrong. Nothing is as humbling as script... anyway the gist of what I'm trying to do is trying to combine a lot of InDesign files in a single large document. The problem I encounter is that InDesign crashes. What is strange to me is that a single iteration of this script works oddly, however when I try to do with multiple InDesign files * the bed.
Any help on the figure, it would be much appreciated.
System: WIndows 7
Indy Version: CS5
(1) selecting a folder.
(2) get the files.
(3) open one at a time, and duplicate pages in another document. (Which I call OCD because I basically that is what I want to do with the giant document.)
(4) close the source file without saving the changes. Pages should not change, but better safe than sorry.
(5) close the (TOC) destination file and save it with the new pages to this subject.
inDesign #target
File = Folder.selectDialog ();
files = folder.getFiles ("*.") INDD");
for (var i = 0; i < files.length; i ++) {}
source_doc = app.open (files [i]);
destination_doc = app.open (file ("c: / / users//user//desktop//TOC.indd"))
REST();
}
function rest() {}
sourcePages = source_doc.pages.itemByRange (0, -1);
sourcePages.duplicate (LocationOptions.AFTER, destination_doc.pages.item(-1));
source_doc. Close (SaveOptions.no);
destination_doc. Close (SaveOptions.YES, "c://users//user//desktop//TOC.indd");
}
Couple of thoughts: the code is kind of a mess. I don't understand why you are opening and closing of your doc of destination with each iteration, or why you have stuff separated in another function, or why you have not any vars. As a general rule, I try to work on spreads rather than pages where possible. I avoid also itemByRange() because of the strange plural object that it returns. Here's one (in my opinion, in any case) cleaned script:
var folder = Folder.selectDialog(), files = folder.getFiles("*.INDD"), destination_doc = app.open(new File("c://users//user//desktop//TOC.indd")), source_doc, i, j; for (i = 0; i < files.length; i++) { source_doc = app.open(files[i]); for (j = 0; j < source_doc.spreads.length; j++) { source_doc.spreads[j].duplicate(LocationOptions.AT_END, destination_doc); } source_doc.close(SaveOptions.NO); } destination_doc.close(SaveOptions.YES);
See if you have better luck with it.
Jeff
-
test\Test7.Java:
test of the package;
public class Test7
{
public static foo (int x) Sub
{
System.out.println ("int foo test 7:" + x);
}
}
Test8.Java:
public class Test8
{
Public Shared Sub main (String [] args)
{
System.out.println ("Test8 hand");
test . Test7.foo (10);
}
}
command line:
C:\Users\J\My Documents\java > dir Test8.*
Directory of C:\Users\J\My Documents\java
13/08/2013 10:42 220 Test8.java
1 file (s) 220 bytes
0 35,856,887,808 dir bytes free
C:\Users\J\My Documents\java > dir test\Test7 *.
Directory of C:\Users\J\My Documents\java\test
13/08/2013 10:147 03 Test7.java
1 file (s) 147 bytes
0 35,856,887,808 dir bytes free
C:\Users\J\My Documents\java > javac Test8.java
Test8.Java:8: error: cannot find symbol
test. Test7.foo (10);
^
symbol: variable Test7
Location: the class test
1 error
The change Test8.Java so that it uses an import statement allows compilation succeed:
test import. Test7;
public class Test8
{
Public Shared Sub main (String [] args)
{
System.out.println ("Test8 hand");
Test7.foo (10);
}
}
C:\Users\J\My Documents\java > javac Test8.java
C:\Users\J\My Documents\java >
Why?
Well, I just realized why it did not work. The real reason why he did not has nothing to do with any rubbish too complicated observability; My instincts were right: it must have worked, and indeed it would have worked throughout if it wasn't the fact that there is a file called test.class in the current directory.
The idea, after all, was in the error message, which, after return to this issue tonight and trying to solve the question damned again, I suddenly comes on:
C:\Users\J\My Documents\java > javac Test8.java
Test8.Java:8: error: cannot find symbol
test. Test7.foo (10);
^
symbol: variable Test7
Location: the class test
1 error
Huh, Test7 variable in the testclass? That could mean maybe? Why the compiler complains a class called test when it is supposed to be a package? Well, it was the test.class that the compiler has been conclusive file and of course when she concluded test.class assumed which corresponded to the call of 'test. Test7.foo ()' in Test8.java and does not consider this criterion might be a package and Test7 a class within this package. God knows how he got there, but he happened did and he managed to screw up my compilation and cause a lot of grief.
So, ultimately it had nothing to do with the observability and diagnose the cause of the problem does not need a complex understand the JLS based on a bunch of definitions on observability and paragraphs JLS, the package java.util, java package, java.io, sub-packages and others like.
Everything I thought about how it should be was right - you should be able to use an import statement or a full qualified class reference. It should not make a difference either. It is the convenience of a programmer to use import instructions. It is not mandatory for references to classes in your own packages to include an import statement in your .java file. I am happy to say I stuck to my guns in the face of hostile enemy fire and refused to be intimidated by explanations that comes, for me, has no meaning.
Please take note chaps, especially my good friend cardan2 and disciple and my very good friend masijade, I at no time has received a solution to this problem either here or 'the other place '.
Problem solved
-
OK for the last two days I've used youtube enhancer his summer bring me to another tab where I can choose how I wanted to download the vid... b4, he did all on the same page... now when he goes to the other page theres no options to choose to click to start the download. IE mp4 etc so I removed and went to reinstall it, but its gone. I can't find it now. I liked this cause you can sift the lighting etc. I use it on my daily life of students so I really want to get that back ASAP. can you please tell me what you're doing to mk it stop working now and why his party? Please email me at xavier6909atyahooodottcom. its very important. Thank you very much for your time. What is the best next youtube soft DL which made the Enhancer there?
Use this Addons to download Youtube videos
https://addons.Mozilla.org/en-us/Firefox/addon/easy-YouTube-video-downl-10137 -
Why doesn't AdvertBan (AB) work anymore?
Given that I've updated AdvertBan (AB) doesn't work anymore. On all sites, I see all the ads.
Not sure about AdvertBan, but Adblock Plus works fine with the latest version of Firefox. First, remove your existing adblock addon:
Download the latest version of Adblock more from here: -.
It should be fine... Let me know how its going.
-
Simple question - why doesn't this long text vertical field?
It must be easy, but I spent too long trying to make it work. I have a screen that displays a long string (EULA), followed by a few buttons. I can not get the vertical scrolling text. What Miss me? I tried different combinations of indicators on the Manager with no luck. I tried to use a LabelField as a RichTextField.
Thank you!
Here is the constructor for the form class:
public EULAScreen() { super(); VerticalFieldManager mgr2 = new VerticalFieldManager(Manager.VERTICAL_SCROLL|Manager.USE_ALL_HEIGHT); mgr2.add(new LabelField("Scroll to the bottom and click I AGREE to accept this agreement.\n \n")); lbEULA = new RichTextField(EULATEXT,RichTextField.USE_ALL_HEIGHT); mgr2.add(lbEULA); // lbEULA is a multi-line private static final String mgr2.add(acceptButtonField); mgr2.add(notacceptButtonField); add(mgr2); }
Try something like below:
//main screenpublic EULAScreen(){ super(NO_VERTICAL_SCROLL); VerticalFieldManager mgr2 = new VerticalFieldManager(Manager.VERTICAL_SCROLL|Manager.VERTICAL_SCROLLBAR) { protected void sublayout( int maxWidth, int maxHeight ) { int displayWidth = Display.getWidth(); int displayHeight = Display.getHeight(); super.sublayout( displayWidth, displayHeight); setExtent( displayWidth, displayHeight); } }; mgr2.add(new LabelField("Scroll to the bottom and click I AGREE to accept this agreement.\n \n")); lbEULA = new RichTextField(EULATEXT,RichTextField.USE_ALL_HEIGHT); mgr2.add(lbEULA); // lbEULA is a multi-line private static final String mgr2.add(acceptButtonField); mgr2.add(notacceptButtonField); add(mgr2);}
@Edit: typo
Concerning
Bika
-
I bought a GTX 780 ti GPU for my pc, but every time I install the most recent drivers, after effects give me error GPUsniffer.exe.
You have installed Windows 7 Service Pack 1?
-
How can I remove the button from menu? The custom option doesn't seem to work for this.
How can I remove the button from menu? [This IChing looking for three line on the toolbar icon].
The tool bar Customize option doesn't seem to work, and it seems a waste to have a button that duplicates the menus. I would trade on the NoScript icon.
Hi, I can not recommend that you do, but if you are really determined, this article can help.
-
Hello
We tried the window. ResizeTo and window. Methods MoveTo using javascript. It doesn't seem to work in version 9.0.1. Please suggest any alternative.Thank you
AvinashThis is no longer allowed for security reasons (bug 565541).
See https://support.mozilla.org/nl/questions/880032
https://developer.Mozilla.org/en/DOM/window.MoveTo -
My spellchecker of firefox doesn't seem to work; That's assuming that it exists at all. For example, when I misspell a Word when you compose an email using hotmail and I try to correct using the spell checker of hotmail, I get a message saying that I am using a browser that has of own built-in spellcheck. If it is integrated, how the hell can I find?
This has happened
Each time Firefox opened
Is as far as I know, always
You must install a spelling dictionary, only the US version comes with a dictionary.
https://addons.Mozilla.org/en-us/Firefox/language-tools/ -
ASSIGNABLE button 6 doesn't seem to work.
I tried to affect 'assignable button 6' to 'steadyshot' on my FS7, but it doesn't seem to work.
Countermeasures that I tried:
Thinking that I might need to reboot the camera, I have it turned on and then turning off. I also tried to unplug and re - connect my connection the handlegrip LANC and swapping of lenses (all the Sony E-mount). I also tried other functions as peaking to assinging but no matter how hard or soft how I push the number 6, he's as dead as a dodo.Has anyone else had this problem or is there something that I'm not just doing?
Sorry everyone. I'm afraid that the culprit was myself. I expected a menu pop up and did not notice that the icon has been change to reflect the State.
Therefore, the button works very well - it was my brain and eyes (I didn't put my glasses on!) which were defective.
-
Satellite M40X-148: Microphone doesn't seem to work
Hello
My laptop model is SATELLITE M40X-148.
My mic has stopped working.I changed my microphone.
It doesn't seem to work. They worked well earlier.Could you get it someone please let me know how to solve this problem.
Thanks in advance.
Kind regards
SureshHave you checked the settings of the external microphone?
Go to the Control Panel-> audio devices & audio and on the Volume tab, click the Advanced button.
Then a new window should appear and you could see different volume controllers.
Please check if mute was not activated in micro controller
-
HP Deskjet 1010: Why HP 61xl will not work in HP dj1010?
Why the HP61xl does not work in my printer HP1010?
The HP SureSupply site here says the right cartridge for the 1010 Deskjet is 61, it seems that this printer does not support the 61xl.
-
[Can't press Ctrl +] to the telnet command, it doesn't seem to work?
[Can't press Ctrl +] to the telnet command, it doesn't seem to work?
Hello
1. have you made changes on the computer before this problem?
2. the computer is on a domain network?
Follow these steps to escape the Telnet connection.
a. to start a Telnet session
b, click the Start button, click Run, and type command prompt.c. type telnet {destination or IP address}
[(d) in order to escape the Telnet connection, type Ctrl +].
Also, please provide an explanation more detailed of how you try to get the command works and what you expect to happen.
Maybe you are looking for
-
How can I disable Windows 10 Groove and making iTunes my leading actor
I just got a new Windows 10 PC. I transferred all my music, but I apparently screwed up somehow. How can I stop MS Groove to be main music player and go with iTunes?
-
Toshiba 40BV702B - where can I fix it?
My most young threw remote on TV and now the screen has colored lines on it Anyone know where I can get a cheap replacement for this TV screen where repaired for cheap
-
Hello I recently bought a m93p. I upgraded the operating system Windows 10. It was OK until I installed a graphics card (gigabyte 750ti low profile). When I started the office, I saw my mouse and my keyboard have turned off (more red light under the
-
Hi, problem with the cartridge
Hi my printer is HP Deskjet 3050. Today, when I intend to use, the screen of the printer, ' problem both cartridges. I don't know, because as the ink cartridges. Included black ink are new. What can I do?
-
Hi guys,. just want to know how long does it to find that if I set up a site to site between 2 cisco ASA vpn there is no interesting on a tunnel.i.e VPN traffic. How long the ASA must wait before he disassemblies SA given that there is no traffic in