Wink: screen capture to SWF and PDF for free
--Stephen
www.smjdesign.com
Discussion on the issues surrounding media creation and marketing - SMJDESIGN.COM
The previous post inspired me to share some of my favorite macros/actions/shortcuts that I've created or discovered over the years.
Adobe Photoshop CS
F5 and F6
I have set two keys to rotate left and rotate right, respectively. I have a ergonomic Microsoft Natural Keyboard (a late ‘90’s model--I hear the newer ones break easily) and it splits between the F5 and F6 keys which make pressing them a tactile function instead of a visual.
F2 (Recorded Action)
This action adds two (hence F2) adjustment layers to a document (Curves and Hue/Saturation/Brightness). Being a photographer, I color correct frequently. My default for the HSB layer are a 15+ increase in Hue. You can create these individually with Ctrl+L and Ctrl+M though.
F3 (Recorded Action)
This key changes the image resolution to 300dpi (hence the F3 key) and converts the image to CMYK mode. Every print designer should have a shortcut that performs both these, especially since you have to de-check the “Resample Image” box at the bottom of the Edit/Image Size dialog. I don’t know what Adobe was thinking when they decided to make this the process for changing an image’s resolution.
Microsoft Word
Alt+S PasteSpecial (Macro)
I use this Macro at least 20 times a day. It is great for grabbing text off the Internet, because it removes all formatting from the copied text. Who wants to keep text formatting from a web page (especially with tables)? Record a macro that uses the command Edit/Paste Special…>Unformated Unicode Text.
Alt+X Xenter (Macro)
This may seem silly to some, but I use Alt+X to press enter when copying multiple web pages into a document. Why? The Alt+S PasteSpecial Macro will paste the unformatted text and right below it on the keyboard is the “X” key. Press Alt+X a few times to separate the blocks of text. Then, Alt+Tab back to FireFox (or your internet browser) and select more text with your mouse and copy it to the clipboard (Ctrl+C). Not having to press the enter key means you can keep your left hand closer to the Ctrl/Shift/Alt region of the keyboard and your right hand on the mouse. Although, I’m not sure what lefties should do.
*Note on Alt commands in Word (on a PC):
The Alt key highlights an application’s menu bar (Example: Alt+F selects File, Alt+E selects Edit, Alt+V selects View, etc.). This allows you to go to Print Preview by pressing Alt+F+V for example. The best though is Alt+Space, which selects the application’s drop down menu. This allows you to move an application window by pressing Alt+Space+M and using the arrow keys or Alt+Space+N to minimize a window.
With that said, when you record a macro assign it a place on the toolbar and edit the text of the button with an "&" before the letter you want to use in combination with the Alt key ("paste&Special" or "&Xenter" for example).
--Stephen M. James
www.smjdesign.com
The debugging situation did improved with ActionScript 2.0. I have yet to use Flash 8, but I hope this continues to improve. Something tells me that the Adobe buyout of Macromedia isn't going to help with the programming interface. It will only lead to more components packaged into the box.
I've spent more than a little time trying to explain timelines and event handlers to my media friends. These are some of the practices that I try to convey. The majority of the time though, they just want to finish the project. “As long as it works. . .” they say.
Well, the following are a few practices that I use to keep my code readable and easier to update in case you do use the similar framework in a second project. This is programming after all--no one will ever know.
Sample path
someTextMovie_mc.someText_mc.someClip_txtsomeTextMovie_mc :: This is the container movie clip that contains the animation timeline. I started out with the suffix “Container” but decided that it was too long and now use the suffix, “Movie”.
someText_mc :: This is the movie clip that is animated. It is the movie clip that is tweened across a timeline This clip is needed, so that the text box inside of it is encapsulated. If the font of text box inside is changed, then all instances of someText_mc will change with it.
someClip_txt :: This is a TextBox inside the animated movie clip.
The above example includes object suffixes that enable the Flash editor to provide code hints.
Common code hint suffixes
Array :: _array; Button :: _btn; Color :: _color; LoadVars :: _lv; LocalConnection :: _lc; MovieClip :: _mc; MovieClipLoader :: _mcl; Sound :: _sound; String :: _str; TextField :: _txt; TextFormat :: _fmt; Video :: _video; XML :: _xml; XMLNode :: _xmlnode; XMLSocket :: _xmlsocket
There is not much advantage to defining an object (Symbol) on the stage as a “Graphic” unless the symbol is animation or static. A “Button” can be used for a quick way to cause events to occur based on user interaction, but both these seem like limited “MovieClips”. I've never used a “Graphic” or a “Button” inside a Flash project. Often movie clips that function as buttons have a similar function. An example would be when the mouse is placed over this movie clip increase the brightness of the movie clip. In the following ActionScript, frame 2 is a highlighted (selected) version of the movie clip while frame 1 is the regular version.
_root.menuBar.menuFilm.menuSummary.onRollOver = function() {
gotoAndStop(2);
}
_root.menuBar.menuFilm.menuSummary.onRollOut = function() {
gotoAndStop(1);
}
If you have a series of similar movie clips that all brighten when the mouse is over them, then having the same exact code inside each and every “onRollOut” and “onRollOver” allows changes to be easily made. If it is decided that you need to animated the transition between the brightened movie clip and the original. A simple find and replace can replace ALL occurrences of “gotoAndStop(2)” with “gotoAndStop(10)”
First let me state that if you are wanting to make menu, you will need to be familiar with setInterval and clearInterval to make menus appear and disappear with a short delay
The easiest paradigm to imagine is that every section that can be clicked on a menu downloads a new swf file from the server. The drawback of this method is that every click causes a pre-loader to appear. If there are a few sections (external swf files) that have subsections (specific frames in the timeline of each external swf file).
Another technique that makes entering code more efficient is using variables to refer to movie clips. If you have a series of menu items (that have the prefix “menu”) that you want to each load content into a certain movie clip so that you have a modular site. If you name the movie clips similar names like “section.subsection”, then you can use the movie clip property, “_name”, with a substring function to grab the section's name. “substr(4)” removes all the characters before the fifth letter from the name of the movie (“menuFilm”). “substr(10)” would start reading the characters at the eleventh character.
An examples is:
The user clicks the item, “menuFilm.menuSummary”. “menuFilm” is the section of the short film web site. “menuSummary” is the subsection of the web site. The onRelease() of this item calls the following line:
loadMovie(this._parent._name.substr(4)+".swf",_root.content);
This takes the name of the parent movie clip of the movie clip instance that was clicked (menuFilm) and minuses the first four characters. This loads an external movie clip with the name “Film”. The problem with this is that if you have a subsection clicked (menuFilm.menuSummary), then you need to create a function that tells “Film.swf” to go to the subsection, “Summary”. This might look like the following:
loadContent(this._parent._name.substr(4),this._name.substr(4));
The inside of loadContent might look like:
function loadContent(clickedSection,clickedSubSection){
//load the correct swf file into the movie clip “content”
loadMovie(clickedSection +".swf",_root.content);
/* go to the frame of the swf file just loaded that corresponds
to the subsection clicked on the menu)
_root.content.gotoAndPlay(_root.clickedSubSection)
}
--Stephen M. James
www.smjdesign.com