Choochoo
Content Type
Profiles
Forums
Store
Blog
Product
Showcase
FAQ
Downloads
Posts posted by Choochoo
-
-
Whew solved it... it works just fine, I was using a BorderContainer in Flash builder 4 and when i would do this
rollOver.append(TweenMax.to(border,.1,{borderWeight:7}));
it would not work, so I had to give it its own custom made stroke component and then animate that.
i.e.
rollOver.append(TweenMax.to(thestroke,.1,{weight:7}));
SOLVED thanks!
-
I am using the new flash builder 4, and have a stroke on one of my containers, was wondering if I could animate its stroke weight somehow.
-
I am converting an entire slideshow into TweenMax, I love it, its way easier than what was in before
Problem: When loading dynamic pictures (large pictures) it lags the animation on every load. It loads the picture, attachs it to a MC, then throws it to the animation, there is say, 70 pictures, and I tell it to start on the 3rd picture, so everytime a new picture is loaded, it lags the animation slightly. Is there a better way of doing this or tricks of optimization?
Thanks!
function add_to_mc(mc:movieclip) { time = 14;//total duration of one picture fadetime = 2;//how long fades takes maintl.addLabel(i.toString(), maintl.duration); if (maintl.duration == 0) { maintl.append(TweenLite.to(mc, time, {onStart:checkCarousel,ease:Linear.easeNone, _x:nEndLeft, _y:nEndTop, _width:nEndWidth, _height:nEndHeight } )); } else { maintl.append(TweenMax.to(mc, 0.1, { _visible:true } ), -fadetime); maintl.append(TweenLite.to(mc, time, {onStart:checkCarousel,ease:Linear.easeNone,_x:nEndLeft, _y:nEndTop, _width:nEndWidth, _height:nEndHeight } ), -fadetime); } maintl.append(TweenMax.to(mc, fadetime, {ease:Linear.easeNone,autoAlpha:0 } ),-fadetime); } }
edit: I was maybe thinking of creating the entire Timeline with fake movieclips with predermined sizes, then just inserting the pictures into them, so nothing new is created while playing the timeline
-
I figured it out, it was user error, thanks!
-
try taking off the () on RemoveLeft see what happens
-
is this the same for as2? because I have identical code to that, and it doesn't hit the onComplete function unless I have the () on it.
-
try putting append instead of insert
if that doesn't work, add the onComplete function to the TweenMax.to instead of the timeline, see what you get.
-
Anybody know of fast code that will remove all tweens in a label
example:
Timeline.addLabel("first",0);
Timeline.append(some_tween);
Timeline.addLabel("second",Timeline.TotalDuration);
Timeline.append(some_tween2);
Best way to remove the some_tween2, as well as the "second" label name, so it just goes back to
Timeline.addLabel("first",0);
Timeline.append(some_tween);
in the timeline
-
I do
my_timeline.tweenTo("label_name",{onComplete:TweenTo_finished});
though when label_name is hit, it has a callback function.
it does the callback function, but never gets to TweenTo_finished function.
-
So I figured out what was going on in my flash file.
for my main timeline it was
timeline.addCallback(shrinkMe,"images");
timeline.tweenTo(0,{onComplete:the_function});
if tweening back, and hitting a callback, it won't go to "the_function" it'll just do the callback, is there a way around this?
-
I recreated a small sample file and it worked perfectly, for some reason its just not working for me, its not a greensock issue Thanks.
-
code:
main_timeline.tweenTo(main_timeline.getLabelTime(main_timeline.currentLabel),{onComplete:menu_addon,onCompleteParams:[category,option]});
I am basically
Going forward 111111111>22222222222>
back tracking 111111111>
clearing...
recreating, and going forward again 111111111111>333333333>
onComplete randomly gets triggered after it reverses the 222222222222>
any work arounds? or ideas?
-
Yeah i am sorta having a problem with the same thing... not sure if I have it setup correctly
tl.insert(TweenMax.to(myText,.4,{glowFilter:{color:0x0000FF, alpha:1,strength:9, blurX:100, blurY:50}}),0);
tl.insert(TweenMax.to(myText,.12,{glowFilter:{color:0xFFFFFF, alpha:1,strength:2, blurX:1.5, blurY:1.5,overwrite:false}}),0);
the second one kills the first one
-
like a onStart?
var b:button = ---------;
var capturedX:Int;
TweenLite.to(b,2,{onStart:captureX});
function captureX():void
{
capturedX = b.x;
}
if thats wrong, then I'm lost on the question
-
var invisible_menu : Number = 0
var visible_menu : Number = 0
//Rollover btn1
menu_mc1.addEventListener(MouseEvent.ROLL_OVER,showMenu);
menu_mc1.addEventListener(MouseEvent.ROLL_OUT,hideMenu);
var myTween:TweenLite;
function showMenu(event:MouseEvent) :void
{
myTween = TweenLite.allTo([menu_mc2,menu_mc3,menu_mc4,menu_mc5,menu_mc6,menu_mc7,menu_mc8,menu_mc9], .2, {y:"+29",ease:Linear.easeIn});
}
function hideMenu(event:MouseEvent):void
{
myTween.duration *= 2
myTween.reverse();
}
not tested, but its something like that.
-
You're right, when remaking it, I found code that set my "timeline.reverse = true, timeline.totalProgress = 100"
thats whats doing it.
How about this, attached is a demo of what I'm doing, whats a better way of doing this effect without having to do totalProgress= 0, timeline.reversed = true?
-
code goes like this.
var main_tl:TimelineMax = new TimelineMax();
var one_tl:TimelineMax = createTween(); //reversed timeline function
one_tl.append(createTween2()); //normal timeline function
function createTween():TimelineMax
{
var temp:TimelineMax = new TimelineMax();
//temp inserts of timelines;
temp.reversed = true;
return temp;
}
function createTween2():TimelineMax
{
var temp:TimelineMax = new TimelineMax();
//temp inserts of timelines;
return temp;
}
main_tl.append(one_tl); //// or main_tl.insert(one_tl,0); doesn't matter
main_tl.play();
//////////////////end code//////////////////////////
now what happens is, if i do one_tl.play(); it works fine, if I append it to main_tl it starts it at the end instantly, pretty much like a one_tl.gotoAndStop(one_tl.duration) code would do. BUT, if I say main_tl.restart(); it works just fine. for some reason main_tl is going to the end and I have to restart it everytime, I just want to have it play at 0.
the reason for this, is cuz i'm going to keep adding to main_tl and I do not want to keep having to rewind in a timeline just to play where it last appended.
Thanks!
edit:fixed function return values
-
also
thetimeline.gotoAndStop(thetimeline.getLabelBefore(thetimeline.currentTime));
-
sorry, didn't look at all the timeline features
solve is:
thetimeline.gotoAndStop(thetimeline.currentLabel);
-
psuedo:
create item
create label("0");
create tween for item;
add to timeline
create item
create label("1");
create tween for item;
add to timeline;
timeline.play();
if(timeline.totalProgress is past Label("0") but not past Label("1"))
thetimeline.gotoAndStop("0");
end psuedo
I have everything setup except how to tell it to goback and stop on its previously passed label
-
check my edit, let me know the results
-
fb_mc.onRollOver=function(){
myTween.play();
}
fb_mc.onRollOver=function(){
myTween.reverse();
}
they are both on rollover, change the reverse to on RollOut, and just stop the tween after its made, make sure you've imported the plugins and ran the plugin enabler;
var myTween:TweenMax = TweenMax.to(fb_mc, 1, {colorMatrixFilter:{colorize:0xff0000, amount:1}});
myTween.stop();
fb_mc.onRollOver=function(){
myTween.play();
}
fb_mc.onRollOut=function(){
myTween.reverse();
}
-
Hey thanks, I figured it out.
Need to make sure the material is a MovieMaterial, created from a movieclip....example:
private function maskPlane(w:Number,h:Number,thex:Number,they:Number):Plane
{
var mm:MovieMaterial = new MovieMaterial(createFill(w,h),false,true);
var p:Plane = new Plane(mm,w,h);
p.position = this.position;
p.z -=5;
p.x = thex;
p.y = they;
p.useOwnContainer = true;
return p;
}
private function createFill(w:Number,h:Number):MovieClip
{
var holder:MovieClip = new MovieClip();
holder.graphics.beginFill(0x58595B);
holder.graphics.drawRect(0, 0, w, h);
holder.graphics.endFill();
return holder;
}
make sure .usecontainer = true as well (as shown above); and also what ukla said, moviematerial needs to be (true) for animated... then to animate, you animate the movie of the plane's material.
TweenMax.allTo([MovieMaterial(top.material).movie,MovieMaterial(left.material).movie,MovieMaterial(right.material).movie,MovieMaterial(bottom.material).movie],.3,{tint:0xC1DCF7}),0);
might be ugly code, BUT IT WORKS, WOOHOO
-
Thanks for the reply, you give awesome support here by the way.
I tried your code and it went through, but it still didn't change the tint, I tried using the tint in the way you said, the colortransform in the way you said, and added both plugins.
I am sure it works on a plane with a color material background,but I have a bitmapmaterial that I applied to my plane, and it doesn't want to budge at all. Regular X,Y,Z and rotation tweening works perfectly though.
Easy way to reverse a timeline and add it to bigger timeline
in GSAP (Flash)
Posted
psuedo:
var t1:timelinemax = new timelinemax();
t1.append(something1);
t1.append(something2);
t1.append(something3);
var t2:timeline max = new timelinemax();
t2.append(other1);
t2.append(other2);
t2.append(other3);
t2.reverse = true;
t1.append(t2);
t1.play();
//////
the order should be
something1
something2
something3
other3
other2
other1
anyway to do this?