Need some help with my Input.as file (error 1013)

Hello, I have just started learning Flash & Actionscript this month and I'm very eager to learn and do new things.
I wanted to learn to create some games in Flash and I managed to create a basic side scroller and a top down both with movement and collision functions.
What I'm trying to do now is implementing a fluid movement function in Flash. So I found a tutorial on how to do this on another site(Idk if I'm allowed to post it here ,but I will if you ask) .
What I basically have is a .fla file linked with a .as file and another .as file called Input.as. The website from which I'm following the tutorial said that this function was invented by the guys from Box2D and it should work properly,but for some reason when I try to run it(Ctrl+Enter) , I have error 1013 on the first line of the .as File saying that :
Fluid movement project\Input.as, Line 1
1013: The private attribute may be used only on class property definitions.
I've looked this error up on the internet and they say it's usually related with missing braces {} ,but I checked my code in the Input.as file and I don't have any missing brace. Here is the Input.as file from the website I'm following my tutorial:
private function refresh(e:Event):void
    //Key Handler
    if (Input.kd("A", "LEFT"))
        //Move to the left
        dx = dx < 0.5 - _max ? _max * -1 : dx - 0.5;
    if (Input.kd("D", "RIGHT"))
        //Move to the right
        dx = dx > _max - 0.5 ? _max : dx + 0.5;
    if (!Input.kd("A", "LEFT", "D", "RIGHT"))
        //If there is no left/right pressed
        if (dx > 0.5)
            dx = dx < 0.5 ? 0 : dx - 0.5;
        else
            dx = dx > -0.5 ? 0 : dx + 0.5;
    if (Input.kd("W", "UP"))
        //Move up
        dy = dy < 0.5 - _max ? _max * -1 : dy - 0.5;
   if (Input.kd("S", "DOWN"))
        //Move down
        dy = dy > _max - 0.5 ? _max : dy + 0.5;
    if (!Input.kd("W", "UP", "S", "DOWN"))
        //If there is no up/down action
        if (dy > 0.5)
            dy = dy < 0.5 ? 0 : dy - 0.5;
        else
            dy = dy > -0.5 ? 0 : dy + 0.5;
    //After all that, apply these to the object
    square.x += dx;
    square.y += dy;
I've slightly rearranged the braces from the original code so the code looks nicer to see and understand. Please tell me if I need to supply you any additional info and Thanks!

