editorials discussion board

 
Books & Buyer's Guides

Information Hubs



Other Product Information

 

Site Supporters

Apple iPhone Prices At ...
Apple Store
Apple Store Canada
Cingular Wireless
iPhone InfoZone

Going Shopping?

Using the links above supports MacReviewZone!


send this page

Send to a friend



News Feed
Feed Information

Mailing list ... List information.


Latest Discussion Threads

MacReviewZone Gift Shop

Hard Cider: And Never The Tween Will Meet - Troubleshooting The Flash Tween Function
The Trouble with Tweens
By Jeff Peterson
Level - Intermediate [assuming some familiarity with basic Flash features]

"It's the little foxes, that spoil the vines: for our vines have tender grapes." Song of Solomon 2:15
One of the joys of working with Flash is the Tween function. It can also be one of the most aggravating, annoying, and frustrating ventures when things don't go as planned. Over the course of a year, I've spent many hours working against a deadline, pulling out my hair as a simple task turns into a nightmare. All I want to do is move one object across a stage - usually a simple Tween - only to see my objects refusing to budge or flying off in nutty directions! This article will highlight two frustrating problems and fixes for the oddities of Tweens.
First, some background. What is the Tween function? Tweening is the ability to create a beginning object in one frame of a movie sequence and another object in an ending frame and then allow the computer to generate every intermediate object. This auto-animating function saves hours of design time. Basically there are two types of Tweens: Shape and Symbol. The first type of Tween, a Shape Tween, is a type of morphing. You take a star in one frame and end with a circle in the last frame. Flash will generate all the frame shapes in between [hence: Tweening]. So you might see the star change first to a square then to the circle over 10 movie frames. The second type of Tween, called a Symbol Tween, takes a single object, converted to a symbol [keyboard - F8], and moves, rotates, and/or scales this symbol over several frames of the Flash movie. [For more information on Tweens and their functions, see the help guide that came with Flash.]

Figure A


What are the Troubles with Tweens?

For the sake of brevity, I will list the problem, causes, followed by solutions. Each of these problems, when I first encountered them, took me over a half a day to solve. They are the kind of problems that just shouldn't happen. Some of them are bugs. Others are easy mistakes.

Trouble 1: Text symbols do not scale or fade. You create a word or sentence and turn it into a symbol [F8] as usual. You try to use it in a sequence. It plays just as it should in the timeline and work area, but once published, the symbol may move but it will not scale or fade.

Figure B


Cause: You are using system fonts [_serif, _sans, _courier], or Postscript fonts [Flash 4 does not handle Postscript fonts well]. Macromedia recommends device or system fonts to save space or to use in text fields to guarantee good display, but for some reason the use of system fonts causes the Tween functions not to work properly. While PS fonts may work, often there are shape oddities like the letter Q filled in with a solid color, or Flash itself will crash using PS fonts.
Solution: Change the font in your symbol to any True Type font.
Solving this problem took me over a day. It was maddening because it shouldn't have been a problem. That's what makes it hard to figure out.

Trouble 2: Symbols don't move in the direction you expect. You use a motion guide to move a symbol or symbols across the screen over several frames, but rather than following the expected path, the symbol moves in a different direction or snaps to the middle.

Figure C


Causes:

a) Your symbol is not snapped to the motion guide line;
b) You have two or more symbols on the same layer of the movie;
c) You have a shape, not a symbol on the layer with the symbol;
d) You have two ore more layers being governed by a single motion guide

This type of problem happens often. You have to look at four possible causes to find the proper solution. A Motion Guide Layer uses something like a line or zigzag to direct the action of a symbol across the stage or screen. The Guide Layer is colored blue or purple in the Timeline and the Symbol Layer underneath it is indented to show that is governed by the layer above (see below- Figure E).

Solution a) and b): The most common reason that a symbol does not move as expected is that the symbol is not snapped to the guide line at the beginning and the end of the guide. First, make sure the Symbol Layer is unlocked. Under the View Menu, choose Snap, then in the first frame of the sequence, select the symbol. When you do, cross hairs should be revealed. The cross hairs show the center point of the symbol. If you do not see the symbol outlined and having a cross hair, then you do not have a symbol in the first place, you have a shape object and that is your problem! If you do see cross hairs, grab the symbol by the cross hairs and drag it to the guideline. When the cross hairs are over the guideline, the "+" will change to an "o". Now when you let go, it will snap to the line. Make sure the last frame of the Tween is also snapped to the line. That should solve your problem.

