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 [COLOR=darkred]gallery mc[/COLOR] tt contains the images for scrolling, which is inside the main mc tt contains the left and [COLOR=darkgreen]right arrow mc[/COLOR] 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 [COLOR=darkred]right arrow btn[/COLOR] which is inside the [COLOR=darkgreen]right arrow mc[/COLOR]
========================================================
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 [COLOR=darkgreen]main mc[/COLOR] and [COLOR=darkgreen]right arrow mc[/COLOR] 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!!!