| Home | Tutorials | Forums | Articles | Blogs | Movies | Library | Employment | Press | Buy templates |
|
|
#1 |
|
Registered User
Join Date: Aug 2007
Posts: 17
|
I'm just setting out learning actionScript. Wanting to do it by the book like a good boy, I recently attended a Macromedia authorised training course where the materials used prefixes to name new objects/instances:
mcMovie btnButton txtTextField and so on. However, the Flash8 help files suggest using _suffixes: movie_mc button_btn etc... Does it make any difference (I know that code-hinting in Flash8 is triggered by the suffixes)? Is one method more widely used, or more appropriate for AS3? TIA |
|
|
|
|
|
#2 |
|
Super Moderator
Join Date: Jan 2002
Location: Centreville, VA
Posts: 24,879
|
Howdy and Welcome...
![]() I use the suffix only because of the code hinting and funny thing is that I don't use that code hinting at all... I just keep type the function instead of selecting it from that... I think people from other language background mostly go by the prefix because that's abit more widely used method, but I don't think it really matters as long as you are consistent in your code... Just use something that you are most comfortable with and you should be good... ![]()
__________________
CyanBlue / Jason Je / Macromedia Certified Flash Developer & Designer http://CyanBlue.FlashVacuum.com http://www.FlashVacuum.com http://tutorials.FlashVacuum.com Do NOT PM, Email or Call me... Your question belongs right in this forum...
|
|
|
|
|
|
|
|
|
#3 |
|
Registered User
Join Date: Aug 2007
Posts: 17
|
Thanks
In that case, I think I'll go with the first method, simply because I learned not to use the _underscore_ writing html and it feels kinda weird using it in AS2! ![]() |
|
|
|
|
|
#4 |
|
Super Moderator
Join Date: Jan 2002
Location: Centreville, VA
Posts: 24,879
|
Whatever you are most comfortable with...
![]() Can you clarify your reason abit though cuz I don't really understand that...
__________________
CyanBlue / Jason Je / Macromedia Certified Flash Developer & Designer http://CyanBlue.FlashVacuum.com http://www.FlashVacuum.com http://tutorials.FlashVacuum.com Do NOT PM, Email or Call me... Your question belongs right in this forum...
|
|
|
|
|
|
#5 |
|
done
Join Date: Jun 2001
Location: portland, or
Posts: 8,048
|
if you want to force the code hints this will work for some of the items. not sure if it works for all of them:
in your code do: ActionScript Code:
__________________
tg --- what the hell was i thinking? |
|
|
|
|
|
#6 | |
|
Registered User
Join Date: Aug 2007
Posts: 17
|
Quote:
http://www.underscore_underscore.com It's a small point, but it got me out of using underscores at all in web design. Hope that made sense ![]() |
|
|
|
|
|
|
#7 |
|
Registered User
Join Date: Aug 2007
Posts: 17
|
Thanks tg, that's gonna be useful! I need all the hints I can get.
![]() |
|
|
|
|
|
#8 |
|
Super Moderator
Join Date: Jan 2002
Location: Centreville, VA
Posts: 24,879
|
Well... That is a valid point, but I don't know how that could be really related to the programming in general... We are talking about something that's only visible to the developers not the end users...
![]() Never tried that nor will I try that, but that's good to know, tg... I always have trouble with the that notation... My brain simply does not work with that somehow... ![]()
__________________
CyanBlue / Jason Je / Macromedia Certified Flash Developer & Designer http://CyanBlue.FlashVacuum.com http://www.FlashVacuum.com http://tutorials.FlashVacuum.com Do NOT PM, Email or Call me... Your question belongs right in this forum...
|
|
|
|
|
|
#9 | |
|
Registered User
Join Date: Aug 2007
Posts: 17
|
Quote:
![]() |
|
|
|
|
|
|
#10 |
|
rather be programming
Join Date: Feb 2005
Location: City of Angels
Posts: 10,000
|
just my practice:
Anything built in the GUI gets the appropriate suffix. IE moveclip on the stage gets named myClip_mc. Anything built with code does NOT get a suffix, but data typed. This lets me very quickly see if I'm referencing a dynamic object or static.
__________________
I'm old enough to know better and young enough to do it anyway. -- maskedman |
|
|
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| internal actionscript naming conventions | phloam | ActionScript 2.0 | 7 | 10-24-2008 01:48 PM |
| AS3 loads AS2 swf. AS2 swf not displayed | darbar | ActionScript 3.0 | 0 | 07-20-2007 10:12 PM |
| about the naming conventions mentioned in the xml tutorial | bassouma86 | Other Flash General Questions | 2 | 11-27-2003 01:37 PM |