actionscript Q

  • Started
  • Last post
  • 2 Responses
  • ganon

    i am try to use actionscript to animate a bunch of scrolling logos...once the one gets to a certain x position, i want the timeline to jump to another frame label with the next logo...this is what i have but it doesnt work, HELP!...

    onClipEvent(load) {
    speed = -3;
    }
    onClipEvent(enterFrame) {
    currentPosx = this._x + speed;
    if (currentPosx < (170 - this._width/2)) {
    gotoAndStop ("02");
    }
    }

    thanks

  • o0o0

    what part isn't working?

    If the clip isn't moving it's because you haven't used 'currentPosx' yet..

    this._x = currentPosx;

    If it's the timeline... which timeline do you want to effect? The way you have it now, you're talking to the timeline of the clip you're animating... if you want the main timeline use _root.gotAndStop() ... or you can use _parent.gotoAndStop() for the parent movie clip..

    does that help?

  • ganon0

    thank you!..by your correct suggestions it still didnt work...but when i changed my keyframe label from "02" to "two" it worked...i guess labels shouldnt be numbers..?i thought as long you keep it in quotes it means its a label...oh well....