Daniel Dura

All About the Adobe Flash Platform

Flash IDE Tip

with 20 comments

Every day you learn something new. ANd the one I learned today is the best yet. If you are addicted to code hints, but not to fond of the Macromedia provided suffixes (ie _mc, _pb, _txt, etc.) then there is a VERY quick way to change this, right from within the Flash IDE, as you are coding.

Lets say that you want to create a new XMLObject. But, you do not want to use the ‘myvar_xml’, you want to call you new XML Object ‘xmyvar’. To be able to see the Code Hints, add this comment above your code:

//XML xmyvar;

And you are done! Basicall the syntax is below, and make sure not to forget the semicolon at the end.

//Object variablename;

Thats it. Now, maybe I was on the dark side of the moon or something, but I did not know about this, and now really wish I had. And also, let me thank Chafic Kazoun for this one.

Written by Daniel Dura

May 29th, 2003 at 8:39 am

Posted in Uncategorized

20 Responses to 'Flash IDE Tip'

Subscribe to comments with RSS or TrackBack to 'Flash IDE Tip'.

  1. sweet. thanks for that great tip!

    tg

    29 May 03 at 8:53 am

  2. Actually the credit belongs to Tom Muck http://www.flash-remoting.com/

    Chafic Kazoun

    29 May 03 at 9:43 am

  3. You can also edit the XML file where the suffix triggers are defined. You can either replace the existing ones or make new ones. By doing this you can also use prefixes instead of suffixes. However none of these niceties are enough rationale to use the IDE instead of an external text editor, which can give you easier version control of your code plus regular expression support, the ability to search and replace among files, etc.

    Charlie

    29 May 03 at 9:47 am

  4. Yeah, editing the XML files is a little bit more powerful, but utilizing this method is much quicker, and actually makes reading the code a little bit easier for those who are not familiar with your particular conventions. But yes, using XML files is definitely more powerful.

    Daniel Dura

    29 May 03 at 10:09 am

  5. Just want to point out, that you can find a summary about using code hints in the Flash MX Help under:

    Writing Scripts with ActionScript -> Using Code Hints

    It also has the standard suffixes listed.

    Ralf Siegel

    29 May 03 at 4:15 pm

  6. i would say its still nice work, as i am using Flash Mx for last 1 year and never bothered to see in help files for another way of code hinting etc.
    infact i never thought of another way!

    thanks for letting us know another way to do things. :)

    Abdul Qabiz

    31 May 03 at 12:15 am

  7. i would say its still nice work, as i am using Flash Mx for last 1 year and never bothered to see in help files for another way of code hinting etc.
    infact i never thought of another way!

    thanks for letting us know another way to do things. :)

    Abdul Qabiz

    31 May 03 at 12:15 am

  8. While this technique is certainly time saving it appears to only apply to built in objects. Try dragging a component, ComboBox for example, to the stage and test that…

    I attempted: // ComboBox myCombo; & // FComboBoxSymbol myCombo; and neither work, the _cb suffix of course does.

    Andrew Muller

    31 May 03 at 9:31 pm

  9. Have you tried FComboBox?

    Daniel Dura

    31 May 03 at 10:05 pm

  10. FComboBox works, that’s full of nanna goat sweetness!!

    Important thing is also to have the “;” at the end of the declaration, eg. // FComboBox myCombo;

    Andrew Muller

    1 Jun 03 at 9:56 pm

  11. Question on your banner. Where did you learn how to combine an image, and the background TD image? I would like to try that, but am not sure how to make sure they are the same size with the little line in the bottom. What did you use to create those two pieces?

    Thanks
    Mathias

    Mathias

    2 Jun 03 at 7:31 pm

  12. I wish it was that complicated :) It is actually just one image.

    Daniel Dura

    3 Jun 03 at 8:59 am

  13. No it’s two.

    The main image
    http://www.danieldura.com/images/banner.gif

    And the rest of the background stretched across a 100% wide table with a little black line at the bottom
    http://www.danieldura.com/images/bannerback.gif

    Mathias

    4 Jun 03 at 9:11 pm

  14. Any chance someone knows how to make this work with a wildcard?

    //XML xml*;

    xmlMy = new XML();
    xmlMy.[hints]

    the * doesn’t work… it would be nice if it did tho’

    Paul

    5 Jun 03 at 12:33 pm

  15. Mathias,

    Im sorry, I didn’t fully understand your question at first. Yeah, I basically just created two images, the image with the background, and then a gif of just the background. I then set the gif of just the background as the background of the TD. If you go and View Source, you can probably get a better idea of how it works. Feel free to email me if you like also.

    Paul,

    I tryed numerous times, but could not get wildcards to work either. I think it would be a GREAT addition though if in the next version of flash they did include support for them.

    Daniel Dura

    5 Jun 03 at 11:10 pm

  16. Online Flexeril, flexerilis used to treat the pain and stiffness of muscle injuries, including strains, sprains and muscle spasms.Buy Flexeril, Cheap Flexeril Now or visit this site: http://www.online-flexeril.com!

    flexeril

    18 Apr 04 at 7:49 am

  17. Dating and picture personal dating ads services for singles looking for love, romance, dating dates pen pals or relationships. Personals for the online dating and singles community. Post Your Free Dating, Singles, Picture Personal ads today. Visit us to chat with singles, look through personals, and read up on all the hilarious and heart-rending tribulations of dating service and romance today. http://www.dating-free-dating.com

    dating

    11 May 04 at 7:53 am

  18. An apple a day keeps the doctor away. (c)

    Robert

    13 Jun 04 at 7:02 pm

  19. Thank you.

    mattress toppers

    22 Feb 05 at 6:59 pm

  20. pmg mentors

    13 Apr 05 at 4:23 pm

Leave a Reply