Time for another “tell them as they come to me” thread
Here I’ll discuss many of the overlooked or unknown features of Flash which may make you say, “I wish I had known that before!” or maybe even, “hmmph!” or perhaps, “what a worthless feature!” …? Nonetheless, hopefully you will learn something new.
[size=3]- Timeline Preview[/size]
Very helpful in animating in flash, this feature allows you to see the visuals of your movie frame by frame in the timeline with previews for each frame.
This menu is hidden in the dropdown menu in the upper-right corner of the timeline. There are two versions, preview and preview in context. Preview will crop the frame stretching the visuals to the extent of the frame box in the timeline, while preview in context will maintain the proportions with respect to the size of the work area.
May not be so hidden to the animators out there, but the coders might not be aware of this and it could be useful to them as well
[size=3]- Shape Textures[/size]
Not too terribly unknown but always fascinating, especially to the novice user. This option allows you to, instead of a color, use a bitmap image as the fill of an object.
There are two ways to do this. One is through the color Mixer window where you have the option of bitmap in the dropdown of fill options (showing any imported images you have in the current movie), therefore allowing you to use a bitmap as a fill color (showing any bitmaps you may have in the library). The other is by placing the bitmap on the screen and breaking it apart with Modify > Break Apart or CTRL + B. This will convert time image into a shape the size of the image and give it the bitmap as a fill. Then you can either manipulate that shape or use the eedropper tool to get the bitmap into your fill bucket and fill that bitmap in any othe shape. The bitmap can then be rotated, positioned and scaled to your liking within that shape through the use of the Fill Transform Tool (F) just as you would a gradient.
Here you have a great avantage for small textures like bricks or stone which would go well in keeping filesize at a minimum in such examples like games where you may have a large bitmap driven room with alot of repeating textures.
[size=3]- Color Swatches From a GIF[/size]
Yup, just use the menu in the color swatches panel and choose Add Colors… and you have the option of selecting a GIF file. The color palette of that GIF is then loaded into your swatches panel.
This can be helpful in two ways. One is the obvious “oh look I can use colors directly out of my image” sort of thing letting you borrow from an image or just keep consistency with that image that you might be using in Flash. The other is that it lets you make visual representations of color swatches. In other words, with an image as your color swatch collection you can easily look at the preview (or the image directly) to tell exactly what colors are in the “collection.”
[size=3]- Prevent Enter from Stopping Your Movie on Playback[/size]
Often, when you playback your movie in Flash and you have some action within your movie that requires the user to press Enter in order for something to happen, in testing this you come into a confliction between Flash wanting to stop the movie and your action happening (Flash wins and stops the movie.)
To prevent this, after initiating your test movie, go to Control > Disable Keyboard Shortcuts and you wont have this problem.
[size=3]- The Shortcuts You May Want But Didnt Know[/size]
The Enter shortcut maybe annoying in those situations but other shortcuts can be great time savers. Chances you already know many of the main shortcuts in Flash, but what about the secretive ESC shortcuts for coding? “What?” you ask? Open the actions panel and using the [+] drop down, navigate to Actions and anyone of the subcateories. Look at the esc based shortcuts there - relating to the most common commands used in flash and only a few key strokes away!
[size=3]- Add Your Own Colored Keywords in Flash Actionscript[/size]
Most anyone whos created a decent component already knows this one, but it could be helpful for the casual coders out there as well. Basically, you have the ability to add keywords into Flash which become color coded when used in the actions panel. Control of this is done through an XML file flash reads when it starts um familiarizing it with the keywords it needs to know and colorize when you use them in actionscript. Theres actually many XML files involved - a whole folder (actually more than one but not to get too complicated here) in fact that Flash reads the XML files within, so really, for this, its better to make a new XML file of your own as not to mess with the other defaults.
Heres a simple example an XML file that would adding coloring to the ASBroadcaster object:
<customactions>
<colorsyntax>
<keyword text="ASBroadcaster"/>
</colorsyntax>
</customactions>
This can be made in any text editor and then just saved as something like ASBroadcasterColoring.xml to have this colorizing file. Then, to let Flash see it and understand it place it in the following directory:
[Your Programs Directory] /Macromedia/Flash MX/First Run/ActionsPanel/CustomActions
Then, the next time Flash runs, it will read that XML file and incorporate the ASBroadcaster text into its color coding and highlight it blue (or whatever color you have set in your preferences) when written in the actions panel.
You can go beyond that with these XML files. Heres an example that does a little more completion with the ASBroadcaster object:
<customactions>
<actionspanel>
<folder name='Hidden' id='Hidden' tiptext='Hidden Features' version='6'>
<folder name='ASBroadcaster' id='ASBroadcaster' tiptext='ASBroadcaster' version='6'>
<folder name='Methods'
id='Methods'
tiptext='ASBroadcaster Methods'
version='6'>
<string name='initialize'
tiptext='Initialize object to broadcast'
text='.initialize(% Object %)'
object='ASBroadcaster'
version='6'/>
</folder>
<folder name='Initiated Object Methods'
id='ASBroadcasterObject'
tiptext='Methods for ASBroadcaster Initiated Objects'
version='6'>
<string name='addListener'
tiptext='Add a listener to the object'
text='.addListener(% Listener %)'
object='ASBroadcasterObject'
version='6'/>
<string name='removeListener'
tiptext='Remove a listener from the object'
text='.removeListener(% Listener %)'
object='ASBroadcasterObject'
version='6'/>
<string name='broadcastMessage'
tiptext='Sends event to all listeners'
text='.broadcastMessage(% event %)'
object='ASBroadcasterObject'
version='6'/>
</folder>
<folder name='Initiated Object Properties'
id='Properties'
tiptext='Properties for ASBroadcaster Initiated Objects'
version='6'>
<string name='_listeners'
tiptext='Array of listeners for this object'
text='._listeners'
object='ASBroadcasterObject'
version='6'/>
</folder>
</folder>
</folder>
</actionspanel>
<colorsyntax>
<keyword text="ASBroadcaster"/>
<identifier text=".initialize" />
<identifier text=".broadcastMessage"/>
</colorsyntax>
<codehints />
<typeinfo pattern="ASBroadcaster" object="ASBroadcaster"/>
<typeinfo pattern="*_bc" object="ASBroadcasterObject"/>
</codehints>
</customactions>
Theres 3 parts to this. the actions panel defining the object, colorsysntax telling what to colorize and codehints specifying what objects get code hints =) Without getting into too much here, Ill just point out the actionspanel is the layout of the books in the actions panel in the actionscript window and defines the objects for the code hints. Colorsyntax colorizes, keyword for standalone keywords and indetifier for methods and properties etc., where codehints pops up a window for the typed pattern which references the actionspanel definition of the specified object. Here I even added a _bc extension for if you name your broadcaster objects someName_bc, the code hints for an ASBroadcaster initialized object will open as Flash will think the object is just that.
[size=3]- Stick to Your Script[/size]
Its pretty common now for people to want to write almost all of their code in the first frame of the movie. At times some annoyances can come of this (asside from those of functionality) such as creating a new movieClip symbol in the work area and wanting to write script in the frame to go along with that symbol. If you have that symbol selected though, any script you write in the actions panel will be on that movieclip itself and not in the frame where you had desired.
You can prevent this annoyance by using the Pin option. This is hidden in an easily unoticed thumb tack icon in the upper left of the actions panel. While in your frame script, click on this icon to “pin” that script to the actions panel. Then, no matter what movieclip you select, that frame script will always be present in the actions window for you to edit without the worry of mistakenly putting script somewhere else.
[size=3]- Drag and Copy[/size]
To ease your copying woes (and not to replace your clipboard) you can use the ole drag-and-copy technique to make duplicates in Flash. For symbols on the screen and selections in the timeline, hold ALT and drag to make and move a copy of your selection. In the actions panel, for selected script, use CTRL and drag to copy the selected script. It can be a time saver.