Probably a simple question for ya...

Ok, so I will start this by admitting I know almost nothing about AS3 and very VERY little about programming as a whole. 
I'll post my code below and you'll probably think I'm an idiot for not knowing what's wrong with it, but that's ok, lol.  I keep getting "1120: Access of undefined property..." with a whole bunch of different problems, all involving the movement of a character that I'm trying to create for a game I'm attempting to make.  If you can please tell me what I'm doing wrong and if possibly explain it as if I know nothing about programming, it would be very much appriciated.  I've been working on this for a while now and am not getting anywhere, and I just know the answer is something very simple I'm missing.  Once again thank you very much in advance for an answer,
package
          import flash.display.MovieClip;
                    public class Shooter extends flash.display.MovieClip
                              public var WalkingSpeed;
                              public function onLoad()
                                        WalkingSpeed = 5;
                              public function onEnterFrame ()
                              if(Key.isDown(68))
                                                  _x = _x + WalkingSpeed;
                              if (Key.isDown(65))
                                                  _x = _x - WalkingSpeed;
                              if(Key.isDown(87))
                                                  _y = _y - WalkingSpeed;
                              if(Key.isDown(83))
                                                  _y = _y + WalkingSpeed;
Also a quick note is it worked great in AS2 with a few differences but I was told to use AS3 and when I changed it over and rewrote a few things it no longer works, thank you once again.

Whenever you get errors, you help others to help you by including the complete error messages in your posting.  I cannot say for sure that the following line is a problem, but you can try changing it to see if an error goes away...
public class Shooter extends flash.display.MovieClip
change to
public class Shooter extends MovieClip
Then you will need to make some changes to update the code to be relevant to AS3.  The Key class does not exist in AS3, so all of your Key.isDown() code won't work.
Also, _x and _y are x and y in AS3
You're best bet will probably be to search Google using terms like "AS3 Keyboard move tutorial" to get the info you need to do what you want in AS3

