Method | Description |
---|---|
forward() | Move forward. |
backward() | Move backward. |
load() | Load xml source. |
start() | Start the tunnel. |
stop() | Stop the tunnel. |
Availability Flash Player 9.
Edition Flash CS3.
Usage FotoTunnel.forward()
Returns None
Description Method; Move forward.
Code Example :
FotoTunnel_mc.forward();
Availability Flash Player 9.
Edition Flash CS3.
Usage FotoTunnel.backward()
Returns None
Description Method; Move backward.
Code Example :
FotoTunnel_mc.backward();
Availability Flash Player 9.
Edition Flash CS3.
Usage FotoTunnel.load(xml)
Parameters
xml: URL of external xml file. Or XML object.
Returns None
Description Method; Load the xml source and setup FotoTunnel
Code Example :
//Load the source xml named photo.xml.
FotoTunnel_mc.load("photo.xml");
Availability Flash Player 9.
Edition Flash CS3.
Usage FotoTunnel.start()
Returns None
Description Method; Start the tunnel if xml is loaded and the tunnel not started yet.
Code Example :
//Load the xml FotoTunnel_mc.load("photo.xml"); //Start
FotoTunnel_mc.start();
Availability Flash Player 9.
Edition Flash CS3.
Usage FotoTunnel.start()
Returns None
Description Method; Stop the tunnel when the tunnel is in started state.
Code Example :
FotoTunnel_mc.stop();
To use event, you need to import the library:
import com.digicrafts.events.*;
Event | Object | Description |
---|---|---|
itemClick | ItemEvent.CLICK | Broadcast when mouse clicked on the item. |
itemMouseOver | ItemEvent.MOUSE_OVER | Broadcast when mouse over on the item. |
itemMouseOut | ItemEvent.MOUSE_OUT | Broadcast when mouse move outside the item after mouse over. |
popupClose | ItemEvent.CLOSE | Broadcast when thumbnail close after popup. |
popupOpen | ItemEvent.OPEN | Broadcast when thumbnail popup completed. |
complete | Event.COMPLETE | Broadcast when the all buffer images loaded. |
Code Example :
import com.digicrafts.controls.*;
function itemH(event:ItemEvent):void {
switch(event.type) {
//Mouse Over Event
case ItemEvent.MOUSE_OVER:
//do something when mouse over an item
//You can get the item item by
trace(event.index);
//You can get the data object by
trace(event.item);
// You can get parameter inside data object by
trace(event.item.source);
trace(event.item.title);
trace(event.item.description);
trace(event.item.link);
trace(event.item.width);
trace(event.item.height);
break;
//Mouse Out Event
case ItemEvent.MOUSE_OUT:
//do something when mouse out an item
break;
//Mouse Click Event
case ItemEvent.CLICK:
//do something when mouse click an item
break;
//Thumbnail Open
case ItemEvent.OPEN:
//do something when the thumbnail popup
break;
//Thumbnail Close
case ItemEvent.CLOSE:
//do something when the thumbnail close after popup
break;
}
}
tunnel_mc.addEventListener(ItemEvent.MOUSE_OVER,itemH);
tunnel_mc.addEventListener(ItemEvent.MOUSE_OUT,itemH);
tunnel_mc.addEventListener(ItemEvent.CLICK,itemH);
tunnel_mc.addEventListener(ItemEvent.OPEN,itemH);
tunnel_mc.addEventListener(ItemEvent.CLOSE,itemH);
Property | Type | Description | Default Value | Possible Value |
---|---|---|---|---|
dataProvider | DataProvider | Get the DataProvider for the components | ||
source | String | The path to the xml generate by Photoshop Web Gallery Function, Flickr rss or Youtube rss. | photo/photos.xml | url to the xml file |
useThumbnail | Boolean | Determine the use of thumbnail image in the xml source as image. | true | true/false |
proxy | String | The proxy script for cross domain issue. | url to the proxy script | |
autostart | Boolean | Enable auto start when xml and image loaded | true | true/false |
itemCount | Number | The item count in each circle of the tunnel | 10 | Positive Number |
itemWidth | Number | The prefer width of each item (in 3D scale) | 100 | Positive Number |
itemHeight | Number | The prefer height of each item (in 3D scale) | 100 | Positive Number |
itemDistance | Number | Distance between each level of circular item. | 0 | Positive Number |
itemRotation | Number | Vertical rotation of each item | 0 | +/- 180 |
perspective | Number | The perspective of the camera view | 100 | Positive Number |
radius | Number | Radius of the circular item. | 120 | Positive Number |
rotationOffset | Number | Rotation offset of each level of circular item. | 0 | +/- 180 |
curvature | Number | The degree of circular item occupied. | 360 | 0 - 360 |
defaultRotation | Number | Deafult rotation for each level of circular item. | 0 | +/- 360 |
popupWidth | Number | Set the prefer width of popup thumbnail | 200 | Positive Number |
popupHeight | Number | Set the prefer height of popup thumbnail | 200 | Positive Number |
popupAutoScale | Boolean | Enable/Disable the auto scale function of popup thumbnail. When autoscale enabled, the item will scale to orignal image size specify in the xml. | true | true/false |
dof | Number | Enable/Disable depth of field effect | 1 | 1/0 |
itemAlpha | Number | Set the alpha value of the items | 1 | 0.0 - 1.0 |
itemDim | Number | Set the dim value of the items | 0 | 0.0 - 1.0 |
itemDimColor | Number | Set the color for dim items | 0x000000 | Color Value |
itemOverEffect | String | Set the effect when mouse over on an item. | GLOW | GLOW,NONE |
itemOverColor | Number | Set the color for dim items | 0xFFFFFF | Color Value |
cameraFollowMouse | Number | Enable/Disable camera follow mouse effect | 1 | 1/0 |
mouseWheelAction | String | Determine the action do when mouse wheel scroll on the components area. | SCROLL | SCROLL, ROTATE, NONE |
mouseDragAction | String | Determine the action do when mouse drag on the components area. | ROTATE | SCROLL, ROTATE, NONE |
itemClickAction | String | The instance name of dynamic text field use for hold the caption. | d | Any instance name of dynamic text field |
keyboardControl | Boolean | Enable/Disable the motion control by keyboard. Up arrow: move forward. Down arrow: move backward. Left arrow: rotation left. Right arrow: rotation right | true | true/false |
captionTargetName | String | The instance name of dynamic text field use for hold the caption. | Any instance name of dynamic text field | |
forwardButtonTargetName | String | The instance name of Button/SimpleButton use to control the tunnel move forward | Any instance name of Button/ SimpleButton | |
backwardButtonTargetName | String | The instance name of Button/SimpleButton use to control the tunnel move backward | Any instance name of Button/ SimpleButton | |
loaderSkin | String | The class name use of the skin for the loading animation | Any class name of movieclip symbol |
| |||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||
|