Ok, am I missing something... ?
This works, but starts playing the MC at the same time as the tween
and not at the end.
function formVisible():Void {
this.quoteRequest_mc.gotoAndPlay("startQuote");
}
function showForm() {
this.quoteRequest_mc.ySlideTo(quoteShowY,8,"easeincirc",0,formVisible
(),80,6);
}
________________________________________
This doesn't work... (with or without the :Void)
function formVisible():Void {
this.quoteRequest_mc.gotoAndPlay("startQuote");
}
function showForm() {
this.quoteRequest_mc.ySlideTo(quoteShowY,8,"easeincirc",
0,formVisible,80,6);
}
________________________________________
and this doesn't work...
function showForm() {
this.quoteRequest_mc.ySlideTo(quoteShowY,8,"easeincirc",0,function()
{this.quoteRequest_mc.gotoAndPlay("startQuote");},80,6);
}
Am I not calling basically the same thing every time?
And why would the () make it work but not treat it as an "end" call
back function,
instead just trigger the function as soon as that line is read??
Thanks in advance.
Karl
On Jul 14, 2009, at 5:09 PM, Karl DeSaulniers wrote:
Ahhh, spoke too soon.
It worked on some, but not on others.
funny thing is its almost identical code.
just a difference in how long the tween goes for.
Is it possible that my tween timing could nullify my callback????
Karl
On Jul 13, 2009, at 1:51 AM, Jiri wrote:
nice! Good luck.
Jiri
Karl DeSaulniers wrote:
Thanks Jiri,
That worked perfectly.
I knew I had been looking at this code too long
and that it was something as simple as deleting a couple of
parenthesis.
Thanks again..
Karl
On Jul 12, 2009, at 2:47 PM, Jiri wrote:
I think that it makes sense that the functions like formHidden()
gets called, because that is what you put down.
It think you will need to put only the function name/ref like so:
this.quoteRequest_mc.ySlideTo(quoteHideY,4,"easeoutbounce",.5,
formHidden ,20,4.5);
Give it a try.
Jiri
Karl DeSaulniers wrote:
Hello List,
I'm having an issue getting my MC_Tween2 scripts to behave
appropriately. AS2.
I am trying to set a function that triggers after the tween is
done.
I am sure this is easier than I am figuring, but I'm stuck.
I can get the tweens to work, but they trigger the function
while tweeneing.
[code eg]
var beginAlpha = 0;
var endAlpha = 100;
var quoteShowY:Number = 219.9;
var quoteHideY:Number = -219.9;
this.quoteRequest_mc._y = quoteHideY;
function formVisible() {
if (!this.quoteRequest_mc.isTweening()) {//this way doesn't
work at all ???????
this.quoteRequest_mc.gotoAndPlay(2);
}
}
function formHidden() { //this way plays while hideForm() is
Tweening
this.quoteRequest_mc.gotoAndStop(1);
}
function showForm() {
this.quoteRequest_mc.alphaTo(endAlpha,3.5,"easeoutquint",.5);
this.quoteRequest_mc.ySlideTo(quoteShowY,4,"easeoutbounce",.
5,formVisible(),20,4.5); }
function hideForm() {
this.quoteRequest_mc.alphaTo(beginAlpha,3.5,"easeoutquint",.
5);
this.quoteRequest_mc.ySlideTo(quoteHideY,4,"easeoutbounce",.
5,formHidden(),20,4.5); }
showForm();
What on earth am I doing wrong??
It all looks like it should work!
Also, on the tweens themselves, they dont play very smooth.
Am I doing somthing wrong with the timing or the ease period or
amount of ease? What?
I want them to play somewhat quickly, but smooth.
Thank you for any help.
Karl DeSaulniers
Design Drumm
http://designdrumm.com
_______________________________________________
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
_______________________________________________
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Karl DeSaulniers
Design Drumm
http://designdrumm.com
_______________________________________________
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
_______________________________________________
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Karl DeSaulniers
Design Drumm
http://designdrumm.com
_______________________________________________
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Karl DeSaulniers
Design Drumm
http://designdrumm.com
_______________________________________________
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders