where to put gotoAndPlay within a function
for reference: fulfordsupply.com/home.htm
try communicate possible.
on first frame, have:
6 buttons (p1 through p6)
holder mc_holder, holds mc_pages, {a movie clip shows 6 pages (each own movie clip, page1 though page6) tweened across screen, made if pages being "flipped" through}
following code (thanks dawsonk):
code:
stop();
var _holder = mc_holder.mc_pages;
var picked;
p1.goal = 1;
p1.onrelease = gopage;
p2.goal = 10;
p2.onrelease = gopage;
p3.goal = 20;
p3.onrelease = gopage;
p4.goal = 30;
p4.onrelease = gopage;
p5.goal = 40;
p5.onrelease = gopage;
p6.goal = 50;
p6.onrelease = gopage;
function gopage() {
_holder.goal = this.goal;
_holder.onenterframe = function() {
if (this.goal>this._currentframe) {
this.gotoandstop(this._currentframe+1);
} else if (this.goal<this._currentframe) {
this.gotoandstop(this._currentframe-1);
} else {
delete this.onenterframe;
}
};
}
}
on each of 6 pages, have animation.
the problem is, movie loads, these animations begin play. looking solution animations not play until page viewed.
i thinking can put stop on first frame of each page, , a frame label ("go") on second frame.
can add (my knowledge limited say... gotoandplay (go") ) code shown above? have tried messing around have not yet had results.
thanks in advance.
just attach stop() first frame of each of movieclips. don't think you'll need else.
More discussions in ActionScript 1 and 2
adobe
Comments
Post a Comment