Jump to content
Search Community

bastrix

Members
  • Posts

    12
  • Joined

  • Last visited

bastrix's Achievements

0

Reputation

  1. Hi! I'd like some general advice regarding what to use for a tile based game built in as3 + starling framework. I have a few requirements and I'm not sure where to start. So anyway I have a cool looking dude walking in this little world, which is tile based. Pathfinding works fine, and it's all cool... BUT... If you have played any tile based retro games you can see sometimes the pathfinding animation is a bit harsh when it changes direction or when you need to keep the character aligned with the grid. So... I'd like to make it a bit smoother avoiding the small jumps to align up with the grid, and also it would be cool to be able to use small parabole animation when moving diagonally. The thing is, I'd also need to be able to pause the animation and resume. Soooo... I know you can pause with TimelineLite / TimelineMax right? and also I think there is some bezier curve funcitionality... I'd appreciate some general advice on this. Thanks!
  2. Ah ok I just realized I should have been using "shortRotation", but I still have one question, if I want to use transformMatrix and rotate to the nearest point, I would have to do the calculations myself right?
  3. Hey all, I understand that TweenMax simulates flash behaviour and always rotates to the nearest point, but I'm having some problems in some ocassions, I'm not exactly sure why... I have a movieclip that has an initial rotation of -161, I want it to rotate to 147. Ok, so with some basic calculations give me the following: A ClockWise ROTATION: - Would take 308 degrees. A CounterClockWise ROTATION: - Would take 51 degrees. However, when I rotate the movieclip it rotates ClockWise direction, which would take longer. What am I missing here? What I did: Placed a movieclip on canvas, set the rotation to -161 and then call this: TweenMax.to(arrow, 1, { rotation:147 }); Many thanks in advance.
  4. Jaaaaysus! Thanks a million! I spent ages trying to figure out what I was doing wrong... This was extremely helpful. THANKS!
  5. Ok I managed to upload the example so you can see it: [media=]http://dynamic.flash1.dev.socialpoint.es/static/temp/tweenliteSkew.swf[/media] The line of code to skew: TweenLite.to(mc, 9, { useFrames:true, ease:ClassicEase.ease, easeParams:[0], transformMatrix:{a:0.466400146484375, b:-0.884552001953125, c:0.884552001953125, d:0.466400146484375, tx:-47.05, ty:-38.5}}); Thanks
  6. BTW that ClassicEase is just simulating the default flash ease, but any ease you use gives the same result. Thanks!
  7. Hi Jack, thanks for replying, I also sent you a msg since I can not upload a fla file here I can send you an example if you need it. But basically I have very simple movieclip, I skew it using flash IDE, then grab the details I need to do EXACTLY the same with a transformMatrix, but it skews in a weird way. It seems like its fliping and the same time: TweenLite.to(mc, 9, { useFrames:true, ease:ClassicEase.ease, easeParams:[0], transformMatrix:{a:0.466400146484375, b:-0.884552001953125, c:0.884552001953125, d:0.466400146484375, tx:-47.05, ty:-38.5}});
  8. Hi all, I'm working on a tool that gathers info from the xml files of a xfl flash project. I then need to reproduce some of the animations I find in that xml using tweenlite. Within the xml files when I find something like this on a keyframe of an ordinary flash tween: -<DOMFrame keyMode="22017" motionTweenSnap="true" tweenType="motion" duration="10" index="18"> -<elements> -<DOMSymbolInstance centerPoint3DY="-119.5" centerPoint3DX="70.65" libraryItemName="Symbol 12"> -<matrix> <Matrix ty="-124.75" tx="65.4" d="0.998733520507813" c="-0.050689697265625" b="0.050689697265625" a="0.998733520507813"/> </matrix> -<transformationPoint> <Point y="5.3" x="6"/> </transformationPoint> </DOMSymbolInstance> </elements> </DOMFrame> I try gathering the matrix and other info and then doing this: myTimeline.insert(TweenLite.to(mc, tweens[t]._durationFrame, {useFrames:true, ease:ClassicEase.ease, easeParams:[tweens[t]._acceleration], alpha:tweens[t+1]._alpha, transformMatrix:{a:_a, b:_b, c:_c, d:_d, tx:_tx, ty:_ty}}), 0); Most of it works fine, but I've found that animations taht use skew within flash behave in unpredictable ways. It's like the skew from tweenlite is not the same as the flash one. Any help will be appreciated. Thanks.
  9. Hey all, I'm building a flash strategy browser game where you can send attacks to other players represented on a map. So whenever you send an attack to an enemy I want to display an animation of an icon moving towards the target. My concern is that these animations could last as long as minutes. At the moment I'm calculating the angle and doing it manually and I'm not using Tweenlite. Do you think using Tweenlite would be a good idea in this scenario or will it make flash player struggle? By the way the user has the option to switch sections whilst he is in the game of course, so he might switch from the map to the base, and back to the map. I would have to remove the moving object and the tween, and place it back on the appropiate position when he re-enters the map. Thanks for your help.
  10. Thanks, its actually one of the first things it mentions on the FAQ. But I missed that bit. That works.
  11. Hi all, I'm trying to convert all my tweens to TweenLite in the code for my current project, but I'm having a problem animating the same movieclip with different calls to the "to" method. What I mean is... isntead of putting the tween for "x" property and the "y" property in the same call, for isntance, I need to put it in different calls, so I would have something like this: TweenLite.to(_root.circle_mc, 1, {_y:400, ease:Strong.easeIn}); TweenLite.to(_root.circle_mc, 1, {_x:0, ease:Strong.easeIn}); This worked with the Tween class, but it fails with the TweenLite, as it only accepts the last call. I need to have it in different calls. So how can I get passed this ? Many thanks in advance for your help
×
×
  • Create New...