so I'm using Animate CC and I'm trying to fix an old fla file for a client. I'm pretty much a noob to this app and have trouble making the script work. I think the problem is because the actionscript was written in AS2. The code is simple but I couldn't figure out what to change.
The original code:
_root.onEnterFrame = function ()
{
if (about.p == news.p == org.p == pro.p == con.p == site.p)
{
black.gotoAndStop(1);
} // end if
};
I tried re-write the script into this, but it's not working:
root.addEventListener(Event.ENTER_FRAME);
function (e:Event)
{
if (about.p == news.p == org.p == pro.p == con.p == site.p)
{
black.gotoAndStop(1);
} // end if
};
Could anyone help me figure it out? Thanks!!