|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#16
|
|||
|
|||
|
Just a heads up on best practices for actionscript:
The "_" is a signifier for reserved properties and some objects in actionscript such as "_root" or "_xmouse." As a rule I would steer clear of a leading underscore in your instance names, as it will confuse anyone else looking at your code. There are also some instance naming conventions that you can follow to make handcoding a little easier within the editor. Terminating your object instance names in things like "_mc" or "_text" will prompt the editor's contextual menu to open at your cursor and choose from a list of available methods. As for the problem your running into with _alpha, I recall having problems with that in Flash 5 -- I think that's only possible in MX/6 With regard to the length issue - there must be some maximum lenth beyond which you don't want your text fields to run. This is less of a programming issue and more of a design dilemma. If your navigation is running horizontally, you'll run into all sorts of undesirable results, depending on what kind of text you end up with. If your nav is running vertically, then I would make one clip with a dynamic text field inside and duplicate it for as many text strings you have. Then set a cap on the string length of your variables. Remember, the visibility of the text is not limited by the size of the clip it's sitting in, but the size of the text field. Think of the text field like a mask. Scaling the parent clip will only distort the textfield, not make any more of the text visible. MoviecClips are objects, so what ever changes you make to the object (scale, position, etc.) are inherited by all of the objects contained therein. Hope this helps and good luck. |
|
#17
|
|||
|
|||
|
Thanks for the tips.
Actually I've picked up alot of what you just mentioned after dealing with it for awhile. Then reading your post again makes everything fit and makes alot more sense. The value that is picked up with ._width is exactly what you said, its the text field where you string is. Dealing with the MCs really does you no good as distortion occurs, the largest you set the textfield is what will come out. (your mask example made it make sense) I've had to think of ways to still have variable buttons but like you said, set a cap on the length. Some areas i've been able to pull off horizontally, only when you know the strings will fit and buttons can be "fit" in the design. Much easier when you just want to display the dynamic text, vertically. I've started to terminate with \MC etc. I didn't know about the _MC and will start to use this myself. Also, applying _alpha does work, I was applying it to the wrong clips and was my mistake. However, I will still work on trying to figure out how to make these dynamic buttons. I'll post if i find out a way to do this. Thanks and if you're reading this and know how to do this, PLEASE HELP. I'm running out of ideas....... ![]() |
![]() |
| Viewing: Dev Shed Forums > Web Design > Flash Help > How 2 Dynamic size MCs |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|