This is the manual for the 3D Rotate Tool Flexi Flash Software.
THIS MANUAL APPLIES FOR THE 3D ROTATE TOOL FLEXI BEFORE THE “SETUP UTILITY” WAS RELEASED. YOU WILL FIND HERE USEFUL INFORMATION HOW TO IMPLEMENT THE TOOL WITHOUT THE SETUP UTILITY.
The rotateTool.swf flash movie loads the images of your object. The images are specified in config.xml, together with some other settings like speed of rotation.
You need the images of the object you want to present. For a smooth animation at least 72 images are required (one image for every 5 degrees of a full 360 degree turn). If you are not sure how to do it, check the Getting the Images chapter. Put the images in a single folder named e.g. images.
You can use the Config Utility to create the config.xml. For experienced users it is sometimes faster to edit the config.xml file directly. The one really important thing about config.xml is to specify path to the images:
<images>
<image src="images/02.jpg" />
<image src="images/03.jpg" />
<image src="images/04.jpg" />
...
So e.g. replace images/02.jpg from the demo example with images/myshot0001.jpg where myshot0001.jpg is your image.
Once you have the config.xml file ready, place it together with the images folder into a common folder named e.g. with the name of your product. The directory structure might look as follows:
backpack [folder]
- config.xml
- images [folder]
- myshot001.jpg
- myshot002.jpg
- myshot003.jpg
Remember, the Config Utility can help you to create the config.xml file.
Using Adobe's code:
PHP helper function to generate this Adobe's code:
<script language="javascript">AC_FL_RunContent = 0;</script>
<script src="AC_RunActiveContent.js" language="javascript"></script>
<script language="javascript">
if (AC_FL_RunContent == 0) {
alert("This page requires AC_RunActiveContent.js.");
} else {
AC_FL_RunContent(
"codebase", "http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0",
"width", "500",
"height", "375",
"src", "rotateTool",
"quality", "high",
"pluginspage", "http://www.macromedia.com/go/getflashplayer",
"align", "middle",
"play", "true",
"loop", "true",
"scale", "noScale",
"wmode", "window",
"flashVars", "path=backpack",
"devicefont", "false",
"id", "multi",
"bgcolor", "#FFFFFF",
"name", "rotateTool",
"menu", "true",
"allowFullScreen", "false",
"allowScriptAccess","always",
"movie", "rotateTool",
"salign", "lt"
); //end AC code
}
</script>
<noscript>
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
id="rotateTool" width="500" height="375"
codebase="http://fpdownload.macromedia.com/get/flashplayer/current/swflash.cab">
<param name="movie" value="rotateTool.swf" />
<param name="quality" value="high" />
<param name="bgcolor" value="#FFFFFF" />
<param name="allowScriptAccess" value="always" />
<param name="flashVars" value="path=backpack" />
<param name="scaleMode" value="noScale" />
<embed src="rotateTool.swf" quality="high" bgcolor="#FFFFFF"
width="500" height="375" name="rotateTool" align="middle"
play="true"
flashVars = "path=backpack"
loop="false"
quality="high"
scaleMode="noScale"
allowScriptAccess="always"
type="application/x-shockwave-flash"
pluginspage="http://www.adobe.com/go/getflashplayer">
</embed>
</object>
</noscript>
Using the swfobject to embed flash movies into a website:
<script type="text/javascript" src="swfobject21.js"></script>
<script type="text/javascript">
var flashvars = {};
flashvars.path = "backpack";
var params = {};
params.scale = "noScale";
params.salign = "lt";
params.allowScriptAccess = "always";
var attributes = {};
attributes.id = "myFlash";
attributes.name = "myFlash";
swfobject.embedSWF("rotateTool.swf", "flashContent", "500", "375", "9.0.0","expressInstall.swf", flashvars, params, attributes);
</script>
<div id="flashwrapper" style="width: 500px; height: 375px;">
<div id="flashContent">
Detecting Flash
</div>
</div>
The most important line is the flashvars.path = “backpack”; Here you specify the path to the config.xml file. The tool looks for config.xml in the backpack folder. This way you can use one swf for any number of products.
This is the list of all available flashVars:
In 90% of cases you set only the path variable. However you can use any of the other specified ways to tell the tool where to look for the images. To sum it up, you set one of the following:
so setting e.g. both path and dataFile is wrong
This section is for experienced Flash Users who know ActionScript.
The rotate tool is initialized using ActionScript. You create a the rotate tool instance issuing this command:
Note: you can find this commands in actions of the first frame in the downloaded demo .fla files
var rotateTool : RotateToolApp = new RotateToolApp(rotateToolTheme);
rotateToolTheme is the name of the movieClip instance on the stage, which does contain the theme assets.
You start the tool with this command:
rotateTool.start();
If you want to remove the tool from the stage and memmory, use this command:
rotateTool.release();
Other commands:
rotateTool.showErrors = false;
If set before calling the start() command, the error reporting is turned off.
rotateTool.setImage(7);
Displays the image with provided id. For example id 7 is the eighth image in the config.xml.
rotateTool.setNewPath("/otherproduct/");
Removes the loaded images and loads new images specified by the path parameter. See Available FlashVars chapter for more details on the path parameter.
rotateTool.setNewDataFile("otherFile.zip");
Removes the loaded images and loads new images specified by the dataFile parameter, when using zip file instead of images + config.xml;
Other commands:
rotateTool.stopRotation(); stops the rotation rotateTool.startRotation(); starts the rotation rotateTool.disableControls(); disables button & mouse control rotateTool.enableControls(); enables button & mouse control
rotateTool.zoomOut();
Zooms out if the tool is zoomed
rotateTool.getActualImage();
Returns id of currently displayed image. The first image in config.xml has the id 0.
It is possible to set the dataFile or path before the start() command is issued, in case you don't want to use the flashVar parameters (e.g. in the case the rotateTool is a part of a larger project.)
use:
rotateTool.path = "/otherproduct/";
or:
rotateTool.dataFile = "product007.zip";
then:
rotateTool.start();
to “hard code” the path to the images in the swf.
EVENTS
You can add eventListeners to the rotateToolApp instance and listen for various events. Currently these events are avaiable, example:
var rotateTool = new RotateToolApp(rotateToolTheme); rotateTool.path = myPath; rotateTool.addEventListener(RotateToolApp.INITIALIZED, rotateToolInitialized); rotateTool.addEventListener(RotateToolApp.LOADING_PROGRESS, progressListener); rotateTool.addEventListener(RotateToolApp.HOTSPOT_CLICK, hotspotClickListener ); rotateTool.addEventListener(RotateToolApp.HOTSPOT_OVER, hotspotOverListener); rotateTool.addEventListener(RotateToolApp.HOTSPOT_OUT, hotspotOutListener);
INITIALIZED
Is dispatched when all images are loaded. Event type is flash.events.Event
LOADING_PROGRESS
Informs on how many images are loaded – useful e.g. for your custom preloader. Event type is com.yofla.rotateTool.events.CustomEvent and it has a property “data” which holds a number from 0 to 1.
HOTSPOT_CLICK
Is issued when a hotpsot is clicked. Event type is com.yofla.rotateTool.events.HotspotEvent. Event has a property hotspot with some public data, the most important is hotspot.xmlData – it is the xml data of the hotspot as specified in the config.xml. Other public properties of the HotspotEvent are counterparts of attributes specified in the xml, e.g. hotspot.offsetX is the specified (or inherited) offsetX attribute.
HOTSPOT_OVER
Is triggered when the mouse mouse-overs the hotspot
HOTSPOT_OUT
Is triggered when the mouse mouse-outs the hotspot
You configure the tool via settings specified in the config.xml. You can use the Config Utility to create the xml or you can edit it directly.
Example:
<custom> <contexMenuItem>4LDIsODIsNiwzLDIsODUsMjMsNzcsNjEsMzEsMTIsNSw4OCw4NCw3NA==</contexMenuItem> <logo url="http://www.yofla.com" offsetX="5" offsetY="5" link="http://www.yofla.com/logo.png"/> </custom>
If you have shoot the images of rotation for more horizontal levels, you set the data in the <multidirectional> node attributes:
It is possible to set default settings for the images:
IntroImages node is a collection of images which display once before the rotation. They are useful for an intro-animation you want to display before the rotation starts. If you do not define this node, no intro images are shown. <introImages> node attributes are:
In the <images> node the images are listed. <images> node attributes are:
Is an air application which facilitates creating the config.xml file:
You need to install Adobe Air Runtime first: http://get.adobe.com/air/
Then you can download the Config Utility for 3DRT Flexi here: http://www.yofla.com/down/3d-rotate/3drtflexi-setuputility/3drtflexi-setuputility.air
There are two ways how to get images for your product presentation. One is the good old fashioned photography, the other are Computer Generated Images (CGI).
Depending on your budged, you can use services of an professional or shoot the photos by yourself. When shooting images by yourself you will need good lighting and a turntable. Here are some external links on this topic:
Making a turntable:
Studio Lighting:
Excellent guide on how to take photos on a turntable: * http://beckerexhibits.wustl.edu/3D/howto/index.html
This are just few links for your inspiration, there are more useful tutorials on the net on studio-lightning.
In some cases a viable alternative to photographs are CGI images. If you have no experiences with CGI software, I recommend outsource this task to a professional.
If want to try to create the CGI images by yourself, there is the best free (and open-source) program Blender3D http://www.blender.org/
From the paid software my favorite is Cinema 4D, but there are many others as 3D Studio MAX, Lightwave, Maya and others…
I cooperate with CGI professionals so if you decide to go with CGI images you can contact me at info@yofla.com