If what you showed is all you had for the Input class, then you should probably download all of the source files instead of trying to create them from what is discussed in the tutorial.  Here is what the downloaded Input.as file contains, which resembles a proper class file structure...
package {
import flash.display.*;
import flash.events.*;
import flash.geom.*;
import flash.utils.*;
public class Input {
   * Listen for this event on the stage for better mouse-up handling. This event will fire either on a
   * legitimate mouseUp or when flash no longer has any idea what the mouse is doing.
  public static const MOUSE_UP_OR_LOST:String = 'mouseUpOrLost';
  /// Mouse stuff.
  public static var mousePos:Point = new Point(-1000, -1000);
  public static var mouseTrackable:Boolean = false; /// True if flash knows what the mouse is doing.
  public static var mouseDetected:Boolean = false; /// True if flash detected at least one mouse event.
  public static var mouseIsDown:Boolean = false;
  /// Keyboard stuff. For these dictionaries, the keys are keyboard key-codes. The value is always true (a nil indicates no event was caught for a particular key).
  public static var keysDown:Dictionary = new Dictionary();
  public static var keysPressed:Dictionary = new Dictionary();
  public static var keysUp:Dictionary = new Dictionary();
  public static var stage:Stage;
  public static var initialized:Boolean = false;
   * In order to track input, a reference to the stage is required. Pass the stage to this static function
   * to start tracking input.
   * NOTE: "clear()" must be called each timestep. If false is pased for "autoClear", then "clear()" must be
   * called manually. Otherwise a low priority enter frame listener will be added to the stage to call "clear()"
   * each timestep.
  public static function initialize(s:Stage, autoClear:Boolean = true):void {
   if(initialized) {
    return;
   initialized = true;
   if(autoClear) {
    s.addEventListener(Event.ENTER_FRAME, handleEnterFrame, false, -1000, true); /// Very low priority.
   s.addEventListener(KeyboardEvent.KEY_DOWN, handleKeyDown, false, 0, true);
   s.addEventListener(KeyboardEvent.KEY_UP, handleKeyUp, false, 0, true);
   s.addEventListener(MouseEvent.MOUSE_UP, handleMouseUp, false, 0, true);
   s.addEventListener(MouseEvent.MOUSE_DOWN, handleMouseDown, false, 0, true);
   s.addEventListener(MouseEvent.MOUSE_MOVE, handleMouseMove, false, 0, true);
   s.addEventListener(Event.MOUSE_LEAVE, handleMouseLeave, false, 0, true);
   s.addEventListener(Event.DEACTIVATE, handleDeactivate, false, 0, true);
   stage = s;
   * Record a key down, and count it as a key press if the key isn't down already.
  public static function handleKeyDown(e:KeyboardEvent):void {
    if(!keysDown[e.keyCode]) {
    keysPressed[e.keyCode] = true;
    keysDown[e.keyCode] = true;
   * Record a key up.
  public static function handleKeyUp(e:KeyboardEvent):void {
   keysUp[e.keyCode] = true;
   delete keysDown[e.keyCode];
   * clear key up and key pressed dictionaries. This event handler has a very low priority, so it should
   * occur AFTER ALL other enterFrame events. This ensures that all other enterFrame events have access to
   * keysUp and keysPressed before they are cleared.
  public static function handleEnterFrame(e:Event):void {
   clear();
   * clear key up and key pressed dictionaries.
  public static function clear():void {
   keysUp = new Dictionary();
   keysPressed = new Dictionary();
   * Record the mouse position, and clamp it to the size of the stage. Not a direct event listener (called by others).
  public static function handleMouseEvent(e:MouseEvent):void {
   if(Math.abs(e.stageX) < 900000) { /// Strage bug where totally bogus mouse positions are reported... ?
    mousePos.x = e.stageX < 0 ? 0 : e.stageX > stage.stageWidth ? stage.stageWidth : e.stageX;
    mousePos.y = e.stageY < 0 ? 0 : e.stageY > stage.stageHeight ? stage.stageHeight : e.stageY;
   mouseTrackable = true;
   mouseDetected = true;
   * Get the mouse position in the local coordinates of an object.
  public static function mousePositionIn(o:DisplayObject):Point {
   return o.globalToLocal(mousePos);
   * Record a mouse down event.
  public static function handleMouseDown(e:MouseEvent):void {
   mouseIsDown = true;
   handleMouseEvent(e);
   * Record a mouse up event. Fires a MOUSE_UP_OR_LOST event from the stage.
  public static function handleMouseUp(e:MouseEvent):void {
   mouseIsDown = false;
   handleMouseEvent(e);
   stage.dispatchEvent(new Event(MOUSE_UP_OR_LOST));
   * Record a mouse move event.
  public static function handleMouseMove(e:MouseEvent):void {
   handleMouseEvent(e);
   * The mouse has left the stage and is no longer trackable. Fires a MOUSE_UP_OR_LOST event from the stage.
  public static function handleMouseLeave(e:Event):void {
   mouseIsDown = false;
   stage.dispatchEvent(new Event(MOUSE_UP_OR_LOST));
   mouseTrackable = false;
   * Flash no longer has focus and has no idea where the mouse is. Fires a MOUSE_UP_OR_LOST event from the stage.
  public static function handleDeactivate(e:Event):void {
   mouseIsDown = false;
   stage.dispatchEvent(new Event(MOUSE_UP_OR_LOST));
   mouseTrackable = false;
   * Quick key-down detection for one or more keys. Pass strings that coorispond to constants in the KeyCodes class.
   * If any of the passed keys are down, returns true. Example:
   * Input.kd('LEFT', 1, 'A'); /// True if left arrow, 1, or a keys are currently down.
  public static function kd(...args):Boolean {
   return keySearch(keysDown, args);
   * Quick key-up detection for one or more keys. Pass strings that coorispond to constants in the KeyCodes class.
   * If any of the passed keys have been released this frame, returns true.
  public static function ku(...args):Boolean {
   return keySearch(keysUp, args);
   * Quick key-pressed detection for one or more keys. Pass strings that coorispond to constants in the KeyCodes class.
   * If any of the passed keys have been pressed this frame, returns true. This differs from kd in that a key held down
   * will only return true for one frame.
  public static function kp(...args):Boolean {
   return keySearch(keysPressed, args);
   * Used internally by kd(), ku() and kp().
  public static function keySearch(d:Dictionary, keys:Array):Boolean {
   for(var i:uint = 0; i < keys.length; ++i) {
    if(d[KeyCodes[keys[i]]]) {
     return true;
   return false;

Similar Messages

  • I need some help with AVI and IDX files please.

    Hello there,
    I've just been given a hard drive with a load of media on it that I need to work with in FCP.
    There's a folder with many .AVI clips, and each clip has an accompanying directory file with the extension .IDX
    The format of the AVI files is DV, 720x576, 48kHz.
    For the life of me, I can't get FCP to accept the media. Log and Transfer won't accept them, and if i bring in the AVI files in on their own using File>Import>Files... I get a message saying:
    Media Performance Warning
    It is highly recommended that you either recapture the media or use the Media manager to create new copies of the files to improve their performance for multi-stream playback.
    I can click 'OK' for this message and the media will appear in the browser, but If I place one of these AVI files on a new conformed sequence, the audio needs rendering. (Sequence settings correspond to media settings)
    I tried just changing the wrapper from AVI to MOV, thinking I could fool FCP into accepting them, but I get the same rejection.
    I thought the audio and video signals might be muxed, so I tried MPEG Streamclip to sort that out, but even MPEG Streamclip doesn't accept the media, saying : File open error: Can't find video or audio tracks.
    Could anybody advise me on how to get the most out of these media files please?
    Thanks in advance.
    James.
    Message was edited by: James M.
    Message was edited by: James M.

    yes. I tried transcoding in QT, but they still come in with the same audio rendering required. I'm a bit loath to convert them all though, as there are 1400 clips.
    It's not a huge problem, as they do play in FCP, but I'd like to sort out the audio rendering. I don't understand why it needs rendering as the media and sequence audio settings match, and it's not some weird format or anything, it's bog standard 48kHz stereo.

  • I Know I am in the Wrong Room, but I Need Some Help with an Mpeg 2 File

         Hi, all--
    Forgive me as best you can--I am in a fairly desperate situation. Allow me to explain, and please feel free to contact me at [email protected] if you know a lot about this stuff I'm going to describe.
    We have a project, 29 minutes long. It is a slideshow of paintings with original music by me.
    I live in central Mexico (love it!). However, I was forced to use a video editor who has been a dunce so far. No matter what I ask him for, whether it is a version in a specific format or an edit, I get something different. Every time he has fixed a problem, he has created a new one.
    Now his house was broken into and all of his computers were stolen--I suspect he only has low quality backup files of the project.
    We are in a huge rush, because this is supposed to debut at an arts festival in October, and we need to duplicate a few hundred DVDs first...and now the problem:
    ALL WE HAVE FROM HIM IS AN MPEG2 of the project. The sound won't play on my Mac, but it plays on my friend's PC, so I have to assume that a pro duplication house won't have a problem with the sound if I send him the file on a thumb drive.
    THE PROBLEM WITH THE MPEG2 is that it is jittery when key images slide across the screen. This will look terrible on a 6 x 10' screen at the premiere, plus we do not want to sell DVDs with this unprofessional look.  I asked the editor for an M2V file (requested by the guy who was going to create a menu) and he instead gave me an Mpeg2 that is jittery.
    QUESTION: is there such a program that can take an mpeg 2 and eliminate jitter? I do NOT think I can get another file from the editor.
    CAN ANY OF YOU DO THE WORK IF I SEND YOU THE FILE? I WILL PAY.
    Thanks.
    Doug

    First of all, Hunt--thanks for responding!
    "First, where are you playing the MPEG-2, that you see that jitter?"
    On both a MacBook Pro, an Acer laptop and my Mac Tower. I would love to think that it is a problem with the playback system, and that if I merely send the file off to the duplicator they won't have the same problem. Maybe that is the case...I don't know if I have a choice rather than sending it off to see. But it happens in the same spots, in the same way, on all three of the players so I'm a little reluctant to have faith.
    "Another thing that can cause jitter in an MPEG-2 is the Bit-Rate - higher the Bit-Rate, the better the quality, but the larger the file. For a DVD, one is limited by the total Bit-Rate (both Audio & Video), but with longer prodcutions, some users choose too low a Bit-Rate. If this is the issue, one would need to go back to the original Project and do a new Export/Share."
    Of course, but in the case there is no more 'original project.' It is gone like the wind, stolen along with his computer and backups.
    I think I am stuck using one of two files as my master: a DVD he burned where I only see the stutter/vibration/jitter once, or the mpeg2 file where I see it three times. Hopefully, the duplication house can rip if off of one of them and not see the jitter. I know that in audio, my personal filed, you can do a lot to enhance already existing sound--EQ, compression, tape saturation emulation software, etc. I guess I'm hoping there is some kind of analog to the video world that address jitter after a source has been printed--if indeed the source has been printed to be jittery.
    Thanks,
    Doug

  • Need some help with putting a folder in users directory

    I'm not sure how to do this, but what I want to do is put this file in C:/My Documents, but I need to be able to verify that C://My Documents exists, if not put it in C:/Program Files.
    Can any one help me out?
    try {
                        String[] contactArray = parseDatFile(fc.getSelectedFile());
                        Document document = createXMLDocument(contactArray);
                        saveToXMLFile(
                        document,
                        new File(
                        "C:/Program Files/xxx/",// looks for directory for list
                        "xxxxxxxxxxxxxxxxxxxxxxxxxxxx"));
                    } catch (Exception exc) {
                        File f = new File("C:/Program Files/xxx/");// setting directory for list if not there
                        boolean yes = true;
                        yes = f.mkdir();// creating directory
                        try {
                            String[] contactArray = parseDatFile(fc.getSelectedFile());
                            Document document = createXMLDocument(contactArray);
                            saveToXMLFile(
                            document,
                            new File(
                            "C:/Program Files/xxx/",// used only if the directory didn't exist
                            "xxxxxxxxxxxxxxxxxxxxxxx"));

    Need some help with putting a folder in users directoryI recomend using System.getProperty( "user.home" ) not a hard-coded value.
    This will use the users home folder ( C:\My Documents ) on Win9X (I guess), C:\Documents and Settings\<current user> on Win2K +, and ~ on Unix-a-likes.

  • Need some help with threads...

    Hello all,
    I am working on a project at work, and I am not the best programmer in the world. I have been trying to get my head around this for a couple of days and just cannot get it to work.
    I am writing an instrumentation control program that will have three threads. One is the GUI, one will receive control information and set up the hardware, and one will check the hardware status and report it to the GUI periodically. I plan on using the invokeLater() method to communicate the status to the GUI and change the status display in the GUI. Communication from the GUI to the controller thread and from the status thread to the controller thread I had planned on being piped input/output stream as appropriate. I have a control class and a status class that need to be communicated over these piped streams. In some trial code I have been unable to wrap the piped input/output streams with object input/output streams. I really need some help with this. Here is the main thread code:
    package playingwiththreads1;
    import java.io.*;*
    *public class PlayingWithThreads1 {*
    public static void main(String[] args) {*
    * PipedOutputStream outputPipe = new PipedOutputStream();*
    * ObjectOutputStream oos = null;*
    * ReceiverThread rt = new ReceiverThread(outputPipe);*
    // Start the thread -- First try*
    * Thread t = new Thread(rt);*
    t.start();*
    // Wrap the output pipe with an ObjectOutputStream*
    try*
    oos = new ObjectOutputStream(outputPipe);*
    catch (IOException e)*
    System.out.println(e);*
    // Start the thread -- Second try*
    //Thread t = new Thread(rt);*
    //t.start();*
    /** Send an object over the pipe. In reality this object will be a
    class that contains control or status information */
    try
    if (!oos.equals(null))
    oos.writeObject(new String ("Test"));
    catch (IOException e)
    try
    Thread.sleep(5000);
    catch (InterruptedException e)
    I read somewhere that it matters where you start the thread relative to where you wrap piped streams with the object streams. So, I tried the two places I felt were obvious to start the thread. These are noted in the comments. Here is the code for the thread.
    package playingwiththreads1;
    import java.io.*;
    public class ReceiverThread implements Runnable {
    private PipedInputStream inputPipe = new PipedInputStream();
    private ObjectInputStream inputObject;
    ReceiverThread (PipedOutputStream outputPipe)
    System.out.println("Thread initialization - start");
    try
    inputPipe.connect(outputPipe);
    inputObject = new ObjectInputStream(inputPipe);
    catch (IOException e)
    System.out.println(e);
    System.out.println("Thread initialization - complete");
    public void run()
    System.out.println("Thread started");
    try
    if (inputObject.available() > 0)
    System.out.println(inputObject.read());
    catch (IOException e)
    System.out.println(e);
    Through testing I have determined that no matter where I start the thread, the thread never gets past the "inputObject = new ObjectInputStream(inputPipe);" assignment.
    Could someone please help me with this? There are other ways for me to write this program, but this is the one that I would like to make work.
    Many thanks in advance,
    Rob Hix
    Edited by: RobertHix on Oct 6, 2009 3:54 AM

    Thanks for the help, but that did not work. I tried flushing the ObjectOutputStream and it is still hanging when initializing the thread.
    Here is a better look at the code since I was helped to figure out how to insert it:
    The main method:
    package playingwiththreads1;
    import java.io.*;
    public class PlayingWithThreads1 {
        public static void main(String[] args) {
            PipedOutputStream outputPipe = new PipedOutputStream();
            ObjectOutputStream oos = null;
            ReceiverThread rt = new ReceiverThread(outputPipe);
            // Start the thread -- First try
            //Thread t = new Thread(rt);
            //t.start();
            // Wrap the output pipe with an ObjectOutputStream
            try
                oos = new ObjectOutputStream(outputPipe);
                oos.flush();
            catch (IOException e)
                System.out.println(e);
            // Start the thread -- Second try
            Thread t = new Thread(rt);
            t.start();
            /* Send an object over the pipe.  In reality this object will be a
             * class that contains control or status information */
            try
                if (!oos.equals(null))
                    oos.writeObject(new String ("Test"));
                    oos.flush();
            catch (IOException e)
                System.out.pringln(e);
            try
                Thread.sleep(5000);
            catch (InterruptedException e)
    }The thread code:
    package playingwiththreads1;
    import java.io.*;
    public class ReceiverThread implements Runnable {
        private PipedInputStream inputPipe = new PipedInputStream();
        private ObjectInputStream inputObject;
        ReceiverThread (PipedOutputStream outputPipe)
            System.out.println("Thread initialization - start");
            try
                inputPipe.connect(outputPipe);
                inputObject = new ObjectInputStream(inputPipe);
            catch (IOException e)
                System.out.println(e);
            System.out.println("Thread initialization - complete");
        public void run()
            System.out.println("Thread started");
            try
                if (inputObject.available() > 0)
                    System.out.println(inputObject.read());
            catch (IOException e)
                System.out.println(e);
    }Does anyone else have and ideas?

  • Need some help with guitar setup...

    jeez, never thought i'd be asking a question like this after playing for like 20 years, but i need some help with a guitar setup for mac. i'm gonna list out a lot of crap here that prolly doesn't affect anything at all, but here goes.
    Imac 17inch G4 - latest updated OS X... 10.4, or 5, or whatever. garageband 3.0
    digitech gnx-3
    alesis sr-16
    sure mic's
    yamaha e203 keyboard
    here's the setup:
    yamaha is on its own on a usb uno midi interface, sure's connected to gnx's xlr port, alesis connected to gnx's jam-a-long input, '87 kramer vanguard connected to gnx's guitar input. currently running headphones out on gnx to line in on mac.
    here's the problem:
    everything works beautifully, but my guitar sounds like crap. if i plug headphones into the gnx, it sounds beautiful. that makes me think its some kind of level issue between the gnx's output, and the mac's input, but nothing seems to fix it.
    by sounding like crap, i mean way too much bass. sound is muddy, blurry, not crisp... aka crap. i've tried altering both output and input on mac and gnx, and i cant get a combination that works. the gnx has a s/pdif out, can the mac accept that as input? might that help? short of running the gnx to my marshal half stack and mic'ing that, anyone have any suggestions, or use a similar setup?
    any help would be greatly appreciated!

    anyone? ... any suggestions? I think it might be an issue with the gnx pre-amping the signal as it goes out, and then the mac amping it on the way in, giving me a buttload more signal than i need, but since i cant find a happy level, i'm not really sure. i really dont want to resort to mic'ing my marshall... even with the volume almost off, my jcm900 is WAY too loud for apartment use. its not like i really NEED the guitar to sound perfect, i only use garageband to sketch out ideas for songs between myself and bandmates, but its really annoying to not have my customary crisp distortion. my bass player keeps telling me to use the built in amps, but, not to dis a practically free program, but the built in amps blow, at least after 10 years of marshall tube amplification they do. if anyone has any suggestions that might be helpfull on how i might resolve this, i would be your best friend for life and go to all your birthday parties

  • Need some help with region position

    Hi,
    I need som help with regions position....
    Background:
    I have 2 regions, I will call them reg1, reg2 and reg3.
    reg1 = Page Template Body (2. items below region content), column 1, search region.
    reg2 = Page Template Body (2. items below region content), column 2, import file region.
    reg3 = Page Template Body (3. items above region content), column 1, search result, grid region, very wide.
    Issue with the position, the setup explained makes my layout like this
    reg1--------------------------------reg2
    ------------------reg3--------------------
    What I want:
    reg1-reg2
    ------------------reg3--------------------
    What am I doing wrong?
    Regards Daniel

    Daniel,
    this will also work:
    Region1 HTML table cell attributes
    width="10%"
    Region2 HTML table cell attributes
    align="left"
    without touching the page template.
    Denes Kubicek
    http://deneskubicek.blogspot.com/
    http://www.opal-consulting.de/training
    http://htmldb.oracle.com/pls/otn/f?p=31517:1
    -------------------------------------------------------------------

  • Need some help with Flash + Captivate (ActionScript in Flash)

    I have what I think is a fairly simple question.... I have an SWF File embedded in a Captivate 4 Presentation. The SWF requires the user to click on a variety of items, after they have gone through all the required items a "FINISH" button appears... I want the finish button to "close" the SWF file.
    I'll add this info to in case it helps with the "right" answer....
    The reason I am doing this is because Captivate automatically rolls from one "slide" to the next. The only way to stop this is to add a "pause" button to the slide, I want the user to have to finish the SWF before they can see the "next" button in the captivate file...So I was thinking, put the "swf" over the "next" button... then have the "complete" button close the swf revealing the covered "next" button in captivate....
    The short version of what I need is information on closing an SWF file via a button click. Is there a "swf.visible=false" or anything like that?

    Need some help with putting a folder in users directoryI recomend using System.getProperty( "user.home" ) not a hard-coded value.
    This will use the users home folder ( C:\My Documents ) on Win9X (I guess), C:\Documents and Settings\<current user> on Win2K +, and ~ on Unix-a-likes.

  • Error 1603: Need some help with this one

    When installing iTunes I first get an error box saying
    "Error 1406: Could not write value to key \Software\classes\.cdda\OpenWithList\iTunes.exe. Verify that you have sufficient access to that key, or contact your support personnel."
    The second one (after I click on Ignore on the last box) I get it this one:
    "Error: -1603 Fatal error during installation.
    Consult Windows Installer Help (Msi.chm) or MSDN for more information"
    Strange thing is that I do have full access to my computer (or atleast in all other cases I have had since I am the only one with an account on it).
    I have done my best in trying to solve it myself but I'm running out of ideas. I have downloaded latest versions from the website and tried installing Quicktime separately. I have also tried removing Quicktime using add/or remove programs though I just I didn't dare to take full removal because it said something about system files.
    Anyway I really need some help with this, anyone got any ideas?
    Greets,
    Sixten
      Windows XP Pro  

    Do you know how to count backwards? Do you know how to construct a loop? Do you know what an autodecrementor is? Do you know how to use String length? Do you know Java arrays start with index 0 and run to length-1? Do you know you use length on arrays too? Do you know what System.out.println does?
    Show us what you have, there isn't anything here that isn't easily done the same as it would be on paper.

  • I Need Some Help With My Dreamweaver

    Hello, there i need some help with my dreamweaver i already made a forum about this but that one i maded didnt make sense soo i will make it more details in it soo i will tell you what i did i tell you what i downloed and all that just now but i tell you the things what it does i downloaded Adobe Design and Web Premium CS6 its a 30 day trial then and now i will tell you the details look below please
    Details
    Soo i opened my start menu then went on all programs then clicked on Adobe Design and Web Premium CS6 then i clicked on the dreamweaver CS6 then when i clicked on it i heard my computer shut down then it shuted down when i opened it straight away then it turns it self back on
    What did i do about this when it happened?
    I made a question so please can telll me what to do or what ever
    Why did i download it?
    i downloaded it because i am making a website and i want to use dreamweaver CS6 because i use notepad++ i do not like the notepad++ its harder and dreamweaver helps a bit i think because i watched a video of it
    What if you dont have an answer?
    Well, i will be very angry because i am making a good website its gonna be my frist publish website ever i made 20 websites but i never published them i deleted them because i wiped my computer
    What kind of Computer Do You have?
    System:
    Micfosoft windows xp
    Media Center Edition
    Version 2002
    Service Pack 2
    Computer
    ei-system
            intel(R)
    pentium(R) 4 CPU 3.20ghz
    3.20 ghz, 960 MB of RAM
    Btw i am using dreamweaver CS6 if you fogot and dont say add more details because there is alot off details there and if you help me i will show u the whloe code when i am done but leave ur emaill address below
    (C) Connor McIntosh

    No.
    Service Pack 3 just updates your OS. All of your files, folders and programs will still be there.
    You will start running into more problems like this the longer you stick with XP though. That particular OS is over 11 years old, service pack 3 hs been out for over 4 years.
    It may be time for a system upgrade. I personally went from XP to Windows 7 and I haven't looked back one bit.

  • Please I need some help with a table

    Hi All
    I need some help with a table.
    My table needs to hold prices that the user can update.
    Also has a total of the column.
    my question is if the user adds in a new price how can i pick up the value they have just entered and then add it to the total which will be the last row in the table?
    I have a loop that gets all the values of the column, so I can get the total but it is when the user adds in a new value that I need some help with.
    I have tried using but as I need to set the toal with something like total
        totalTable.setValueAt(total, totalTable.getRowCount()-1,1); I end up with an infinite loop.
    Can any one please advise on some way I can get this to work ?
    Thanks for reading
    Craig

    Hi there camickr
    thanks for the help the other day
    this is my full code....
    package printing;
    import java.awt.*;
    import java.awt.event.*;
    import java.awt.print.*;
    import javax.swing.*;
    import javax.swing.table.*;
    import java.text.DecimalFormat;
    public class tablePanel
        extends JDialog  implements Printable {
      BorderLayout borderLayout1 = new BorderLayout();
      private boolean printing = false;
      private Dialog1 dialog;
      JPanel jPanel = new JPanel();
      JTable table;
      JScrollPane scrollPane1 = new JScrollPane();
      DefaultTableModel model;
      private String[] columnNames = {
      private Object[][] data;
      private String selectTotal;
      private double total;
      public tablePanel(Dialog1 dp) {
        dp = dialog;
        try {
          jbInit();
        catch (Exception exception) {
          exception.printStackTrace();
      public tablePanel() {
        try {
          jbInit();
        catch (Exception exception) {
          exception.printStackTrace();
      private void jbInit() throws Exception {
        jPanel.setLayout(borderLayout1);
        scrollPane1.setBounds(new Rectangle(260, 168, 0, 0));
        this.add(jPanel);
        jPanel.add(scrollPane1, java.awt.BorderLayout.CENTER);
        scrollPane1.getViewport().add(table);
        jPanel.setOpaque(true);
        newTable();
        addToModel();
        addRows();
        setTotal();
    public static void main(String[] args) {
      tablePanel tablePanel = new  tablePanel();
      tablePanel.pack();
      tablePanel.setVisible(true);
    public void setTotal() {
      total = 0;
      int i = table.getRowCount();
      for (i = 0; i < table.getRowCount(); i++) {
        String name = (String) table.getValueAt(i, 1);
        if (!"".equals(name)) {
          if (i != table.getRowCount() - 1) {
            double dt = Double.parseDouble(name);
            total = total + dt;
      String str = Double.toString(total);
      table.setValueAt(str, table.getRowCount() - 1, 1);
      super.repaint();
      public void newTable() {
        model = new DefaultTableModel(data, columnNames) {
        table = new JTable() {
          public Component prepareRenderer(TableCellRenderer renderer,
                                           int row, int col) {
            Component c = super.prepareRenderer(renderer, row, col);
            if (printing) {
              c.setBackground(getBackground());
            else {
              if (row % 2 == 1 && !isCellSelected(row, col)) {
                c.setBackground(getBackground());
              else {
                c.setBackground(new Color(227, 239, 250));
              if (isCellSelected(row, col)) {
                c.setBackground(new Color(190, 220, 250));
            return c;
        table.addMouseListener(new MouseAdapter() {
          public void mouseClicked(MouseEvent e) {
            if (e.getClickCount() == 2) {
            if (e.getClickCount() == 1) {
              if (table.getSelectedColumn() == 1) {
       table.setTableHeader(null);
        table.setModel(model);
        scrollPane1.getViewport().add(table);
        table.getColumnModel().getColumn(1).setCellRenderer(new TableRenderDollar());
      public void addToModel() {
        Object[] data = {
            "Price", "5800"};
        model.addRow(data);
      public void addRows() {
        int rows = 20;
        for (int i = 0; i < rows; i++) {
          Object[] data = {
          model.addRow(data);
      public void printOut() {
        PrinterJob pj = PrinterJob.getPrinterJob();
        pj.setPrintable(tablePanel.this);
        pj.printDialog();
        try {
          pj.print();
        catch (Exception PrintException) {}
      public int print(Graphics g, PageFormat pageFormat, int pageIndex) throws PrinterException {
        Graphics2D g2 = (Graphics2D) g;
        g2.setColor(Color.black);
        int fontHeight = g2.getFontMetrics().getHeight();
        int fontDesent = g2.getFontMetrics().getDescent();
        //leave room for page number
        double pageHeight = pageFormat.getImageableHeight() - fontHeight;
        double pageWidth =  pageFormat.getImageableWidth();
        double tableWidth = (double) table.getColumnModel().getTotalColumnWidth();
        double scale = 1;
        if (tableWidth >= pageWidth) {
          scale = pageWidth / tableWidth;
        double headerHeightOnPage = 16.0;
        //double headerHeightOnPage = table.getTableHeader().getHeight() * scale;
        //System.out.println("this is the hedder heigth   " + headerHeightOnPage);
        double tableWidthOnPage = tableWidth * scale;
        double oneRowHeight = (table.getRowHeight() +  table.getRowMargin()) * scale;
        int numRowsOnAPage = (int) ( (pageHeight - headerHeightOnPage) / oneRowHeight);
        double pageHeightForTable = oneRowHeight *numRowsOnAPage;
        int totalNumPages = (int) Math.ceil( ( (double) table.getRowCount()) / numRowsOnAPage);
        if (pageIndex >= totalNumPages) {
          return NO_SUCH_PAGE;
        g2.translate(pageFormat.getImageableX(), pageFormat.getImageableY());
    //bottom center
        g2.drawString("Page: " + (pageIndex + 1 + " of " + totalNumPages),  (int) pageWidth / 2 - 35, (int) (pageHeight + fontHeight - fontDesent));
        g2.translate(0f, headerHeightOnPage);
        g2.translate(0f, -pageIndex * pageHeightForTable);
        //If this piece of the table is smaller
        //than the size available,
        //clip to the appropriate bounds.
        if (pageIndex + 1 == totalNumPages) {
          int lastRowPrinted =
              numRowsOnAPage * pageIndex;
          int numRowsLeft =
              table.getRowCount()
              - lastRowPrinted;
          g2.setClip(0,
                     (int) (pageHeightForTable * pageIndex),
                     (int) Math.ceil(tableWidthOnPage),
                     (int) Math.ceil(oneRowHeight *
                                     numRowsLeft));
        //else clip to the entire area available.
        else {
          g2.setClip(0,
                     (int) (pageHeightForTable * pageIndex),
                     (int) Math.ceil(tableWidthOnPage),
                     (int) Math.ceil(pageHeightForTable));
        g2.scale(scale, scale);
        printing = true;
        try {
        table.paint(g2);
        finally {
          printing = false;
        //tableView.paint(g2);
        g2.scale(1 / scale, 1 / scale);
        g2.translate(0f, pageIndex * pageHeightForTable);
        g2.translate(0f, -headerHeightOnPage);
        g2.setClip(0, 0,
                   (int) Math.ceil(tableWidthOnPage),
                   (int) Math.ceil(headerHeightOnPage));
        g2.scale(scale, scale);
        //table.getTableHeader().paint(g2);
        //paint header at top
        return Printable.PAGE_EXISTS;
    class TableRenderDollar extends DefaultTableCellRenderer{
        public Component getTableCellRendererComponent(
          JTable table,
          Object value,
          boolean isSelected,
          boolean isFocused,
          int row, int column) {
            setHorizontalAlignment(SwingConstants.RIGHT);
          Component component = super.getTableCellRendererComponent(
            table,
            value,
            isSelected,
            isFocused,
            row,
            column);
            if( value == null || value .equals("")){
              ( (JLabel) component).setText("");
            }else{
              double number = 0.0;
              number = new Double(value.toString()).doubleValue();
              DecimalFormat df = new DecimalFormat(",##0.00");
              ( (JLabel) component).setText(df.format(number));
          return component;
    }

  • Need some help with a Macally enclosure and a spare internal drive

    Need some help with a Macally enclousure
    Posted: Oct 1, 2010 10:55 AM
    Reply Email
    Aloha:
    I have a Macally PHR-S100SUA enclousure that does not recognise,my WD 1001fals hard drive. It has worked just fine with other internal drives, but not this one?
    This is a spare internal drive that I am trying to make an external drive to store back ups for a lot of data. But so far I can not get it recognized by the computer. Maybe I need different drivers?
    Any suggestions?
    Dan Page

    Hi-
    Drivers aren't typically needed for external enclosures.
    Macally has none listed for that enclosure.
    The same is true for the WD drive, internal or external; no drivers.
    With the exception of high end PM multi drive enclosures, I can't think of any that use drivers.
    How is the external connected?
    Have you tried different cables, different ports?
    Bad/damaged cables are fairly common.
    Have you verified connections inside of the enclosure?

  • Need some help with downloading PDF's from the net.

    need some help with downloading PDF's from the net.  Each time I try to click on a link from a website, if it takes me to a new screen to view a pdf, it just comes up as a blank black screen?  any suggestions?

    Back up all data.
    Triple-click the line of text below to select it, the copy the selected text to the Clipboard (command-C):
    /Library/Internet Plug-ins
    In the Finder, select
    Go ▹ Go to Folder
    from the menu bar, or press the key combination shift-command-G. Paste into the text box that opens (command-V), then press return.
    From the folder that opens, remove any items that have the letters “PDF” in the name. You may be prompted for your login password. Then quit and relaunch Safari, and test.
    The "Silverlight" web plugin distributed by Microsoft can also interfere with PDF display in Safari, so you may need to remove it as well, if it's present.
    If you still have the issue, repeat with this line:
    ~/Library/Internet Plug-ins
    If you don’t like the results of this procedure, restore the items from the backup you made before you started. Relaunch Safari again.

  • Need some help with the Select query.

    Need some help with the Select query.
    I had created a Z table with the following fields :
    ZADS :
    MANDT
    VKORG
    ABGRU.
    I had written a select query as below :
    select single vkorg abgru from ZADS into it_rej.
    IT_REJ is a Work area:
    DATA : BEGIN OF IT_REJ,
            VKORG TYPE VBAK-VKORG,
            ABGRU TYPE VBAP-ABGRU,
           END OF IT_REJ.
    This is causing performance issue. They are asking me to include the where condition for this select query.
    What should be my select query here?
    Please suggest....
    Any suggestion will be apprecaiated!
    Regards,
    Developer

    Hello Everybody!
    Thank you for all your response!
    I had changes this work area into Internal table and changed the select query. PLease let me know if this causes any performance issues?
    I had created a Z table with the following fields :
    ZADS :
    MANDT
    VKORG
    ABGRU.
    I had written a select query as below :
    I had removed the select single and insted of using the Structure it_rej, I had changed it into Internal table 
    select vkorg abgru from ZADS into it_rej.
    Earlier :
    IT_REJ is a Work area:
    DATA : BEGIN OF IT_REJ,
    VKORG TYPE VBAK-VKORG,
    ABGRU TYPE VBAP-ABGRU,
    END OF IT_REJ.
    Now :
    DATA : BEGIN OF IT_REJ occurs 0,
    VKORG TYPE VBAK-VKORG,
    ABGRU TYPE VBAP-ABGRU,
    END OF IT_REJ.
    I guess this will fix the issue correct?
    PLease suggest!
    Regards,
    Developer.

  • Need some help with ".png" image.

    Good day everyone. Here's the run down. I need to add an
    image (image "A") ontop of another image (image"B"). Image "B" is a
    paterned background. And Image "A" a logo with a transparent
    background.
    As it stands I have image "A" as a "png" and as you know....
    they are fri**ing huge! Haveing it as a "gif" only presents me with
    the IE6 problem of it adding a colored background to the image.
    So I'm stuck! Can any one tell me or point me in the
    difection of a tutorial to tell me the best way to add an image
    with a transparent background in Dreamweaver.
    Really need some help with this!
    Thanks all!

    >Right you can see the work in progress here>
    http://www.stclairecreative.com/DoughBoys_Site_Folder/home.html
    Before going much further I'd recommend reconsidering the use
    of a textured background. They are usually included for the benefit
    of the site owner only, and likely to annoy visitors. Studies on
    the subject suggest they often lead to usability problems. I do
    like to header graphic, but at 200K it's kinda heavy and can
    probably be optimized.

Maybe you are looking for

  • Checkbox in an Updatable Report

    How can I use a checkbox to display checked for 'T' and unchecked for anything else in a report based on an SQL Query? How can I use the checkbox in the report to set the value in the field in the table in an MRU? Can this be done the same way as if

  • How do i get TV Shows that are on my Apple TV 1st gen to download to my computer?

    For some reason I cannot figure out TV shows that are appear on the ATV 1st gen do not appear in the download list of iTunes on the computer I am trying to sync with.

  • Is it possible in PLD to add sql query ?

    Hi In Order report in PLD , i need to add the total amount of down payment . it doesn't exists in Order , so i need to do a sql query to display this amount . is it possible to add sql query in pld formula ? thanks , regards laurent

  • IPad 2 stopped receiving iMessages sent to my phone number

    I have an iPad 2 and an iPhone 4S. When I got the iPad, I was able to sync it with my iPhone just fine. It was sending and receiving iMessages that were directed to my iPhone phone number, and the messages on the two devices were syncing perfectly, a

  • BEFW11S4

    I have a BEFW11S4 router and have been using it for a while, nothing wrong with it (if there is a problem, it's usually because of my internet provider). I just recently came home with my laptop from college, and am having difficulty connecting my la