Jump to content


  • Posts

  • Joined

  • Last visited

joshdickens's Achievements


Newbie (1/14)



  1. Thanks for the great documentation around LinePath2D, definitely got things up and running quickly. Two quick questions. I have the 'addFollower' autoRotate set to true and when it hits a point it does rotate, but it's an instant rotation. Is there a way to tween this rotation? I'm using this in a Starling game and the rotation needs to be in radians instead of degress. I did some digging and found this line #257 in LinePath2D.as: pp.angle = Math.atan2(pp.xChange * m.b + pp.yChange * m.d, pp.xChange * m.a + pp.yChange * m.c) * _RAD2DEG; I removed the '_RAD2DEG' and that seemed to do the trick, as far as correct rotation - is there a better way then this to yield radians? Thanks!
  2. Coming from AS3 this was super easy - I just set to "undefined" and it would feed me back the original value. Here's my example based upon that statement - it's self explanatory. if (isMouseOver) { TweenMax.to(column.parent(), 1, {css:{backgroundColor: "#ba0000"}, ease: Power3.easeOut}); } else { TweenMax.to(column.parent(), 1, {css:{backgroundColor: undefined}, ease: Power3.easeOut}); } But when I roll off the div it just makes the background color black instead of reverting back to it's original color. Any help would be awesome! I miss AS3 - all this JS/CSS/HTML is a lot more typing. Feels like taking 2 steps backwards honestly - but a necessary evil, I suppose. Thanks - Josh.
  3. Hey folks, any help appreciated. Example scenario: I have fifty circles on screen each traveling to a different location (ex: circle1): TweenMax.to(circle1, 2, {x: 500, y:700}); So all fifty are moving at a 2 second speed to their destinations. What I want to do is .5 seconds into their movement I want to insert an additional 3 seconds to slow down their speed and introduce a visual slow motion effect and then .5 seconds later return them to their original speed. Thanks, Josh
  4. I can take that away and when I do it not longer breaks but then the liquistagearea no longer moves when resizing swf either, it just stays at it's original X/Y. Do I just need to write my own positioning code for the liquidstagearea? Thanks, Josh
  5. Hey Folks, I have a ui that sits at the bottom of the scren. My initial screen is setup for 1920x1080. I have a safe view area that's setup for 80% of that resolution. My safe area class that runs on stage resize, very simple: // Set width and height. this.width = Math.floor(stage.stageWidth * .8); this.height = Math.floor(stage.stageHeight * .8); // Center safe area. this.x = Math.floor((stage.stageWidth / 2) - (this.width / 2)); this.y = Math.floor((stage.stageHeight / 2) - (this.height / 2)); So that gives me a box that shows my safe area at all times. This is what I have for setting up my Liquidstage/Liquiarea: // Setup liquid stage. var ls:LiquidStage = new LiquidStage(stage, stage.stageWidth, stage.stageHeight, Math.floor(640 * .8), Math.floor(480 * .8)); // Setup HUD action bar. var hudActionArea:LiquidArea = new LiquidArea(this, safeArea.x, ((safeArea.y + safeArea.height) - hudActionBar.height), safeArea.width, hudActionBar.height, 0xff0000, Math.floor(640 * .8), Math.floor(480 * .8), Math.floor(stage.stageWidth * .8), Math.floor(hudActionBar.height), false, null, false); hudActionArea.attach(hudActionBar, { scaleMode:ScaleMode.PROPORTIONAL_INSIDE, vAlign: AlignMode.BOTTOM, crop: true } ); hudActionArea.pinCorners(ls.TOP_LEFT, ls.BOTTOM_RIGHT); hudActionArea.preview = true; ls.attach(hudActionArea, ls.BOTTOM_CENTER); The liquidstage uses the entire canvas, but the liquidarea is offset to match up with the safearea. When I first preview the SWF it looks fine, the preview area, is within the safe view but as soon as I resize the SWF, the preview area's height is larger and the UI get's pushed down to the bottom of that preview area and it's no longer in the safe area, but at the bottom of the canvas. It's scaling correctly, but I have no clue why it's resetting it's height and moving the UI down when I resize the SWF. Any help would be appreciated. Thanks, Josh