hi all,
i’ve just learned the usage of onEnterFrame function and i tried something below. as a summary, i have a movieclip (videoCont) which contains video animations on the timeline. with a button function i want to find the current frame of the videoCont.collTo timeline bu i can’t succeed in… can anyone tell me the right way of this?
thanks so much…
someBtn.[COLOR=#993300]onRelease[/COLOR]=collection[COLOR=#000000]([/COLOR][COLOR=#000000])[/COLOR]
[COLOR=#993300]function[/COLOR] collection[COLOR=#000000]([/COLOR][COLOR=#000000])[/COLOR] [COLOR=#000000]{[/COLOR]
videoCont.[COLOR=#993300]gotoAndStop[/COLOR][COLOR=#000000]([/COLOR][COLOR=#0000ff]"coll"[/COLOR][COLOR=#000000])[/COLOR]; videoCont.[COLOR=#993300]_alpha[/COLOR] = [COLOR=#000000]100[/COLOR];
videoCont.[COLOR=#000000]collTo[/COLOR].[COLOR=#993300]play[/COLOR][COLOR=#000000]([/COLOR][COLOR=#000000])[/COLOR]
[COLOR=#993300]var[/COLOR] t:Tween = [COLOR=#993300]new[/COLOR] Tween[COLOR=#000000]([/COLOR]secCont, [COLOR=#0000ff]"_alpha"[/COLOR], Strong.[COLOR=#000000]easeOut[/COLOR], secCont.[COLOR=#993300]_alpha[/COLOR], [COLOR=#000000]0[/COLOR], [COLOR=#000000]1[/COLOR], [COLOR=#993300]true[/COLOR][COLOR=#000000])[/COLOR];
t.[COLOR=#000000]onMotionFinished[/COLOR] = [COLOR=#993300]function[/COLOR][COLOR=#000000]([/COLOR][COLOR=#000000])[/COLOR] [COLOR=#000000]{[/COLOR]
inf.[COLOR=#993300]loadMovie[/COLOR][COLOR=#000000]([/COLOR][COLOR=#0000ff]"sections/collection.swf"[/COLOR][COLOR=#000000])[/COLOR];
[COLOR=#000000]}[/COLOR];
[COLOR=#993300]_root[/COLOR].[COLOR=#993300]onEnterFrame[/COLOR] = [COLOR=#993300]function[/COLOR][COLOR=#000000]([/COLOR][COLOR=#000000])[/COLOR] [COLOR=#000000]{[/COLOR]
[COLOR=#993300]trace[/COLOR][COLOR=#000000]([/COLOR]videoCont.[COLOR=#000000]collTo[/COLOR].[COLOR=#993300]_currentframe[/COLOR][COLOR=#000000])[/COLOR] [COLOR=#f000f0]*//this returns undefined...*[/COLOR]
[COLOR=#f000f0]*//if (this.videoCont._currentframe == this.videoCont._totalframes) {*[/COLOR]
[COLOR=#993300]if[/COLOR] [COLOR=#000000]([/COLOR]videoCont.[COLOR=#000000]collTo[/COLOR].[COLOR=#993300]_currentframe[/COLOR] == [COLOR=#000000]300[/COLOR][COLOR=#000000])[/COLOR] [COLOR=#000000]{[/COLOR]
[COLOR=#993300]delete[/COLOR] [COLOR=#993300]this[/COLOR].[COLOR=#993300]onEnterFrame[/COLOR];
[COLOR=#993300]var[/COLOR] tweenThing:Tween = [COLOR=#993300]new[/COLOR] Tween[COLOR=#000000]([/COLOR]videoCont, [COLOR=#0000ff]"_alpha"[/COLOR], Strong.[COLOR=#000000]easeOut[/COLOR], [COLOR=#000000]100[/COLOR], [COLOR=#000000]0[/COLOR], [COLOR=#000000]3[/COLOR], [COLOR=#993300]true[/COLOR][COLOR=#000000])[/COLOR];
[COLOR=#000000]}[/COLOR]
[COLOR=#000000]}[/COLOR];
[COLOR=#000000]}[/COLOR]