-
Create a sliding viewer
Hi,
Here:
http://www.flash-creations.com/notes...dingviewer.php
I found good tutorial about create a sliding vievier, but i have some problem with this part of code:
Code:
// constants
var MAXPIXELS:Number = 12; // max number of pixels to move slider per frame
// function to move thumbnail slider ("this" = thumbs_mc)
function sliderControl() {
var w:Number = this._width/2;
var hw:Number = mask_mc._width/2;
var npixels:Number;
// only do when mouse over slider mask
if (_ymouse > mask_mc._y && _ymouse < mask_mc._y + mask_mc._height) {
// mouse over left half of slider:
if (_xmouse > mask_mc._x && _xmouse < mask_mc._x + hw) {
npixels = (hw - _xmouse) / hw * MAXPIXELS;
this._x += npixels;
if (this._x >= 0) this._x = this._x - w;
// mouse over right half of slider:
} else if (_xmouse > mask_mc._x + hw && _xmouse < mask_mc._x + mask_mc._width) {
npixels = (_xmouse - hw) / hw * MAXPIXELS;
this._x -= npixels;
if (this._x <= -w) this._x = this._x + w;
}
}
}
How i can create a sliding viewer on 3dfa? Maybe someone know how to fix it?
-
Some users have created sliding viewers using layers, masks, and scrolling clones.
However, 3DFA is now primarily an Actionscript 3 tool.
Although it can run some AS2 samples, you really need to find a sliding viewer sample written in AS3 - for export to Flash 9.