Trying to remove child with timer
Would the following code be correct and if not can someone assist me in making it work. Thanks in advance.
var fw:Fireworks = new Fireworks(590,300);
addChild(fw);
var t:Timer = new Timer(10000, 0);
t.addEventListener(TimerEvent.TIMER, onTimer);
t.start();
function onTimer(evt:TimerEvent):void {
var i:int = 0; i++
removeChild("fw");
var fw:Fireworks = new Fireworks(590,300);
addChild(fw);
var t:Timer = new Timer(10000, 0);
t.addEventListener(TimerEvent.TIMER, onTimer);
t.start();
function onTimer(evt:TimerEvent):void {
var i:int = 0; i++
removeChild("fw");
t.removeEventListener(TimerEvent.TIMER,onTimer);
Similar Messages
-
Problems trying to animate ball with Timer
I trying to animate my ball. I just want it to move up but am having problems when trying to compile. I am getting 3 errorsin fact:
C:\prog1\project_game\GameScreen2.java:24: illegal start of expression
public void paintComponent(Graphics graphics) {
^
C:\prog1\project_game\GameScreen2.java:35: ';' expected
C:\prog1\project_game\GameScreen2.java:35: '}' expected
The last two errors refere to the final line.
Any help to fix these errors would be great. Here is my code:
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import javax.swing.event.*;
import javax.swing.border.Border;
// paints GolfCourse and DistanceBar
class GameScreen2 extends JPanel implements ActionListener {
GolfCourse gc;
Ball b;
Timer timer = null;
public GameScreen2(){
/* game loop, freeze timer, computer game actions, start timer.*/
timer = new Timer(40, new ActionListener() {
public void actionPerformed(ActionEvent evt) {
timer.start();
b.move();
repaint();
public void paintComponent(Graphics graphics) {
Graphics2D g = (Graphics2D) graphics;
super.paintComponent(g); //paint background
GolfCourse gc = new GolfCourse();
Ball b = new Ball();
gc.drawCourse(g);
b.drawBall(g);
}The only place I feel may require an extra brace is at the end of the constructor. If I add one there I get the following error:
C:\prog1\project_game\GameScreen2.java:8: GameScreen2 is not abstract and does not override abstract method actionPerformed(java.awt.event.ActionEvent) in java.awt.event.ActionListener
class GameScreen2 extends JPanel implements ActionListener {
^ -
I am using a WD My Passport to try and do a time machine backup for the first time, on my iMac desktop.
the first couopleo of times I did it, it was really slow and then crashed after a few mins. I started again as if it was a new external harddrive and some home it tarted a bit faster, getitng to aboyt 6GB of the 280GB within 10 mins and then crashed again. All I see is that it is no longer working and a message pops up saying 'Disk was not ejected properly', even though I havent touched it.
Am I doing soemthing wrong or have I got a dodgy external disk?
HelpTime Machine Troubleshooting
Time Machine Troubleshooting Problems -
Help using connect hard drive with Time Machine
My iMac and the two wirelessly connect apple laptops all recognize the Western Digital MYBookWorld 500gb external hard drive. We can all write to it and retrieve files. We are using a Lynksys router to which the iMac and WD drive are connected directly while the laptops connect wirelessly.
We are trying to use it with TIME Machine, but when we try to set up time machine, the drive does not show up as an option for the back up disc.
I have read through several old discussions about not recognizing the disc at all, but this is not our problem. Anyone with ideas?Hello Taxi Driver and welcome to Apple Discussion!
In short to use the External HD for the current backup and TimeMachine you will need to repartition it creating a partition for each. The down side at this point, is that in order to repartition the external the current data on it will be erased. When setting up the External for TimeMachine set the Partition Map Scheme to GUID Partition Table and the Format to Mac OS Extended (Journaled)
A couple of options:
1. Backup the current files on the External HD to one of your Mac's, then repartition it with 2 partitions, then use the 1st for TimeMachine and copy back the files to the 2nd partition.
2. Safer and easier way is to pickup a second external and set it up for TimeMachine.
http://www.apple.com/support/leopard/timemachine/ -
Partitioning on a table on the field TIMESTAMP WITH TIME ZONE
Hi I have a very large size table which has grown to a size that we are not able to query it efficiently. We have decided to partition the table. But the issue is the table has a TIMESTAMP WITH TIME ZONE field and not DATE. I have found some links on the web which state this might cause an error. I am planning to create a temp table with the partition rules and at the same time copy data from the original one.
using CREATE TABLE XYZ PARTITION BY RANGE (ABC) ( ---- Partition rules ------) NOLOGGING AS SELECT * FROM XYZ_ACTUAL where 1 = 2;
Then if it works fine, I would rename the table with partitions to the actual name.
Should all this be fine?
The database is very critical. Hence the dilemma.Have you tried converting the timestamp with time zone to a character string as a partition key, possibly using an edit mask to control the timestamp components used?
Your plan sounds OK to me - if you can get the partitioned table created - but I would test in a development first o see where the lLw of Unintended Consequences might decide to manifest itself.
Edited by: riedelme on Dec 8, 2009 9:13 AM -
How to remove "Open with... Adobe Acrobat" from the right click context menu
We want to deploy Adobe Acrobat on our Citrix envoriment. At this moment we have Adobe Reader for all users installed. Adobe Acrobat should be only availible to a selection of users. I've tried to remove everything with the custimaztion tool but one thing which I'm not able to is to remove the option when you right click a PDF document that you can choose to open with and then Adobe Acrobat XI. I want to disable this because else users who don't have the permission to run Adobe Acrobat are still able to run it.
Sorry but you're not right, why are there then whtiepapers how to install it on Citrix?
http://www.adobe.com/devnet-docs/acrobatetk/tools/AdminGuide/citrix.html -
Kernel Panic while backing up with Time Machine - now everything is GONE!
I got a kernel panic while i tried to back up with Time Machine....when i shut down the computer, and restarted it (with the external still plugged in, and on), it came up with an error message that said
"The disk you inserted was not readable by this computer."
And my three options were to "Initialize...", "Ignore", or "Eject"...
I didn't hit either of those buttons, i was trying to contact apple for support only to find out that i am just a week past my minimum 90 day telephone support, so i am trying to scrape up enough to order the APP immediately.
However, in the meantime, everything on my external harddrive is gone...Disk Utility doesn't even see that there was once a Partition on that drive, and thus, it is not showing up on my desktop, and there is no information to be recovered...everything is gone.
This is kind of ironic because i was just reading an article about how people are losing their info on their User account after having the Guest Accounts enabled....logged into guest, and back out of guest...
I am a part of one of those statistics because i do NOT have the Guest account enabled at all...
Can anybody else help me with this?where can i find the panic.log?
I did a spotlight search with no results.
I checked /Library/Logs, and didn't see a panic.log
I also checked ~/Library/Logs and didn't find a panic.log either....i was unable to find anything related to a kernel panic log, or anything.
Could you point me in the right direction for this please? Could it be that i had a kernal panic, and it did not record the log?
So what can i do to correct this?
Disk Warrior didn't detect the drive, and zapping the PRAM didn't correct it either.
I keep getting the error message i posted previously.
I even tried to plug the drive into my old 15" PowerBook G4 running 10.4 tiger to see if i could see the drive appear on the desktop, and i also got the same error there as well.
If i go into Disk Utility, into Partition, i have to create a Partition. There is absolutely nothing on the drive at all. Everything is gone because of a kernal panic - which happened when i was trying to use Time Machine to back up the drive.
I'm 1/2 afraid to do anything at the moment because i want to figure out what happened to the data i lost on my Time Machine backup drive, and how to get it back...at the same time, i'm afraid of losing all my information on my computer as well since people are having issues with the so called Guest Account issue that wipes everybody's user account's information.
Is there another scenario for this, could it be not just Guest Accounts deleting a users home folder, but also kernal panics related to Time Machine, which end up erasing your entire Time Machine backup drive too?
Apple really needs a fix for this and should somehow reward us with something for the unprofessionalism in their own technology.
Message was edited by: tool -
Time Machine spends hours partially backing up and then fails with "Time Machine couldn't complete the backup due to a network problem." I've tried various suggestions I've seen on the forum but nothing has worked. TIme Machine worked fine for the last two years and just suddenly started having this problem every time. The only thing that was a little different is that the computer was off for a week while on vacation and then I added a large amount (20 GB) of photos. Now the requested backup size is 82GB, which is large, and process proceeds very slowly for 2-3 hours before failing with the message mentioned. I have more than enough available backup storage space for it. Before failing, Time Machine has backed up no more than 12GB or so of the backup. It fails during different files each time.
I've turned off the computer sleep feature, and I've checked that the NAS is set to never automatically power down. I normally backup over Wi-Fi, but I've also tried connecting to Ethernet and it still has the same problem. It's odd because I also have a MacBook Pro that is still backing up fine to the same NAS using the MacBook's Time Machine.
I am using an iMac with OS X 10.6.8 and an Iomega StorCenter ix2-200 NAS.
I have system logs that I can share if helpful. The logged messages vary a bit from run to run, but here are some messages that I've been seeing:
I always get this message near the beginning of the backup:
Event store UUIDs don't match for volume: Macintosh HD
I've gotten this messsage a number of times:
Bulk setting Spotlight attributes failed.
One Day
Stopping backupd to allow ejection of backup destination disk!
Another day
1/7/12 10:44:20 AM
mDNSResponder[18]
PenaltyTimeForServer: PenaltyTime negative -112916, (server penaltyTime -1132397006, timenow -1132284090) resetting the penalty
1/7/12 10:46:37 AM
kernel
ASP_TCP Disconnect: triggering reconnect by bumping reconnTrigger from curr value 0 on so 0x1106be94
1/7/12 10:46:37 AM
kernel
AFP_VFS afpfs_DoReconnect started /Volumes/TimeMachine prevTrigger 0 currTrigger 1
Another Day
1/6/12 8:03:22 AM
Google Chrome[164]
Cannot find function pointer CMPluginInFactory for factory 3487BB5A-3E66-11D5-A64E-003065B300BC in CFBundle/CFPlugIn 0x16f99e20 </Users/smarmer/Library/Contextual Menu Items/Google Notifier Quick Add CM Plugin.plugin> (not loaded)
1/6/12 8:04:02 AM
com.apple.backupd[193]
Copied 7.5 GB of 67.0 GB, 8866 of 8866 items
1/6/12 8:06:58 AM
/System/Library/CoreServices/CCacheServer.app/Contents/MacOS/CCacheServer[1013]
No valid tickets, timing out
1/6/12 8:29:44 AM
mDNSResponder[19]
PenaltyTimeForServer: PenaltyTime negative -148702, (server penaltyTime 2056822773, timenow 2056971475) resetting the penalty
1/6/12 8:59:22 AM
kernel
ASP_TCP Disconnect: triggering reconnect by bumping reconnTrigger from curr value 0 on so 0xa5ac380
1/6/12 8:59:22 AM
kernel
AFP_VFS afpfs_DoReconnect started /Volumes/TimeMachine prevTrigger 0 currTrigger 1
1/6/12 8:59:22 AM
kernel
AFP_VFS afpfs_DoReconnect: doing reconnect on /Volumes/TimeMachine
1/6/12 8:59:22 AM
kernel
AFP_VFS afpfs_DoReconnect: soft mounted and hidden volume so do not notify KEA for /Volumes/TimeMachine
1/6/12 8:59:22 AM
kernel
AFP_VFS afpfs_DoReconnect: Max reconnect time: 30 secs, Connect timeout: 15 secs for /Volumes/TimeMachine
1/6/12 8:59:22 AM
kernel
AFP_VFS afpfs_DoReconnect: connect to the server /Volumes/TimeMachine
1/6/12 8:59:22 AM
kernel
ASP_TCP asp_SetTCPQoS: sock_settclassopt got error 57
Another day
1/5/12 3:48:55 PM
mdworker[2128]
CFPropertyListCreateFromXMLData(): Old-style plist parser: missing semicolon in dictionary.
1/5/12 4:24:54 PM
mDNSResponder[19]
PenaltyTimeForServer: PenaltyTime negative -42698, (server penaltyTime 1148718961, timenow 1148761659) resetting the penalty
1/5/12 4:29:58 PM
com.apple.backupd[2074]
Copied 586.4 MB of 67.0 GB, 9891 of 9891 items
1/5/12 4:39:00 PM
kernel
ASP_TCP Disconnect: triggering reconnect by bumping reconnTrigger from curr value 0 on so 0xa1c0380bokon0n wrote:
1/11/12 8:53:30 AM
com.apple.backupd[1169]
Warning: Destination /Volumes/TimeMachine does not support TM Lock Stealing
1/11/12 8:53:30 AM
com.apple.backupd[1169]
Warning: Destination /Volumes/TimeMachine does not support Server Reply Cache
Those indicate that your NAS is not fully compatible with Snow Leopard.
1/11/12 8:53:35 AM
kernel
jnl: disk2s2: replay_journal: from: 67182592 to: 78680064 (joffset 0xa7b8000)
1/11/12 8:53:39 AM
kernel
jnl: disk2s2: examining extra transactions starting @ 78680064 / 0x4b09000
1/11/12 8:53:39 AM
kernel
jnl: disk2s2: Extra txn replay stopped @ 79056896 / 0x4b65000
1/11/12 8:53:49 AM
kernel
jnl: disk2s2: journal replay done.
1/11/12 8:53:49 AM
fseventsd[41]
event logs in /Volumes/Time Machine/.fseventsd out of sync with volume. destroying old logs. (253512 14 253512)
1/11/12 8:53:50 AM
kernel
hfs: Removed 1 orphaned / unlinked files and 0 directories
That looks like a problem was found with the file system (data) on the TM disk. I don't know the details, but OSX tried to recover it from the journal, and found extra data on the drive. Likely a result of the incompatibility mentioned above.
1/11/12 9:47:40 AM
com.apple.backupd[1169]
Bulk setting Spotlight attributes failed.
That's a problem writing to the NAS drive.
But the backup continued after all this.
1/11/12 1:25:07 PM
kernel
ASP_TCP Disconnect: triggering reconnect by bumping reconnTrigger from curr value 0 on so 0x9d00b44
Something caused a disconnect. Can't tell from the log what it was.
I doubt it's a problem with something in OSX being damaged or corrupted, but reinstalling OSX isn't a major hassle, so might be worth a try.
To be incompatible with Snow Leopard, this NAS must be at least a couple of years old. It may be beginning to fail.
Contact the maker. See if there's an update to make it compatible with Snow Leopard. If so, that might fix it.
If not, or if that doesn't fix it, see if they have any diagnostics that will shed any light. -
All of a sudden my ATV came up with a message stating trying to set date and time however cannot access. Could this be due to the recent hacking of Apple or is it something new. How do I fix?
Welcome to the Apple Community.
It's not related to any hacking.
Try the following steps, check whether things are working after each step where appropriate, before trying the next.
1. Restart the Apple TV (Settings > General > Restart).
2. Restart the Apple TV by removing ALL the cables for 30 seconds.
3. Restart your router.
4. Reset the Apple TV (Settings > General > Reset > Reset all settings)
5. Restore the Apple TV (Settings > General > Reset > Restore) -
I am trying to download lion with the thumb drive how do i back up my files is time machine good enough or must i transfer everything to my hard drive
A erase of the drive or boot partition is not always necessary.
Flashing question mark at boot could be a easy fix, sometimes it's the firmware that simply forgot what bootable volume to boot from.
Try holding the Option key down while booting the machine, a choice of bootable options appears, select your OS X and boot up.
When you get in, head to System Preferences > Startup disk and set it again new. This will tell the firmware what to boot from. Test it to see.
Now if you don't have a selection of bootable options, it could be that the drive is dead, or OS X is erased or corrupted so it can't boot.
You'll have to run through this list of fixes to see what's going on, if you need a hardware fix or what, I've also included links if you can't fix it and need to recover your data etc.
(If it's not remmebering your boot selection then also run through the list to reset things.)
Step by Step to fix your Mac -
I have had a series of Macs. They have been backed up with Time Machine. I am trying to restore TM backup files from the older Macs using my new MacBook Pro. No go. What do I do ?
I am trying to restore TM backup files from the older Macs using my new MacBook Pro. No go.
Migration Assistant (Finder > Applications > Utilities > Migration Assistant) is the tool that you would use to restore backups from older Macs to another Mac.
Details are here: http://pondini.org/OSX/MigrateLion.html The same info applies for Mavericks and Yosemite. If you are saying that this is a "no go".....where are you getting stuck? What error messages do you see? -
Dear support @Apple,
I have tried to log in App Store with my Apple ID 3 times but never possible.
I have tried to change password 2 times.
It was successful.But soon after change of my password, I could not log in App store.
It says always incorrect user name or password. But I input correct ! Because just I successfully changed my password through secret question.
Third time when I tried to change password, the page did not open!
So I checked my connection by netstat , and I trace the IP address ; 17.154.66.17 this is apple IP, but when I trace , it did not show the route. I will copy
Traceroute has started…
traceroute to 17.154.66.17 (17.154.66.17), 64 hops max, 72 byte packets
1 220.224.141.129 (220.224.141.129) 490.517 ms 64.527 ms 94.524 ms
2 115.255.239.97 (115.255.239.97) 65.157 ms 89.128 ms 89.806 ms
3 124.124.251.241 (124.124.251.241) 104.972 ms 79.051 ms 96.948 ms
4 * * *
5 62.216.147.137 (62.216.147.137) 102.266 ms 85.581 ms 88.352 ms
6 xe-0-0-0.0.pjr04.ldn001.flagtel.com (85.95.25.186) 221.939 ms 225.223 ms 236.605 ms
7 xe-11-0-0.edge5.london1.level3.net (212.187.138.53) 231.629 ms 232.045 ms 233.673 ms
8 ae-52-52.csw2.london1.level3.net (4.69.139.120) 373.798 ms 390.412 ms 383.277 ms
9 ae-57-222.ebr2.london1.level3.net (4.69.153.133) 382.653 ms 382.558 ms 376.740 ms
10 ae-43-43.ebr1.newyork1.level3.net (4.69.137.74) 405.088 ms 377.679 ms 386.527 ms
11 ae-91-91.csw4.newyork1.level3.net (4.69.134.78) 378.499 ms 389.733 ms 396.375 ms
12 ae-92-92.ebr2.newyork1.level3.net (4.69.148.45) 391.706 ms 389.605 ms
ae-82-82.ebr2.newyork1.level3.net (4.69.148.41) 381.615 ms
13 4.69.135.185 (4.69.135.185) 380.183 ms 414.398 ms 387.054 ms
14 ae-91-91.csw4.sanjose1.level3.net (4.69.153.14) 384.980 ms 381.375 ms 386.453 ms
15 ae-4-90.edge2.sanjose3.level3.net (4.69.152.209) 377.304 ms 365.457 ms 373.281 ms
16 * * *
17 * * *
18 * * *
19 * * *
20 * * *
21 * * *
22 * * *
23 * * *
24 * * *
25 * * *
26 * * *
27 * * *
28 * * *
29 * * *
30 * * *
31 * * *
32 * * *
33 * * *
34 * * *
35 * * *
36 * * *
37 * * *
38 * * *
39 * * *
40 * * *
41 * * *
42 * * *
43 * * *
44 * * *
45 * * *
46 * * *
47 * * *
48 * * *
49 * * *
50 * * *
51 * * *
52 * * *
53 * * *
54 * * *
55 * * *
56 * * *
57 * * *
58 * * *
59 * * *
60 * * *
61 * * *
62 * * *
63 * * *
64 * * *
What it means??
Please help !!
To post this question, I tried thierd time to change password, and before I tried to log in to App store, I logged in this community, and I could !
Then I could finally log in App store also.
But still I feel something is wrong with my connection.
Why the trace route does not show to the apple site ?This is a user to user forum. Apple is not here. Apple does not answer questions here.
iTunes Support -
http://www.apple.com/support/itunes/
Mac App Store Support -
http://www.apple.com/support/mac/app-store/ -
Hi! I am trying to find an app that with track everything that is done on my phone with times and dates? im not really woried about call usage and texts sent I need it to view what has been done - for example:
Messages received
Messages deleted
Facebook viewed
Messages viewed
Internet viewed and what?
I just have an issue with someone using my phone - I used to track this through double clicking the home button and roughly knowing in what order I had been on things but they have sussed this one!
Thank you!!No way to do that on a non-jailbroken iPhone. Why don't you just passcode protect your phone? That way no one but you can use it...unless they know your passcode.
-
my ipod touch wont turn on ive tried restoring it but every time i do it just says its waiting for the ipod to respond. meanwhile my ipod is no longer a black screen but the apple logo with a loading bar underneath that after leaving for 8 hours hasnt moved.
Try:
- Another cable
- Another USB port
- Reboot the computer
- iOS: Not responding or does not turn on
- Also try DFU mode after try recovery mode
How to put iPod touch / iPhone into DFU mode « Karthik's scribblings
- If not successful and you can't fully turn the iOS device fully off, let the battery fully drain. After charging for an least an hour try the above again.
- Try on another computer
- If still not successful that usually indicates a hardware problem and an appointment at the Genius Bar of an Apple store is in order.
Apple Retail Store - Genius Bar -
Since updating OS to Mountain Lion from leopard, I get the following error message when trying to backup with time machine on external drive. "Could not complete backup to media share. The network backup disk does not support the required AFP features." What are AFP features and how do I get Time Machine to backup to my current external backup?
This means that your NAS does not support the required encryption. Update your NAS to the latest firmware or ditch it and buy a Time Capsule (they are the most reliable when using TM).
Maybe you are looking for
-
Macbook Air internet fails 50% of the time.
I'm a first time mac owner and currently very dissatisfied. I've had my MBA for about 3 months now, its running 10.7.4 Lion and it was running fine for a long while. recently I have been having issues where I launch safari and the system hangs, the p
-
How to get HD's serial number??
Hi guys.. How to get serial number of hard disk in LINUX and MAC???? I dont find this.. Im waiting.. thx!
-
HP TouchSmart IQ526cn support multi-touch in what kinda OS ?
Is there someone using this model-IQ526cn ? At the beginning, Vista support the two finger touching but After I installed the windows 7, the multi-touch function lost ...any advice for this is appreciated, thx.
-
How do you see invisible files on the romote side of the site window? I've got some .htaccess files, which are supposedly invisible on the Mac system, though they're visible on my local site window. If I upload them, I can see them until I quit Dream
-
@