I’ve just got a simple mc on stage of a rectangle.
I want the clip to go from its full width, then scale down to nothing and stop.
onClipEvent(enterFrame) {
this._xscale-=5;
}
The above code starts what I want, but I don’t want it to continue into the negative.(if that makes sense)
So I came up with this but its not working:
onClipEvent(load){
origWidth = this._width
}
onClipEvent(enterFrame) {
if(origWidth>=126) {
this._xscale-=5;
}else if (origWidth<=0) {
delete this.onEnterFrame;
}
}
I’m probably making this more complicated than it should be.
Oh, and ‘126’ is the actual width of the clip in the properties inspector.
Thanks