Jump to content


  • Posts

  • Joined

  • Last visited

Everything posted by Maggical

  1. Thought those were seconds :S
  2. I added this: var myTween:TweenMax = new TweenMax(line_mc, 1, {frame:32, repeat:-1, useFrames:true}); And the animation does not start, I tried adding this line: myTween.play(); And also: myTween.resume(); And nothing happens... Any ideas? From here I can start testing the other things...
  3. And how can I use a new Tween in a package? I have several functions that need to trigger the use of the Tween and the scoops are different :S
  4. Hi there, I have an animated movieclip with 32 frames (animated using frame animation, not a tween), it loops as a normal movieclip according to the frameRate of the .fla I wanted to accelerate this movieclip's animation on rollOver and thought a tween would be a good idea, any recommended way to do it instead of a tween + onComplete callback to start over? Thanks, Javier
  5. Just wanted to let you know that here: http://www.greensock.com/as/docs/tween/ ... lugin.html In the "Sample Usage" you are missing a } It says: TweenLite.to(mc, 1, {colorTransform:{tint:0xFF0000, tintAmount:0.5}); And it should say: TweenLite.to(mc, 1, {colorTransform:{tint:0xFF0000, tintAmount:0.5}});
  6. I'll go ahead and download the lastest version, just forgot about updating On the other hand, as soon as I have some free time (I'm running on a tight schedule) I'll post a quick example. Thanks, Javier
  7. Here's the class: package { /// import flash.display.Sprite; import flash.display.MovieClip; import flash.events.*; import flash.media.Sound; import flash.media.SoundChannel; import flash.media.SoundTransform; import flash.media.SoundMixer; import flash.net.URLRequest; import flash.utils.Timer; import flash.utils.ByteArray; /// // GreenScock TweenLite / TweenMax - Version: 11.1, Updated 10/21/2009 /// import com.greensock.*; import com.greensock.easing.*; import com.greensock.plugins.*; /// public class music extends Sprite { /// // VARIABLES /// private var url:String; private var boton:MovieClip; private var song:SoundChannel; private var soundFactory:Sound; private var FourierTransform:Boolean = false; private var arrayMixer:ByteArray = new ByteArray(); private var pan:int = 0; private var porcentLoad:Number = 0; private var pausePoint:Number = 0.00; private var isStarted:Boolean = true; /*----------------------- INIT -----------------------*/ /*----------------------- INIT -----------------------*/ /*----------------------- INIT -----------------------*/ /*----------------------- INIT -----------------------*/ /*----------------------- INIT -----------------------*/ /*----------------------- INIT -----------------------*/ public function music():void { /// } /*----------------------- UTILS -----------------------*/ /*----------------------- UTILS -----------------------*/ /*----------------------- UTILS -----------------------*/ /*----------------------- UTILS -----------------------*/ /*----------------------- UTILS -----------------------*/ /*----------------------- UTILS -----------------------*/ public function cargarMusic(mp3:String, que_boton:MovieClip):void { /// url = mp3; boton = que_boton; pausePoint = 0.00; /// SoundMixer.stopAll(); soundFactory = new Sound(); var request:URLRequest = new URLRequest(url); /// soundFactory.addEventListener(Event.COMPLETE, completeHandler); soundFactory.addEventListener(ProgressEvent.PROGRESS, progressHandler); soundFactory.load(request); } public function execMusic(e:MouseEvent):void { /// if(isStarted){ /// TweenLite.to(song, 1, {volume:0, onComplete:pauseMusic}); /// isStarted = false; } else{ /// song = soundFactory.play(pausePoint); song.addEventListener(Event.SOUND_COMPLETE, soundCompleteHandler); /// TweenLite.to(song, 0, {volume:0}); TweenLite.to(song, 2, {volume:1}); /// isStarted = true; } /// MovieClip(boton.parent).clickMusicaHome(); } public function playMusic():void { /// song = soundFactory.play(pausePoint); song.addEventListener(Event.SOUND_COMPLETE, soundCompleteHandler); /// //TweenLite.to(song, 0, {volume:0}); //TweenLite.to(song, 5, {volume:1}); } public function pauseMusic():void { /// pausePoint = song.position; song.stop(); } public function loopMusic():void { /// pausePoint = 0.00; song = soundFactory.play(pausePoint); song.addEventListener(Event.SOUND_COMPLETE, soundCompleteHandler); } private function soundCompleteHandler(e:Event):void { /// song.removeEventListener(Event.SOUND_COMPLETE, soundCompleteHandler); loopMusic(); } public function get MixerMusic():ByteArray { /// SoundMixer.computeSpectrum(arrayMixer, FourierTransform); return arrayMixer; } public function set FourierMusic(valor:Boolean):void { /// this.FourierTransform = valor; } public function get FourierMusic():Boolean { /// return FourierTransform; } /*----------------------- LISTENERS -----------------------*/ /*----------------------- LISTENERS -----------------------*/ /*----------------------- LISTENERS -----------------------*/ /*----------------------- LISTENERS -----------------------*/ /*----------------------- LISTENERS -----------------------*/ /*----------------------- LISTENERS -----------------------*/ private function completeHandler(event:Event):void { /// playMusic(); MovieClip(boton).lines_mc.play(); } private function progressHandler(event:ProgressEvent):void { /// porcentLoad = Math.round((event.bytesLoaded*100)/event.bytesTotal); } } } In there if I remove the comments from the playMusic function tween volumes it gives me the error I mentioned... And the plug-in isn't active :S Weirddddddddddddddd... Usage like this: var music_home:music = new music(); music_home.cargarMusic("music/music_site.mp3", music_mc); Hope it helps...
  8. Yeah, that's the weird part... They are volume tweens and are exactly the same as the ones that made the class not work...
  9. That solved it, thanks a lot... Weird thing though, the other tweens are working fine without that activation... :S Why is that?
  10. Hi there, I have a class that I use to play music in as3. The thing is that I made a copy of that class and changed a few things to adapt it to a different movie clip, nothing in the core. But the TweeNLite is giving me an error... The error occurs in this line: song = soundFactory.play(pausePoint); song.addEventListener(Event.SOUND_COMPLETE, soundCompleteHandler); TweenLite.to(song, 0, {volume:0}); TweenLite.to(song, 2, {volume:1}); If I comment the Tween it doesn't output any errors... Any ideas of what's happenning? I'm using tweens like that in other functions in the same class and they work perfectly... Definitions are: private var song:SoundChannel; private var soundFactory:Sound; private var pausePoint:Number = 0.00; The error says (translated from spanish): ReferenceError: Error #1069: Porperty volume not found on flash.media.SoundChannel and there't no default value. at com.greensock::TweenLite/init() at com.greensock::TweenLite/renderTime() at com.greensock::TweenLite() at com.greensock::TweenLite$/to() at com.epika::epika_music/playMusic() at com.epika::epika_music/completeHandler() Thanks a lot, Javier
  11. Yeah, I'm using AS3. I'll check that out to see how to make it work... Thanks, Javier
  12. Yeah, I'm in v11. I'm using a mouseOver listener to resume, and a mouseOut listener to reverse, it's kind of weird. It just never goes back to alpha 0 on mouseOut. Thanks, Javier
  13. Reviving this thread because I have a question about this... I've created my Tween like this: tooltip_clip.alpha = 0; var myTween:TweenMax = new TweenMax(tooltip_clip, 0.25, {alpha:1, ease:Linear.easeNone}); Then I use: tooltip_clip.resume(); // And it plays correctly But when I use: tooltip_clip.reverse(); // It doesn't go to alpha 0 Any ideas? Thanks, Javier
  14. Hi there, I'm Javier from Argentina and I'm starting out with AS3 and TweenLite/Max. I'm an advanced user of mc_tween for all of you that know it. I'm trying to achieve a simple matter here, and don't find the answer for this. Here's what I want to do... I have a MovieClip with 8 frames... I need the folowing functions: - One that starts/resumes those frames foward - One that starts/resumes those frames backward - One that pauses the current tween Any ideas how to acomplish this? I'm trying some things but there must be simpler ways to do this with TweenLite/Max... Thanks, Javier