hello,
I have been working on a product design portfolio in flash CS5.5, and have run into some trouble with my AS. I managed to eventually fix the problem, but was hoping to get some feedback as to why it wasn’t working in the first place.
I have a movieclip
I have a button([LEFT]btn_01)[/LEFT] and a movieclip(P_01) on the main timeline. The P_01 movieclip contains an empty stop frame on frame 1. From frame 2 to 20 an image fades in and stops at 20, then 20 to 40 the image fades out:
[LEFT]
This works:
this.btn_01.onRelease = function (){
if(this.P_01._currentFrame <= 20){P_01.gotoAndPlay(21)}else{P_01.gotoAndStop(20)}
This Doesn’t:
this.btn_01.onRelease = function (){
if(this.P_01._currentFrame <= 20){**[COLOR=#a52a2a]this.[/COLOR]P_01.gotoAndPlay(21)}else{[COLOR=#a52a2a]this.[/COLOR]**P_01.gotoAndStop(20)}
I would prefer to keep the scripting relative to its location with the “this.” function, as I want to keep all the scripting contained within the movieclip.
thanks in advance,[/LEFT]
Daniel