Jump to content
Search Community

Theigno

Members
  • Posts

    3
  • Joined

  • Last visited

Theigno's Achievements

1

Reputation

  1. I don't want any frames to be skipped, the seond question is basically correct. I want to slow the animation down so, so when an animation runs at 30 fps is should run at half speed compared to the rest of the 60fps animations, and basically it's about figuring out the correct duration for the different framerates. I am using the frame plugin in the code (frame:totalF, so it tweens everything to the last frame of the animation). I attached a fla with some example animations. The number animation should run at 5 fps and the two propellers at 30 while (hopefully) demonstrating the problem of the missing first frame I talked about earlier. ex ample.zip
  2. I'm currently working on a flash project that includes a rather large number of looping frame per frame sprite animations and while the main swf runs at 60fps most of the sprite animations need to run at a considerably lower framerate, some at 30, some at 12 some maybe even lower. Because flash doesn't have a way to tweak the fps of individual animations (except adding each frame multiple times which I found to be cumbersome and with framereates that aren't divisible by 60 even impossible) I turned to TweenMax and TimelineMax and while I was at first dissapointed that the "ticker" property didn't exist (?) in the Flash version, I played around with it for a while and I thought I had discovered a solution that would make an animation with an arbitrary number of frames run at any framereate I wanted. I would add the frames into a movieclip with this code: var fps:Number = 25 var finalduration:Number = ((1000/fps)*(totalF))/1000; var totalF:Number = this.totalFrames; var del:Number = finalduration/totalF; var tween = new TweenMax(this, finalduration, {frame:totalF, repeat:-1, ease:Linear.easeNone}); the main trick was to define the duration by calculating the number of milliseconds one single frame needs to be visible multiply it by the number of frames in the animation and then by 1000 to get the value in seconds that tweenMax accepts, so that in the example above each frame would be visible for exactly 0,04 seconds resulting in a 25 fps animation. ...but for some reason this method doesn't seem to work. I noticed that there were several quirks in the resulting animation: The first frame would be skipped entierly, the second and third frame would be tweened about twice as fast as the rest of the animation, teh middle part would work fine and then the last frame would be cut short (it's displayed but not for as long as it should be) I'm not exactly sure what's causing those problems... It was possible to get the tween to display the first frame by duplicating it but then the duration would of course be too long. I'm currently testing out some other possible solutions I thought of (setting useFrames and caluclating the tame based on the 60fps, a timelineMax based method that defines a set delay between every single tweened frame...) but I kinda feel like my method should work and maybe I'm just overlooking something....
  3. this is probably a rather basic problem to solve... I'm working on a project consisting of three "container" movieclips each of which contain multiple child movieclips that are tweened with TweenMax and what I need are buttons to pause and resume the child twens in each indiviudal container MC. I managed to stop the tweens using the "KillChildTweensOf()" function but I'm not finding a way to resume the tweens again. functions like pauseAll and resumeAll don't seem to be able to be targeted at the specific containers, and targeting all child movieclips separately seems a bit overcomplicated.
×
×
  • Create New...