Similar Messages

  • Probably incredibly simple question, so sorry. I have just changed e-mail after many many years and I want to e-mail everyone in my mac mail client with the new e-mail address at the same time.

    Probably incredibly simple question, so sorry. I have just changed e-mail after many many years and I want to e-mail everyone in my mac mail client with the new e-mail address at the same time.

    If you are using Address Book, open it, create a new Group, select all you contacts by click the top one while holding down the shift key and then select the last one. Drag the contacts to the group, then send an e-mail to the group.

  • Can anyone answer a very simple question for me ive heard the apple was giving a free iphone 4 or 4s bumper away is there any truth to that?

    can anyone answer a very simple question for me ive heard the apple was giving away iphone 4 or 4s bumpers is there any truth to that?

    Not any more, no. There was a free bumper program back when the iPhone 4 originally came out. It has long since expired.

  • Pro Tools convert to Logic Newbie some simple question for logic users

    Hey guys, I am a recent convert from Pro Tools! and There were just some simple questions I thought some of you may be able to help me out with. I am using Logic 9.1.1
    1) After I set up a multi timbral software instrument (in this case MOTU Symphonic Library) how do I set up midi channels to trigger the individual sounds in the instrument. (in pro tools I used to create a midi track then send an output of that track to that particular soft synth)
    2) How do I set up a and forgive my Pro Tools vocab but basically I want to set up a reverb channel on an aux track have it receive on a bus so I can send other tracks to that particular bus.
    Thanks for the insight and really looking forward to finally make use of all this ram! lol

    1) I have a nord stage and would like record via midi. In pro tools i would usually need to create a midi track with the output set the the nord and an audo aux track to hear it What would I do in order to record midi from my nord stage?
    To record, just select a non-audio track, hit record and play the keyboard. The notes will get recorded into a region.
    If you want to play it back to the Nord Stage as well, then it makes sense to set the Nord up as a MIDI device in your templates, so you can just add the Nord to a track and not worry about what MIDI ports it's on etc. Open the environment, create a New -> Instrument, called it "Nord Stage", set the MIDI port and MIDI channels it's on, and sav your template.
    Now, when you start a song, to sequence the Nord, you just assign the Nord instrument to a track (by for instance, right clicking on a track and choosing your Nord instrument from the list of environment obects that appears).
    2) The multi instrument trick is quick and easy its great but How would I do that manually?
    Lots of ways, look into your key commands, ther are all kinds of "Create track with same instrument", "Create track with next MIDI channel" and so on. There are too many ways to do this to quickly talk about here. In short, all tracks have an environment object assigned to them, whether it's an audio object, or a MIDI instrument object, and this determines where the data on the track goes.
    3) How do you set up midi so that it doen'ts overwrite notes when recording over them?
    Not sure I understand you here...

  • SOME SIMPLE QUESTIONS FOR ALL OF YOU

    hi,
    I have some questions for all of you.
    1. Oracle uses cgi (even asp!!! I've seen an asp page somewhere on an Oracle's site but this moment I don't remember where perhaps it is asp->cgi). Why ?
    Oracle doesn't support their techologies
    (Pl/SQL, Jsevlets,XML) ?
    2. Oracle says that has just released a
    new product for mobiles called "Portal2Go".
    I tried to install this product on NT with OAS 4.8.1.
    I had many problems during the installation and after many tries finally I did it(thanks God). but the problems continue...
    many Jsp errors (from the "tested" supplied apps). My question is:
    a. This product is in an early stage (many installation errors.. just a baby) and I think is stable for Sun Solaris but not on NT.
    b. You Oracle "experts" (i.e. oracle staff, NOT YOU guys) tell me ONE advantage to use you product (I'm an oracle developer for 6 years now):
    You say that I can PORT my existing app in any device and Web (through XML). This is a joke. Mobiles,PalmPCs,Web etc. have different requirements (content,display etc).The scope is different.. so this is absolutely FALSE (to use a boolean).
    This release is user unfrienlty. Why.. tell me WHY to pay for a product and for extra hardware (read the product technical reqs!!) to do the SAME THINK
    I do NOW with existing sources.
    I've developed an app for my company's employees using existing version of DB (8.0.5),pure pl/sql and a WAP GATEWAY.NOTHING LESS NOTHING MORE.
    please answer. Any comment welcomed...
    maybe I'm wrong maybe I'm not.
    PS.WHERE THE WAP GATEWAY/SERVER IS. I searced the cd and..nothing :-) ?
    thanks
    thanasis j.a.
    B.A. in Informatics
    M.Sc. in IS

    Portal-to-Go is a wireless portal server, the first version was released November 1999.
    The problems you describe that mobiles, Palm devices, etc all have different characteristics is one of the key reasons for Portal-to-Go. It allows any service to be displayed on any device by generating content in an appropriate format for specific devices. This way you can take into consideration the size of the screen, the display characteristics, etc.
    It is 'stable' on Solaris and NT, though it is true that the installation procedure of the CD is for Solaris only. The product is not currently available on OTN, so the installer restrictions should have been explained to you when you obtained the CD.
    Why Portal-to-Go? Here's three reasons:
    1. Inherent problems of the User Interface for a wireless device, so we provide a way personalise the UI to improve navigation and allow commonly used parameters to be saved as stored preferences through the portal.
    2. Differences in the characteristics between wireless devices make it hard to support all type without re-creating content and applications for each specific case. With Portal-to-Go, the same service can be accessed from any device.
    3. Lack of content available for WAP and other wireless devices. We have tools to quickly create wireless services from existing Web sites as well as an application platform for creating new Java or database applications for wireless devices.
    You are correct that the product does not have a WAP gateway.
    I'm not sure where you are located, but feel free to contact me offline. I can answer any specific questions, or get you contact with a local Oracle representative.
    At the moment, if anyone wants to obtain a copy of Portal-to-Go, you should contact your local Oracle representatives.
    Paul

  • Probably a simple question about using a flash header for navigation

    What would be the best way to go about loading this flash
    navigation?
    http://www.marcos-ac.com/wip/
    Basically my issue is that I don't want the animation to run
    through each time. On the homepage, I want it to run through it's
    whole animation, but after that, I just want everything to be up
    there... not flying in and fading in on each of the pages in the
    site.
    My ideas:
    1. Some sort of actionscript command that says "if you are on
    a page named index.htm then play the entire movie, otherwise, goto
    and play frame 100 (the last frame).
    2. Use a shell movie and do a loadMovie that they jumps to a
    frame. Insert the shell movie on the subpages in the site. I tried
    this an it didn't work. And I've read that it's unreliable because
    the label may not exist yet when the movie is called or something.
    Must be cached.
    3. Build 2 movies... one with all the intro animation frames
    chopped off. I tried this and didn't like it as the movie is
    already pretty huge and to load two movies that are large is
    annoying to users. This is the method I am currently using.
    Thanks for the help!

    The quick and easy way - not necessarily the most elegant way
    - to solve the problem is to use html frames. Put the nav in a
    header frame and have contents display in a second frame
    underneath. Will require you add a target="contentframe' (or
    whatever you name the content frame) parameter into each link in
    the nav flash, but other than that you won't need to make major
    changes.
    The nav plays once and just sits there until they reload the
    entire page the next time they visit. No actionscript, tests,
    preloading, etc required.

  • Simple Question for R/3

    Hi, Alls
    Question1, what roles and authroz. I need for CCMS alerts in R3 system and auto-reaction method seutp
    Question2, Will I have to configure SMTP first for CCMS (Auto-re-action method)
    Question3, Sould I need to change any profile for that ?
    Please give me simple answer not any URL thanks
    Thanks in Advanced

    Read,
    http://help.sap.com/saphelp_nw2004s/helpdata/en/90/4e313f8815d036e10000000a114084/frameset.htm
    regards
    Juan

  • Simple question for some--not me :(

    When would be better to use a switch statement and when it would be better to use an if statement.
    Can anyone point me to a program or some sites with both working?

    However, Switch statements can only be used with primitives and not objects.Do note that this has changed in recent Java versions. Here is the current statement from the Java Tutorial:
    "Unlike if-then and if-then-else, the switch statement allows for any number of possible execution paths. A switch works with the byte, short, char, and int primitive data types. It also works with enumerated types (discussed in Classes and Inheritance) and a few special classes that "wrap" certain primitive types: Character, Byte, Short, and Integer (discussed in Simple Data Objects ). "

  • Simple question for you

    Hi.
    I've got a labview program, but i need change something, but i don't know how.
    In attachement is a library and inside is my program in zzz.vi file.
    The program is working, but when I run it. the program ask about a file with data.
    And i need to change that, and it schould work like that:
    When i run this program i sholud do nothing. But when i push the big "OK" button
    the the program should ask about the file and do other procedures ??
    I;ve tried a lot of ways , but it is still not working correct
    Attachments:
    ag33xxx2.llb ‏1077 KB

    Place all your code (including the OK button) inside an event structure and set the event for "OK Button: value changed". That's it.
    If you want to keep the VI running and load a new file whenever the OK button is pressed, place a while loop around it and add an event for the stop button.
    See how far you get....
    (Ideally, you should also add some logic, for example if the operator presses the cancel button at the file dialog, you probably would want to skip the rest of the operations. If this is a subVI, you might also want to set it to "clear indicators when called".)
    LabVIEW Champion . Do more with less code and in less time .

  • Probably a Simple Question

    I was wondering if there was anyway that I could use garageband as a sort of a synthesizer for my guitar, but not just to record it but to have the sound play in realtime along with the rest of my band, so we can play together. I don't have an interface for all my instruments yet so I can only plug in one instrument at a time. Sorry for the poor english, I'm just not sure on how to ask the question. (I don't know the lingo!)

    Although more RAM is always a plus realtime FX are more dependent on cpu cycles. If your going to use your computer for this task you may want to make a account that is dedicated to GB or whatever you plan on using. Shut off as many background items as possible like bluetooth, airport, browsers, mail and whatever else your not using.
    I personally don't use my Macs for effects I have a good collection of Guitars, amps and effect pedals, boards and a M-audio blackbox. I have used Amplitube before and was very impressed with it but I'm sure there are cheeper alternatives. Play with GB and see if you can get it to work for you first before investing any money in something else.

  • Very simple question for a newb

    I'm working with the 3d camera but somehow when I'm moving in my 3d space, the camera place moves. I'm not sure what im doing wrong to move the camera. Anyway, how can I move my camera and keyframes together from the "Top" view?
    I've done it before, just dont know how.

    You actually answered your own question. Switch to Top view and sure you have record animation turned off . If you can's see the camera and the objects in the view, make sure nothing is selected and press F to fit all scene items into the viewport. If you have the proper overlays turned on, when you select the camera you will see it, and it's motion path. You can now use the adjust tool to click and drag the camera. The keyframes will follow.

  • Simple questions for Oracle XML Team - please respond

    1) Which class/methods should be used to obtain the content
    model (mixed-content or element-content) associated with each
    element declaration in a DTD? In other words, how do I know if a
    particular element can have child elements and/or data in a
    valid XML document, the frequency each child element can appear
    under a particular element, and whether a sequence list or a
    choice list was used to declare the element?
    2) Do you have any bug reported so far for this part of Oracle's
    parser made available in the last released?
    Thanks,
    Renilton
    null

    Renilton Oliveira (guest) wrote:
    : 1) Which class/methods should be used to obtain the content
    : model (mixed-content or element-content) associated with each
    : element declaration in a DTD? In other words, how do I know if
    a
    : particular element can have child elements and/or data in a
    : valid XML document, the frequency each child element can
    appear
    : under a particular element, and whether a sequence list or a
    : choice list was used to declare the element?
    Look at oracle.xml.parser.v2.ElementDecl class and then
    getContentType and getContentElements methods.
    : 2) Do you have any bug reported so far for this part of
    Oracle's
    : parser made available in the last released?
    : Thanks,
    : Renilton
    Each release contains a list of bugs fixed. Is there a
    particular bug you are interested in?
    Oracle XML Team
    http://technet.oracle.com
    Oracle Technology Network
    null

  • COWBHUWE : simple question for experts

    How can I have HU in HU proposal for an order ?
    What are the previous step ?
    I tried to create HU for my material but they don't appeared in the list.
    Regards.
    Christophe

    Hi Christophe,
    1.You have to Created Packing Instruction for a material in POP1 transaction
    2.The in the Material master Basic data you have to assign the Packing Material group for both the header material and the packing material. Both to be in same packing material group.
    3.The use tcode COWBPACK for creating the packing with Handling units
    4.Then use tocode COWBHUWE to make the receipt.
    Thanks and regards
    Murugesan

  • Palm Pixi simple question for the pros

    How do I block my wireless number from being displayed on an outgoing call, or can it be done?
    Post relates to: Pixi p120eww (Sprint)

    Hello!
    If im interpreting this correctly, you want your number to not be displayed on people's caller ID.  In those cases, 2 ways to do this.
    1.  Use *67 to block calls.  On your phone, dial *67, then whatever phone # you want and dial.  Would need to do this for every call you want you number blocked.
    2.  Contact the carrier to put a block on your #.  Afterwards if you want your # visible, just dial *87 then the phone #.

  • Simple question for a kt4av

    V.Simple this one, will a Cooler master 7 fit OK on this board ??

    Coolermaster Aero 7 lite
    Coolermaster Aero 7 +
    Coolermaster Jet 7
    They will fit.
    I bought the Aero 7+ and I am very disappointed with it. I noticed that my temps were a bit high so I swapped it with my old Xdream heatsink and the temps were lower.
    Looking at some reviews and it turns out the aero 7 lite is better.
    http://www.cooltechzone.com/reviews/cooling/coolermaster_aero_7_lite_7.html
    http://www.bjorn3d.com/read.php?cID=315&pageID=435

Maybe you are looking for

  • Aperture book quality - worse than before?

    Hello everyone, My photo studio has been using Aperture for 8 months now and we are very happy with it. We love the organization, web output, etc. We also LOVE the book design layouts, but the quality of the book printing has been degrading over that

  • IPhone 6 Shuts Off at 50% Battery

    I just upgraded from the iPhone 4S and have only had my iPhone 6 for 2 weeks and already seem to be having problems.  I am not a rich person and cannot afford to be buying a new phone every time this on fails me.  I, like most people, use my iPhone a

  • Exporting PCA Reports to Excel

    This question is in regards to the report: PCA Report Profit Center Grp: Plan/Actual/Variance - Tcode S_ALR_87013326. When exporting this report to a spreadsheet I'm getting different results in my development environment vs. my production environmen

  • Hide columns in ALV grid?

    Hi all, I define a structure in the ABAP dictionary. I declare a table of that type in my program. I populate the table with records. I then display the table of data in an ALV grid. I hide three fields in the grid when I build the field catalog. Whe

  • Error when trying to download on iphone 5

    account not in this store on iphone, it say's it's looking in the French store.  However, I am in the U.S,A, I've looked in Itunes under account settings to no avai other than the country setting witch was already set to US.