Hi I need help to convert an image gallery from as2 to as3. Been trying so long to do so, but failed. My codes fall in 2 areas:
-
On the gallery mc tt contains the images for scrolling, which is inside the main mc tt contains the left and right arrow mc as well.
================================================== ======
onClipEvent (load)
{
accel1 = 3.000000E-001;
rate1 = 1.000000E-001;
root.xkoord1 = x;
x = 0;
}
onClipEvent (enterFrame)
{
x = x * accel1 + (root.xkoord1 - x) * rate1;
setProperty("", x, x + x);
if (Math.abs(root.xkoord1 - x) < 1)
{
setProperty("", x, root.xkoord1);
}
}
================================================== ====== -
On the right arrow btn which is inside the right arrow mc
================================================== ======
on (rollOver)
{
gotoAndPlay(“s1”);
}
on (releaseOutside, rollOut)
{
gotoAndPlay(“s2”);
}
on (release)
{
if (_root.xkoord1 > -1500)
{
_root.xkoord1 = _root.xkoord1 - 1000;
}
}
================================================== ======
I know it’s not possible to code on the actual mc and btn in as3, so i have inserted a new action layer in the main mc and right arrow mc respectively and move the above codes there, adding event listeners and etc, but it din work out. Is there a correct way to do this? Thanks and much appreciated!!!