Using code templates in Flash Builder

Hi, all;
I know how to change most of the templates so that they go from the default "uncuddled" brackets to "cuddled"
i.e.
public function notCuddled():void
     //TODO
vs.
public function cuddled():void {
     //yay! no wasted space
However, I have not found the template used for the constructor for a generated Class, so I get:
package my.package {
     public class MyLovelyCuddledClass {
          public function MyLovelyCuddledClass()
          {//wasted line that I have to manually fix
I love the new productivity enhamcements in FB 4.5, and they are so great that little nitpicks like this stand out.  Can anyone tell me where I can find the template that is used for this, so I can code to the fullest potential of the tool?
TIA;
Amy

Hi Amy,
You can customize 'New class' generation under Preferences->Editors->Flash
Builder->FileTemplates->Action Script->New ActionScript class.
Currently there are no template variables available constructors. But you
can customize it as following,
$
${import_declaration}
$ {
  public function ${class_name}() {

Similar Messages

  • How can use Chrome System in Flash Builder

    i have a problem with flash builder (Gumbo).
    in fact i can't use system chrome in flash builder beta.(after changing .xml file)
    please help me

    Thru ExternalInterface you can use it

  • I can't use my license key Flash Builder 4.5 with this release. Someone can help me ?

    I can't use my license key Flash Builder 4.5 with this release. Someone can help me ?

    Hi,
    Flash Builder 4.5 serial number will not work directy in Flash Builder 4.7. You can use FB 4.5 key in upgrade scenario (upgradation from FB 4.5 to FB 4.7).
    Please use the Flash Builder 4.7 serial number provided at http://www.adobe.com/cfusion/entitlement/index.cfm?e=labs_flashbuilder4-7  for serialing Flash Builder 4.7.
    -Mugdha

  • Slow Code Editing in Flash Builder 4.7

    For some reason my Code Editor works painfully slow. I see that other folks have experienced this issue. I don't want to switch to another IDE. I have already increased the values of Xms and XMX (Xms1024m -Xmx2048m) and also created a new workspace but it did not make a difference. Other appliations work fine. I am using a i7 laptop with 16GB of RAM.
    FB was working fine and then all of a sudden started to slow down. I believe that it happened after I  installed Apached Flex SDK but I am not positive. I have other IDEs that I use for testing things so that might be a problem as well. I would like some help to fix the slow code editing because it is making it difficult to use FB and I don't want to change.
    I have Creative Cloud account.
    The size of the project is 19mb.

    Hi Blake,
    In another page (http://forums.adobe.com/thread/1056583), Adobe states that it will be possible to download 4.6 in alternative to 4.7, to still have the Design View. However, I have not seen such possibility yet.
    I will not say that "real programmers don't use design mode". They do, if it works fine.
    However, the Design View was not very useful for mobile projects, if you wanted to create an interface which, at run time, adapts to different screen estates.
    It was very good to draw an initial mock-up, but only the simulator (and the device) can say how the app really looks like (if you want to know more, please have a look here: http://aliencoding.com/2013/02/22/adobe-flash-builder-4-7-has-no-design-view-is-it-blasphe my-no-but-the-software-contains-some-other-blasphemous-aspects/).
    If you develop for desktop, then I agree the Design View lack is a real drag. I think Adobe should at least lower the price of the program, now that it's been scaled down for (I think) copyright issues (the Design mode relies on Flash professional components that was not donated to Apache).
    I love this platform because it really saved my butt in cases of real fast devployment, BUT NOW it lacks support for Windows 8 that PhoneGap has...
    Can we say... it is a legacy framework by now? 

  • Using dynamic text in Flash Builder

    Hi,
    I'm trying to get some dynamic text to my web page. The text is readed from .txt file
    I use AS script which i was using in a project I made with Flash Pro and now i try to implement it in Flash Builder project
    The script look like this:
    var req:URLRequest = new URLRequest("design_1.txt");
    var loader:URLLoader = new URLLoader();
    function textLoaded(event:Event):void
    design.text = loader.data;
    loader.addEventListener(Event.COMPLETE, textLoaded);
    loader.load(req);
    So first I made a project with Flash Catalyst and in there I created an area text element. Then I imported the project to Flash Builder and put the AS script in the <Script> section and gave the <RichText> an id="design".  The text is just simple text and formatting happens in richtext element.
    So, when i try to compile the FB project it give me and parse error "undefined property error req", "undefined property error loader" etc.
    So should i alter the AS script for FB or is there something else wrong? I tried to google how to use dynamic text in FB but couldn't find any easytyutorials. I'm mostly a desginer so coding isn't my speciality. But thanks for help!

    Hi Amy,
    You can customize 'New class' generation under Preferences->Editors->Flash
    Builder->FileTemplates->Action Script->New ActionScript class.
    Currently there are no template variables available constructors. But you
    can customize it as following,
    $
    ${import_declaration}
    $ {
      public function ${class_name}() {

  • Use native plugins with Flash Builder 4.5?

    Hello,
    Is it possible to extend Flash Builder 4.5 to have native plugins?
    My use case is: we have developed SDKs for both iOS and Android where we have extensive signal processing implemented in C. On Android we use JNI to access and run the native code. That's done for performance reasons since real time is a requirement.
    Some other tools like Appcelerator Titanium support native modules (e.g. http://wiki.appcelerator.org/display/guides/Module+Developer+Guide+for+iOS)
    Is it possible to do the same with FlashBuilder? Or the only way is to develop in ActionScript? What are the benchmarks for typical video, audio signal processing (e.g. through classical domain example (filtering))?
    Thanks!
    Greg

    Hi,
    Flash Builder 4.5 serial number will not work directy in Flash Builder 4.7. You can use FB 4.5 key in upgrade scenario (upgradation from FB 4.5 to FB 4.7).
    Please use the Flash Builder 4.7 serial number provided at http://www.adobe.com/cfusion/entitlement/index.cfm?e=labs_flashbuilder4-7  for serialing Flash Builder 4.7.
    -Mugdha

  • Code lookup issue Flash Builder 4 B2

    Had this issue before with flash builder 4 beta 2 where the code look up will not work
    While working thru Day 4 EX 4.1
    "Using code lookup to generate the click event will present you with the Generate Click Handler option in the code lookup window (see Figure 4). Click the option or press the Enter key to use the option to generate a function."
    Have no problem seeing the code look up for the <s:Button> however once I get the click will not show code look up for Generate Click Handler window.. is there a way to get this to run.. to move foreward with the exercise I just wrote out the code..is there a way to trigger the code look up?

    Mark - so you see click in the drop down and you select it so that your code now says:
    <s:Button click="" />
    and the code lookup now shows "Generate Click Handler" between the click double quotes?
    What happens if you place your cursor between the double quotes in the click event and type ctrl+spacebar?
    Can you share a screenshot of what's happening?

  • Java could use code templates.

    Hi,
    I have often wondered why Java does not have a facility for code generation. It could be simple, like templates. For example, I am tired of writing getter and setter functions that do nothing but return or set the value of a member field. What I would like to see is something like a preprocessor but more powerful. Here is some sample code:
    (Template definitions)
    <template name="get">
    public <value ref="type"/> get <value ref="name"/> () {
    return this.<value ref="name"/>;
    </template>
    <template name="set">
    public void set <value ref="name"/>(<value ref="type"/> in) {
    this.<value ref="name"/> = in;
    </template>
    (Template uses)
    <use template="get" name="customer" type="string"/>
    <use template="set" name="customer" type="string"/>
    (Resulting code)
    public String getCustomer() {
    return this.customer;
    public void setCustomer(String in) {
    this.customer = in;
    This could have applications for generating code for connecting to JDBC databases as well.
    -mephtu

    mephtu wrote:
    Hi,
    I have often wondered why Java does not have a facility for code generation. It could be simple, like templates. For example, I am tired of writing getter and setter functions that do nothing but return or set the value of a member field. Then one or both of the the following is true.
    1. You are over using setters/getters
    2. You are creating boiler plate code anyways so learn how to generate code and start doing that (that is NOT the same as templates.)
    >
    This could have applications for generating code for connecting to JDBC databases as well.I have been using code generation since about the time java first came into existance. And that was about the time when templates first gained wide acceptance (using different implementations) in C++.
    Templates are not needed for code generation and actually there isn't any point since one certainly doesn't need to worry about typing.

  • BlazeDS service introspection/code gen in Flash Builder

    The data-centric development features in Flash Builder support introspection of BlazeDS/LiveCycle Data Services destinations. You can use a wizard to introspect a remoting or web service destination and generate client-side proxy objects for working with the destination. For more information on using these features, see Building model-driven applications in the developer guide for LiveCycle Data Services 3 beta 1.
    Note: To use these features, you must have Flash Builder 4 Beta 1 and BlazeDS 4 Beta 1.

    Hi,
    Thanks for your feedback!
    This feature has been going through a lot of changes with the BlazeDS and Flash Builder builds.
    We request you to pick up the BETA2 build of Flash Builder and BlazeDS 4.0.0.10654, hopefully you should see things working fine.
    Kindly let us know if you still encounter problems.
    Thanks,
    Balaji
    http://balajisridhar.wordpress.com

  • Using multiple locales in Flash Builder 4.7

    Is there a known issue in FB4.7 adding multiple locales in the compiler arguments?
    I'm trying:
    -locale fr_FR,en_US
    ...but it looks like FB is trying to find a single locale with the name 'fr_FR,en_US' rather than the pair:
    unable to open '/Applications/Adobe Flash Builder 4.7/sdks/4.10.0/frameworks/locale/fr_FR,en_US'
    Thanks,
    Simon

    D'oh! Fixed with this syntax:
    -locale=en_US,fr_FR -source-path ./locale/{locale}
    Simon

  • Using Project Monocle with Flash Builder

    This question was posted in response to the following article: http://help.adobe.com/en_US/flashbuilder/using/WSe4e4b720da9dedb5-4798e7bb139e879b36f-8000 .html

    Here is the link: http://www.adobe.com/devnet/flashruntimes/articles/adobe-scout-getting-started.html

  • Link File Using Code in Flash Builder

    Is there any way  to link to a file on a local drive rather than a url by using action script in Flash builder? For example is there a type of "file request" instead of "url request"  command I can use?
    Thanks,
    SN

    Hello Susan;
    I don't know if this helps, but I was having code hint issues also, here is the link to the discussion.
    http://forums.adobe.com/thread/553610?tstart=0
    John

  • Flash builder 4.5 code completion doesn't show public function

    Hi,
    I am migrating from flex3 to flash builder 4.5 and it shows a question mark at one of my lines.
    No errors, and the code works fine when i run it.. only there is no code completion in flash builder.
    My code:
    //i use a custom component like this:
    <generalmenu:menu x="59" y="58" id="mymenu"/>
    //this component loads its functions from a separate as(no class just simple as code) file (so i don't have all code in the file with visual components)
    <fx:Script source="menusource.as"/>
    //inside menusource.as there is a function that takes care of closing my app.
    public function closeprogram():void
         //closing window goes here
    my problem..
    when i type inside my function at application level:
    mymenu.closeprogram();
    i get a question mark in front of it: Call to a possibly undefined method closeprogram
    code completion doesn't recognize my public functions inside the mymenu component, it does see mymenu but when i hit .(dot) it doesn't give me a list of functions.
    How can i get code completion to work? Are there changes in the way you call as files in flash builder 4.5? Please some help.. code completion makes life much better.

    I found why the nasty behavior above was happening ::- D.
    I usually design my classes in Enterprise Architect. Since this is a rather large project, started from of about 30 classes, I did the entire architecture in EA, then, generated the code.
    But, EA has poor AS3 support. And as a consequence, it has a few issues, such as the way it generates CONSTRUCTORS:
    public function G3Widget (name: String, parent: IG3Parent = null): void
    Spot the mistake ::- D.

  • Using TransformGestureEvents in Flash Builder

    Hi all,
    I  am trying to use the TransformGestureEvents to allow interaction inside  of a FLARE based application. I want to create a data visualisation app  with touch interaction.
    I have Flash Player 10.1, which  is needed for these classes, as i have already used them in a Flash CS5  test project, and i worked great!  But when i try to import the  transform gesture events, an error appears saying:
    1172: Defination flash.events:TransformGestureEvents could not be found.
    Has anyone got any idea how i can use TransformGestureEvents inside of Flash Builder?
    Any advice, is deeply appreciated!
    Thanks in advance

    Thanks for your reply!
    I am using flex 4.0 SDK and flash player 10.1.
    Since then i have tried to use the adobe air 2.5 SDK because I read somewhere that it included Touch events. I have tried to overlay the AIR SDK into my Flex 4.0 SDK folder and it doesn't seem to have worked. I am using a mac and the documentation out there to do this , isn't exactly straight forward and ive followed the instructions, but no success. Im really surprised that Adobe have not released a flex SDk with Touch events include, i mean it seem dumb not too!?!?
    Maybe if i gave you more of an insight into what i want to achieve, this could help.
    I want to use flash builder to create a search for a series of media API's (e.g Spotify/Last.FM or YouTube) the user would search for what they want and the results would be displayed in a Radial Tree Layout using the FLARE library to construct the visualisaton and I wanted to use Gestures to enable the user to navigate around the results, (ZOOMING, SELECTING, etc). I have thought about using OpenFrameworks to do this, but I would prefer to use FLASH.
    I am creating this project for my Final Degree!
    Any advice on this, would be great.

  • Using Flash Builder 4.5 to develop for Air for TV?

    How can I target Adobe Air 2.5 when using Flash Builder 4.5 so I develop for Adobe Air for TV?
    When I change the app.xml file to point to 2.5, I get the following error:
    "Namespace 2.5.0 in the application descriptor file should be equal or higher than the minimum version 2.6.0 required by Flex SDK."

    I was finally able to get my app on a Samsung TV. Here's some more info on this subject. You actually have to overlay the Air 2.6 SDK - not the 2.5 SDK.
    Also make sure when you finally package the TV app to change the application XML to point to 2.5,. During development you can leave it as 2.6.
    @see http://learn.adobe.com/wiki/display/airquestions/AIR+for+TV
    What tools do developers use to create AIR 2.5.1 apps for TVs?
    Developers can use the following tools:
    AIR 2.6 SDK
    Flash Professional CS5 Extension for AIR 2.5 (now an integral feature in Flash Professional CS5.5)
    Flash Builder 4.5
    Note: Developers can use the AIR 2.6 SDK for developing apps for AIR 2.5.1 for TV. In Flash Professional, set the publish settings to Adobe AIR 2.5. In Flash Builder, set the AIR namespace to 2.5 in the app descriptor file:
    <application xmlns="http://ns.adobe.com/air/application/2.5">.
    If you are using Flash Builder 4.5, you must do the following:
    Download the Flex 4.1.0.16076 SDK.
    Download the AIR 2.6 SDK.
    Copy each file from the AIR 2.6 SDK into the corresponding directory within the Flex 4.1 SDK, replacing the Flex original variants.
    To use this SDK within Flash Builder, select your project in the Flash Builder package explorer.
    Choose Project > Properties to open the project's Properties dialog box.
    Select Flex Compiler in the list and then click the "Configure Flex SDKs" link to open the Preferences dialog box.
    Click the Add button, browse to the SDK, and then click OK until you get back to the project's Properties dialog box.
    Click the "Use a specific SDK" option and then pick Flex 4.1 from the drop-down menu.
    You must also replace the default WindowedApplication element with Application in your project's MXML file.

Maybe you are looking for

  • Would Really Appreciate some Help

    Hello, basically I'm having a problem that's driving me absolutely mad. I'm trying to save an array of Customers ("Customer" being an object) to a file called "cust.txt". The Customer object consists of the name of the customer and I would like the f

  • Case of schema names with code insight

    I'm running SQL Developer 3.0.04. I want my SQL statements to be of the form "SELECT * FROM schema.table" but I can't seem to find the right code insight option to make this happen. There seems to be a way to make everything lowercase (including keyw

  • PrObLeM WiTh IpOd pLaYiNg ViDeOs WiTh No SoUnD!! HELP ME!!

    i have a ipod nano 8gb 3rd generation i just got a couple of weeks ago. i got it, read the directions, got the latest downloads, loaded itunes, put my music, videos, everything on itunes, and connected my i sync all of my music on mai ipod with no pr

  • Facebook posting with iPhoto

    I've posted a couple albums to Facebook using iPhoto '09 and it works great. My only problem is it doesn't tell my friends under "news feeds" on Facebook that I've uploaded new photos. This defeats the purpose of posting the photos if nobody knows to

  • Fireworks frozen after sleep Mac OSX 10.6

    Whenever I return to Fireworks after the computer has been asleep, fireworks is busy doing something for between 5 and 15 mins before I can use it. I can force quit but sometimes I have unsaved changed or I'm unsure if there's anything I don't want t