Figure D

 

Solution c): If you have more than one symbol or object on a layer and create a Tween, Flash will automatically turns all objects on a single layer into ONE symbol. This benefit of Flash can also make it difficult to figure out what's gone wrong. Sometimes, when editing frames, I find I have unknowingly added 2 or more objects on the same timeline layer. I might place an object like a square in a frame 7 and hit F6 to create a duplicate frame in frame 29. Later I change the square in frame 7 into a Symbol [F8]. Then I create the Tween between 7 and 29. But guess what! Although it looks like I have the same square in both 7 and 29, Flash will turn the square in frame 29 [which is not yet a symbol] to a new symbol. Suddenly, I have 2 symbols on the same layer, and neither one will follow the guideline!

What to look for: Go to Window > Library and open your library. Look for Symbols named Tween 1, Tween 2, etc. If you see anything like that, you will find that you have created a new set of symbols and the resulting behavior can be very odd. The symbols will jump around the stage or move in opposite directions.


Figure E


To solve the problem, you must delete all the Tween Symbols from the layer and start fresh. Place your original symbol [square] in frame 7. Now duplicate the frame in 29 [F6]. Then create the motion, scale, and/or guide Tween between the frames.

Solution d): This is a bug and it happens occasionally, but I am not sure of the cause. For some reason, a layer that is not indented will sometimes be governed by a motion guide layer 2 or more layers above. It may happen when you move layers up or down in the timeline or when you remove a layer from under a guide layer. It may also happen when you move a symbol from one layer to another after it has shared the layer with another symbol. For some reason, the Tween motion of the one level [even without having a guide layer!!!], will affect the motion on the other layer, causing the symbol on that layer not to move as expected.

What to look for: a symbol on one layer will not move as expected but will move in one direction and then suddenly snap and jump to its final point on the stage. The symbol on the other layer, however, will operate as expected.

To solve this problem, check for Tween Symbols in your library as in " problem c". Unfortunately, Flash doesn't always create a Tween Symbol when you have the multiple layer problem. You may need to copy the frames of the offending layer, delete that layer, and create a new layer above the guided layers and then paste, or you may need to delete the layer and start over.

These are just a few of the little foxes that cause endless headaches for even experienced Flash developers. Next time: The Trouble with Buttons.

Jeff Peterson is a Macintosh pioneer, acquiring his first 128k Mac in 1984. In 1993, he started work on the Internet, producing an early e-magazine, O Theophilus, and educational courses for the web. He started his own web design company in 1999, www.PetersonSales.net and is still acquiring new clients. Jeff is also a part-time theologian, The Scholar's Corner, and he loves to play Flight Sims when he gets a chance, being part of the notorious Shadow Riders, call sign Padre =<SR>=.

©2000 by Jefferis Kent Peterson
www.PetersonSales.net
www.FlashTips.org

| Top of page | Mail this page to a friend |

Recent Additions

Dashboard Icon Check out our new dashboard widget tracking site updates and providing quick access to key areas of MacSpeedZone and MacReviewZone!

Reader Specials

firefox Firefox Search Plugins - search this site and others from within Firefox!

HandHelditems.com - Personalize your iPod with us. Shop hundreds of unique iPod accessories and save up to 80%.

Apple Store Apple Store - The size of a pack of gum, iPod shuffle weighs less than a car key. Which means there's nowhere your skip-free iPod shuffle can"t go. Click Here


Home Reviews Opinions & Articles Buyer's Guides MacSpeedZone

-->
Copyright 1996-2007 by Cider Press Publishing LLC all rights reserved. MacReviewZone is not authorized, sponsored, or otherwise approved by Apple Computer. Apple, the Apple logo, Macintosh, iPod, iBook, iMac, eMac, and PowerBook are registered trademarks of Apple Computer, Inc. Additional company and product names may be trademarks or registered trademarks and are hereby acknowledged.