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.
The second function is using attachMovie to build your screen elements. You set how many elements you wanted in the variable _root.howmany now you are looping through that many times to place your targets and objects on the screen at the X Y coordinates you specified in your first function.
function placement() {
for (i = 0; i <_root.howmany; i ++) {
this._parent.attachMovie("target", "t" + i, i);
this._parent.attachMovie("object", "o" + i, i + _root.howmany);
_root["t" + i]._x = _root.targetX; setting the X placement of your target
_root["t" + i]._y = _root.targetY; setting the Y placement of your target
_root["o" + i]._x = _root.objectX; setting the X placement of your object
_root["o" + i]._y =_root.objectY; setting the Y placement of your object
The next 2 functions work together to build the arrays that hold the actual X Y positions of you targets and your objects. These arrays are used to place the objects back into position.
function x_y(my_x,my_y) {
this.my_x = my_x;
this.my_y = my_y;
}
function setcoords() {
for (var i = 0; i <_root.howmany; i++ ) {
target_array[i] = new x_y (getProperty (_root["t" + i],_x),getProperty (_root["t" + i],_y));
object_array[i] = new x_y (getProperty (_root["o" + i],_x),getProperty (_root["o" + i],_y));
cover[i] = 0
<%brk%>