Featured FLA
» Author: Bugra Ozden
» Title: Skatalog v9 - product catalog
» Description: Create your product catalog easly and publish on your website or Create your image gallery, documents list, portfolio. Fully XML Driven
» More by Bugra Ozden
Featured Site
» Posted in the Flash Kit Links section
» Title: Creative DW Image Show PRO
» Description: Creative DW Image Show PRO is a Dreamweaver extension which enables the user to create multimedia presentations. It combines the features of the popular Creative DW Image Show with the ability to add professional text effects to slides (similar to After Effects). The product is very customizable: the user can choose the duration of the transition effects, the slide motion start and end position, zoom and panning type for both images and texts.
This tutorial details how to have an object follow the mouse on 1 axis only (not possible
with the drag command). This gives the effect of it sliding across the screen. This can be
done easily by making the x/y position of the object equal to the corresponding position
of the mouse. However, to make the movement look more authentic, like it is following the
mouse, not just always in the same position, you can add a small piece of code which makes
it lag behind a little.
The idea behind this is to make the new position of the object, half way between its
current position and the mouse's. This way, the gap between them will always be halved.
(In reality, the object will never reach the mouse, the gap between them will just get
smaller and smaller giving the effect of eventually being in the same position.)