Skip navigation
Currently Being Moderated

Flash CS6: Code hinting doesn't work in AS3 document

Jun 22, 2012 2:13 PM

Hi,

 

For some reason code hinting is not working at all in an AS3 class document in Flash CS6. It works fine on the timeline. For instance:

 

1. Create a new AS3 class, name it "MyClass"

2. Save the doc immediately (in CS5 code hinting would not work until the class file was saved)

3. After "class MyClass" I type " extends Movi" and press Ctrl+Space, expecting to see hints for "MovieClip" etc like it did in CS5. In CS6 I get nothing. If I type out the whole word "MovieClip" and press Ctrl+Space I still get no hints.

 

What might be wrong?

 

Thanks!

 

Aaron

 
Replies
  • Currently Being Moderated
    Jun 23, 2012 5:24 AM   in reply to abeall

    What helped me was making sure Flash CS6 was up to date (help->Updates...).

     

    Then I went to Edit->Preferences->ActionScript and I unchecked and then rechecked Code Hints and changed cache from 800 files to 3000 files (delay of 0). I presume because there just are so many classes it might run out of memory before getting to all of them. 3000 might not even be enough.

     

    I then went into a frame script and typed: class myClass extends Movi(CTRL+PERIOD) and it offered completion options.

     
    |
    Mark as:
  • Currently Being Moderated
    Jul 6, 2012 5:01 AM   in reply to abeall

    Code hinting works on classes that are "known" in your context. Adding in a source path won't be enough like it is for Flash Builder. You typically need to import the class first. If you import it in Scene 1, frame 1 and then dive into a MovieClip, the completion may not even be available there unless you put another import statement inside the MovieClip. I agree, the completion needs some help.

     

    If you're just using the built-in AS editor on class files (not frame scripts) you should try the free FlashDevelop app which has excellent completion.

     

    You'll get MUCH better completion if you use external packages and classes. The built in ActionScript panels completion needs some enhancements in frame scripts on the timeline but it's much better when editing pure external .as files.  Though I'd never use it over FlashDevelop. Nor would I use FlashDevelop over Flash Builder.

     
    |
    Mark as:
  • Currently Being Moderated
    Jul 6, 2012 7:16 AM   in reply to abeall

    The presence of package {} is enough for the editor to know if you intend AS2 or AS3 as there is no support for packages in AS2.

     

    Between the great code completion, project manager, class outline view and IDE integration I think it's worth a second look. It entirely depends on how complex your project is if these features are invaluable to you or not. It shouldn't be too annoying as a Flash IDE project will launch your FLA directly from FlashDevelop so you don't need to flip between them while coding and output is captured in FlashDevelop.

     

    I use FlashDevelop quite a bit outside AS. I use it to edit XML and text files with specific encodings when I do language translations. It does a very good job of handling other situations. I guess that's why I keep it around.

     
    |
    Mark as:
  • Currently Being Moderated
    Jul 7, 2012 9:36 AM   in reply to sinious

    FlashBuilder is much better these days, and if you have Flash Pro, you should already own it.

     

    On another note: I find that sometimes these thing happen because either the FB or FP project has "issues." If you're using a FP project, you could try deleting the project but leaving the files, then recreating the project.

     
    |
    Mark as:
  • Currently Being Moderated
    Aug 8, 2012 6:36 AM   in reply to abeall

    Hi Aaron,

    You are right that for Code Hint to work

    1. You have to have the .as file in the associated .fla's class path

    2. Associated .fla file should be saved

    3. Associated .fla file should be opened

     

    Thanks!

    Mohan

     
    |
    Mark as:
  • Currently Being Moderated
    Oct 16, 2012 1:54 PM   in reply to abeall

    The reality is this.  Code hinting for AS3 does not work in CS6 without much more input than was necessary in CS4.  I was able to get it to work once and that is it.  If anyone at Adobe can respond to this with an actual fix it would be greatly appreciated.  I have posted symilar responses but no one at Adobe can give a solid answer.  I have tried everything posted here and on several other sites wtih no luck in fixing the problem.  It has left me to use CS4 then open it in CS6 if I need to utalize any of its features.  Please post something that actually fixes the problem without having to go through more than 20 steps to resolve an issue that was clearly not present in CS4.

     
    |
    Mark as:
  • Currently Being Moderated
    Oct 18, 2012 8:32 AM   in reply to seamus68

    I know you're very happy with editing code in the Flash Pro IDE but have a look at the video on "AS3 Signals Tutorial" in this blog. Not only will you learn something but he's using FDT in Eclipse to edit and run AS3. Notice how fast he can write code due to the completion abilities (auto-generate imports, functions, properties, etc). The color choices he made are another flexibility although I'm not a huge fan of his color choices, but that isn't the point.

     

    http://pv3d.org/page/2/?s=rsjfdqoyiil

     

    Aside being a great tutorial on a good concept (signals) I think it illustrates how moving to a different code IDE can benefit you greatly in speed. I haven't edited AS in Flash Pro since pre-MX. FDT/Eclipse is free, btw. So is Adobe's FlashBuilder Standard if you're unemployed or are a student (thanks Adobe!).

     
    |
    Mark as:
  • Currently Being Moderated
    Oct 18, 2012 12:45 PM   in reply to abeall

    Sinious, I don't think you understand... or maybe it's me.what you are saying is that if I create an animation or website or any of the other things such as games, I am to try to create actions for the multitude of symbols and tweens and everything else that really fules a project in another program?  I've looked at what you suggested and I don't think you understand.  I've tried flash builder but if there is a way to associate code directly from it to symbols on the timeline I haven't been able to find it.  To better understand the issue create a short flash project and try to code it in cs6.  Please keep in mind that not all flash users can code from memory and to have to now learn and utilize another piece of software is just not feezable.

     
    |
    Mark as:
  • Currently Being Moderated
    Oct 18, 2012 6:33 PM   in reply to seamus68

    I do tend to think in coder terms a great deal more than designer so that's where we may have a hiccup.

     

    The original post was about code hiinting not working. The video was showing a free tool to write code in that not only is excellent at code hinting, but also auto-generates functions, import statements and colors code any way you like it. That's what you wanted, and a whole lot more.

     

    To answer your statment about coding outside the flash timeline in an external file and that code having access to objects on your timeline, the answer is it absolutely does. Keeping your code in external files not only lets you choose a different IDE to edit code in but also centralizes code so you don't need to skip around a timeline to find it. When your game is complex, this is essential.

     

    Here's a couple very simple examples to illustrate this. One uses a document class, one imports a class and uses it. Both of them gain access to the main timeline where a premade blue square with an instance name exists. They both animate the square slowly across the screen.

     

    http://www.ertp.com/tmp/ExampleExternalClass.zip

     
    |
    Mark as:
  • Currently Being Moderated
    Oct 18, 2012 6:48 PM   in reply to abeall

    OK I need to make this as simple as possible.  Here is a scenario. 

     

    I'm in an actionscript 3.0 project in flsah.  I create a box convert it to a symbol and name it box.  I then give it an instance name box_mc and I want to add action script to it.  I go into the actions pannel and type in box_mc.  and nothing I can't even click on the code hints button as long as box_mc. has the (.) operator.  In fact to get any code hints to come up I need to change the dot to a comma.  I really appreciate your help but your missing the point.  I don't know how to interface flash with flash builder I've looked at some videos but I'm not keen on all of these extra steps.  By the way the example you sent was again appreciated but not helpfull.  I can code simple things like this if I need to but I don't have the time to go through all of this to acheave something that worked perfectly in a previous verson.  Your example doesn't show how flash interacts with a different IDE so I'm not really sure what it was for.  Thank you though.  If you work for Adobe perhaps  you could let me know how to simply get code hints to work in flash CS6 that is all I want to do.  I was speaking wtih a teacher at a local college in town and his students are livid that they can't practice and learn the way they could with cs4.  Again thank you for your help.  I'm going to try to get this to work somehow.

     
    |
    Mark as:
  • Currently Being Moderated
    Oct 19, 2012 9:32 AM   in reply to seamus68

    I do not work for Adobe, just a fellow forum dweller.

     

    The example was made quickly because you said this:

     

    I've tried flash builder but if there is a way to associate code directly from it to symbols on the timeline I haven't been able to find it.

     

    Now you know how.

     

    I'm sorry but I don't even have Flash CS6. I still use CS5.5 because I use Flash Builder 4.6 for everything I do. I merely use Flash Pro to generate quick libraries full of goodies and export a SWC to use in Flash Builder.

     

    I realize it's obvious but you did ensure your preferences had hinting both enabled and the delay set low (or zero)? I can only show you a CS5.5 preference panel, I'm not sure if it's the same. Note one important thing in this photo which is "Cache size". I have mine on 800 files which seems to be fine. If you're pointing toward a HUGE library of classes you may want to increase that number and check completion again.

     

    prefpane.JPG

     
    |
    Mark as:
  • Currently Being Moderated
    Oct 19, 2012 2:45 PM   in reply to sinious

    It still does not work.  I have tried this but to no avail.  I really appreciate the reply but it just does not seem to work for me.  By the way if I came off as rude I truley apologize.  I guess the questions regarding the code hinting are comming from a point that is prior to trying flash cs6 I didn't have to know what a class file was I just created a symbol and programed it.  Most of us learning flash and as3 aren't used to having to understand anything other than typing i.e. blue_mc. and getting code hints that guide us in the right direction.  I do really appreciate all of your help and solving the problem has made me want to learn scripting even more but for now I will have to work in cs4 until Adobe "fixes" or implements a "better" way for non developers to learn and use Flasn.  Again thank you.

     
    |
    Mark as:
  • Currently Being Moderated
    Oct 22, 2012 6:04 AM   in reply to seamus68

    If you did what I mentioned in the second post (when I was trying the CS6 trial) via unchecking and checking hinting and it still doesn't work on the timeline you might, lastly, want to reconsider a reinstall. The time lost on things like this makes the time it takes to just reinstall Flash seem very small. If that doesn't help, you're really up a creek without a paddle ><.

     
    |
    Mark as:
  • Currently Being Moderated
    Nov 13, 2012 2:29 PM   in reply to abeall

    I have the same problem!  I have already followed the suggestions to uncheck the code hint and re-check.  Changed cache size from 800 to 3000 files.  However, the code hint still doesn't show up.  Any other thoughts to make it work?

     
    |
    Mark as:
  • Currently Being Moderated
    Apr 11, 2013 5:47 PM   in reply to abeall

    Not sure if this will help you guys,

    I've tried to create new .fla and reset the cached

    folder mentioned above and everything works just fine for me!

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points