Jump to content
GreenSock

Search In
  • More options...
Find results that contain...
Find results in...

squibn

Members
  • Posts

    12
  • Joined

  • Last visited

squibn's Achievements

0

Reputation

  1. Hi Greensock, Apologies, I didn't mean to sound like I wanted you to work it all out for me ...just frustrated that I couldn't work it out myself...I'll get to the bottom of it tho that's for sure:)....just might take me a while!... I'll look into your suggestion tho that's for sure! Kudos for such an amazing set of Classes by the way...love em! Squibn
  2. Hi there, I sure hope someone can help with my liquid stage issue, as its essential I get it working as my whole site hinges on it!! Basically, I've incorporated Liquid Stage into my Gaia built site and itreally works a treat! ...But (there's always a but!!) ....the home page has a placed asset in it which is a swf that makes use of a parallax effect, where the placement of the mouse controls the scrolling to the left and right of a MovieClip. This works fine by itself, but when placed within my Gaia framework the "wheels fall off!!" I'm pretty sure this is because the parallax placed swf references the stage, and wondered if there was a work round, or alternative solution? It doesn't have to be a placed swf, it could be actually within the framework, but this is just how I like to build my sites. My code is this....within my Gaia project... package pages{ import com.gaiaframework.templates.AbstractPage; import com.gaiaframework.events.*; import com.gaiaframework.debug.*; import com.gaiaframework.api.*; import flash.display.*; import flash.events.*; import gs.*; import com.greensock.layout.*; public class HomePage extends AbstractPage { public function HomePage() { super(); alpha=0; } override public function transitionIn():void { super.transitionIn(); TweenLite.to(this, 0.3, {alpha:1, onComplete:transitionInComplete}); } override public function transitionOut():void { super.transitionOut(); TweenLite.to(this, 0.3, {alpha:0, onComplete:transitionOutComplete}); } override public function transitionInComplete():void { super.transitionInComplete(); init(); } public function init():void { var myContainer:MovieClip = new MovieClip(); this.addChild(myContainer); myContainer.addChild(assets.homePage.loader); myContainer.alpha=1; myContainer.visible=true; myContainer.x=0; myContainer.y=0; assets.homePage.alpha=1; assets.homePage.visible=true; var ls:LiquidStage=new LiquidStage(this.stage,1624,668,1024,668); var area:LiquidArea=new LiquidArea(this,0,0,1624,668); area.attach(myContainer, ScaleMode.PROPORTIONAL_OUTSIDE); ls.update(); } } } code within my swf asset... import com.greensock.*; import com.greensock.easing.*; var easeType = Expo.easeOut; var xmouse:Number = 0; var xPct:Number = 0; var speed:Number = 2; stage.addEventListener(MouseEvent.MOUSE_MOVE, render); function render(e:MouseEvent):void { if( e.stageX > stage.stageWidth/2) { xmouse= -(e.stageX -stage.stageWidth) - stage.stageWidth/2; //-512 } else { xmouse = ((stage.stageWidth/2) - e.stageX); //512 } xPct = Math.round ((xmouse/stage.stageWidth) * 200); var skyXto:Number = ((xPct/100) * (sky_mc.width - stage.stageWidth)/2) + stage.stageWidth/2; TweenMax.to(sky_mc,speed, {x:skyXto, ease:easeType}); var fieldXto:Number = ((xPct/100) * (scrollPanel.width - stage.stageWidth)/2) + stage.stageWidth/2; TweenMax.to(scrollPanel,speed, {x:fieldXto, ease:easeType}); } I appriciate that this may be one for the Gaia forum, but thought I'd try here first as my project uses Liquid Stage? Any help would be fantastic, and alleviate a huge amount of head scratching!! Here's hoping! Squibn
  3. Thats exactly what I was after!!!...I'd never have worked that out! Thank you Greensock... you've thought of everything! Cheers, Squibn
  4. Hi there, I can't seem to work out how to control a movieclips timeline whilst working with timelinemax? What I've got is a series of animations which are scripted but one of those animations is keyframed on one of the movieclips timeline. So what I'm trying to do is let the scripted animations run through, but the movieclip animation hold until its turn to play through, then once its played carry on with the scripted animations, so my code so far looks like this, and I'll show the point that I want the keyframed animation to play through... var myTimeline:TimelineMax = new TimelineMax(); myTimeline.append(TweenMax.from(logo, 0.5, {autoAlpha:0, ease:Back.easeOut})); myTimeline.append(TweenMax.from(baseTint, 0.5, {_yscale:0, ease:Back.easeOut})); //////////////////////// Movieclips keyframed animation here... //////////////////////// myTimeline.append(TweenMax.from(mainHeadline, 0.5, {autoAlpha:0, ease:Back.easeOut})); myTimeline.play(); I tried using "frameLabel" but lost my way! If I'm not explaining my self very well I'll try make things more clear, but basically its scriped animation, then a movieclips timeline animation, then back to scripted animation. Any help would be superb! Cheers, Squibn
  5. Hi there, I'm not entirely sure if this is a TimeLineMax question or a general actionscript question but here goes anyway... What I'm wanting to do is animate a set of MovieClips all at once rather than one after the other, what I've go so far is this... var button:Array = [button1, button2, button3, button4, button5, button6, button7, button8]; var myTimeline:TimelineLite = new TimelineMax({repeat:-1, yoyo:true}); for( var i:int = 0; i < button.length; i++ ){ myTimeline.append(TweenMax.to(button[i], 1, {scaleX:1.2, scaleY:1.2, ease:Sine.easeIn})); myTimeline.append(TweenMax.to(button[i], 1, {scaleX:1, scaleY:1, ease:Sine.easeIn})); } myTimeline.play(); Which almost works, in that it animates each clip one after the other, but what I actually want it to do is animate all the clips at the same time, would someone be able to explain where I'm going wrong in my code setup? Thanks, Squibn
  6. Apologies if this is seen to be jumping on the end of someone else's post but my question is very similar to the original poster so though it'd be OK to do so, all I 'm trying to work out is how do I now fire a second function? What I'm trying to do is tween a MovieClip back to zero, then remove the Clip (exactly what has been done in the original post... but now I want to fire another function that does something else.) I'm a little stumped
  7. That is EXACTLY what I'm after...I can not fault the capabilities of this superb engine...thanks greensock!
  8. Hi there, Is this something that can be achieved using TweenMax, and if so whats would be my best route to go... What I'm wanting to do is simulate a mouse cursor moving over a button so that it changes from an arrow to the pointer when it travels over a particular movieclip as if to simulate someone moving their cursor over a button. There would be no actual user interaction as its all automated to simulate a "How to use" animation. I was planning on using TweenMax's bezierThrough to achieve the movement of a MovieClip (the cursor) with two frames inside, one of the arrow, and the other of the pointer, this would then travel across the screen and when it entered a particular MovieClip would go to frame two (which would make the arrow change to the pointer) and then when it went back out of the MovieClip go back to frame one (thus change back to the arrow.)..so it would look like an animation of a mouse cursor going over a button. I hope I'm being clear in what I'm trying to achieve, if I'm not then I'll try explain further!! I'm just not sure what would be the best tool to use in this amzing tweening engine! Cheers, Squibn
  9. Got it... var frameTween:TweenMax = new TweenMax(mc, mc.totalFrames - 1, {frame:"4", ease:Linear.easeNone, useFrames:true, paused:true}); Should have tried before posting
  10. Ahhh, I see, now that you've explained it like that I understand when to use timelineLite...thank you So using TweenMax's "frame" feature is it possible to control the amount of frames that the playhead travels to per click? As in every time a button is pressed the playhead travels say 4 frames?
  11. Hi There, I'm having a bit of trouble animating a nested movieClips frames. What I've got in my fla are two movieClip buttons on the stage, and a third movieClip (myTimeline) that has a series of animations along its timeline, and what I'm wanting to do is have the two buttons control the third movieClips timeline, so when one button is pressed the third movieClips timeline animates along and when its gets to the end of the keyframes goes back to the first keyframe and loops through continuously, and then when the other button is pressed it reverses the third moveiClips timeline and then loops through in the opposite direction (so basically the two buttons control the third movieClips timeline forward and backwards). From reading the documentation timelineLite would be the way to go (correct me if I'm wrong!). But I just can't get it working the code I've got looks as follows... package { import flash.display.MovieClip; import flash.display.SimpleButton; import flash.events.MouseEvent; import com.greensock.*; public class Navigation02 extends MovieClip { public function Navigation02() { myTimeline.stop(); rotateOneWay.addEventListener(MouseEvent.MOUSE_DOWN, OneWayPress); rotateOneWay.addEventListener(MouseEvent.MOUSE_UP, OneWayRelease); rotateOtherWay.addEventListener(MouseEvent.MOUSE_DOWN, OtherWayPress); rotateOtherWay.addEventListener(MouseEvent.MOUSE_UP, OtherWayRelease); } private function OneWayPress(evt:MouseEvent){ var myTimeline:TimelineLite = new TimelineLite({useFrames:true}); myTimeline.gotoAndPlay(this.currentFrame); } private function OneWayRelease(evt:MouseEvent){ var myTimeline:TimelineLite = new TimelineLite({useFrames:true}); myTimeline.stop(this.currentFrame); } private function OtherWayPress(evt:MouseEvent){ var myTimeline:TimelineLite = new TimelineLite({useFrames:true}); myTimeline.reverse(); } private function OtherWayRelease(evt:MouseEvent){ var myTimeline:TimelineLite = new TimelineLite({useFrames:true}); myTimeline.stop(this.currentFrame); } } } I hope I'm explaining myself clearly?? Here's hoping... Squibn
  12. Hi all, Having trouble executing what I thought was a fairly simple animation, wondered if anyone could tell me if this is the best way of doing this kind of animation... What I've got is a simple conveyor belt with several boxes on it, what I'm trying to do is make the boxes look like they fall off the belt when they get to the end, the animation that I've put together does this but there are two problems with it, firstly the items only animate one at a time, when I actually need them to travel along the conveyor belt at the same time, secondly there is a slight pause between them getting to the end of the belt and them falling off. This is my code so far... import com.greensock.*; var myTimeline:TimelineLite = new TimelineLite(); myTimeline.append(new TweenLite(box1, 5, {x:600})); myTimeline.append(new TweenLite(box1, 0.5, {rotation:90, x:990, y:300, alpha:0})); myTimeline.append(new TweenLite(box2, 5, {x:600})); myTimeline.append(new TweenLite(box2, 0.5, {rotation:90, x:990, y:300, alpha:0})); myTimeline.append(new TweenLite(box3, 5, {x:600})); myTimeline.append(new TweenLite(box3, 0.5, {rotation:90, x:990, y:300, alpha:0})); Anyone point me in the right direction? Here's hoping! Cheers, Squibn
×