Jump to content
GreenSock

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

BabaBlackSheep

Members
  • Posts

    11
  • Joined

  • Last visited

Recent Profile Visitors

1,083 profile views

BabaBlackSheep's Achievements

Newbie

Newbie (1/14)

1

Reputation

  1. In my .FLA, I have imported a flv into a movieclip, movieclip has 100 frames with sound. I am using code see below. Everything works as expected but there is no sound ??? I have 2 questions. //If i use mc.gotoAndPlay(50); instead of TweenMax then sound works. mc.gotoAndPlay(50); see code, is it correct way to play 2 frame ranges ? and then reverse it or is their a better way to play in reverse ? How can i make it work with sound which already there in movieclip as it is flv. import com.greensock.*; import com.greensock.easing.*; mc.addEventListener(MouseEvent.MOUSE_DOWN,PlayClip); mc.addEventListener(MouseEvent.MOUSE_UP,ReverseClip); function PlayClip(event:MouseEvent) { TweenMax.fromTo(mc, 1, {frame:50}, {frame:60}); } function ReverseClip(event:MouseEvent) { TweenMax.fromTo(mc, 1, {frame:60}, {frame:50}); }
  2. Ok got it. tween.repeatDelay( speed_repeat );
  3. Also How can I use random value for scaleX and scaleY with repeatDelay:? scaleX:function() doesn't work so i could return random value. tween = new TweenMax(this,speed_heart,{scaleX:function(){return 1.2 },scaleY:function(){return 1.3 },ease:Elastic.easeOut,repeat:-1,repeatDelay:speed_repeat});
  4. How can we update repeatDelay option ? tween.updateTo({repeatDelay:speed_repeat}, true); doesn't not work
  5. How can i update var speed later after i initialize tweenmax ? In code below i would like beatFaster function to update var speed_repeat and var speed_heart of tweenmax package { import flash.display.MovieClip; import com.greensock.*; import com.greensock.easing.*; public class heart extends MovieClip { private var speed_repeat:Number; private var speed_heart:Number; private var tween:TweenMax; public function heart() { // constructor code speed_repeat = 0.4; speed_heart = 1; setPosition(100,100); tween = new TweenMax(this,speed_heart,{scaleX:1.2,scaleY:1.3,ease:Elastic.easeOut,repeat:-1,repeatDelay:speed_repeat}); } public function setPosition(X:Number,Y:Number):void { this.x = X; this.y = Y; } public function beatFaster():void { speed_repeat = speed_repeat -.1; tween.updateTo({repeatDelay:speed_repeat}, true); } } }
  6. I need help in creating heartbeat animation with sound. I have attached fla with al resources images,sounds etc. I need heart beat to be controlled via variables/functions.So i can make it beat faster or slower. Ref: Reference animation can be seen at Here. Heart 5 of 9 to be precise. *Beat frequency (X&Y) *Beat amplitude (X&Y) *Beat-sound sync factor (X&Y) heartbeat.zip
  7. I want to create a custom progress-bar.Progress bar is bend in curvature. I have 2 bend images, One is tunnel and other is Bar image. Currently in attached FLA file, progress-bar is at 100 percent stage. How can i achieve Tweening so that Bar layer fills Tunnel Layer which is bend ? PBar.zip
  8. I am using the following code in FLEX+Eclipse and i get the error "TypeError: Error #2023". In my xml , i am loading from local folder so i am using <LoaderMax name="queue1" prependURLs="resources/images/" load="true"> Questions: If I define estimatedBytes at line loader = new XMLLoader ? will it represent the all data loaded by XML or will it be the estimated size of XML it`s self ? In my code , loader`s name is "mainQueue".How can i access it in other class so i can retrieve its contents in that class ? package { import flash.display.*; import com.greensock.*; import com.greensock.loading.*; import com.greensock.events.LoaderEvent; import com.greensock.loading.display.*; public class green { protected var queue:LoaderMax; protected var loader:XMLLoader; public function green() { LoaderMax.activate([ImageLoader, SWFLoader, VideoLoader]); loader = new XMLLoader("resources/resources.xml", {name:"mainQueue",onComplete:completeHandler, estimatedBytes:50000}); loader.load(); } protected function progressHandler(event:LoaderEvent):void { //trace("progress: " + event.target.progress); } protected function completeHandler(event:LoaderEvent):void { var image:ContentDisplay = LoaderMax.getContent("image1"); TweenLite.to(image, 1, {alpha:1, y:100}); trace(event.target + " is complete!"); } protected function errorHandler(event:LoaderEvent):void { trace("error occured with " + event.target + ": " + event.text); } } } XML: <?xml version="1.0" encoding="iso-8859-1"?> <data> <LoaderMax name="queue1" prependURLs="resources/images/" load="true"> <ImageLoader url="image1.jpg" name="image1" /> <ImageLoader url="image2.jpg" name="image2" /> <ImageLoader url="image3.jpg" name="image3" /> </LoaderMax> <LoaderMax name="queue2" prependURLs="http://www.greensock.com/assets/" load="false"> <SWFLoader url="swf/child.swf" name="child" autoPlay="false" /> <VideoLoader url="video/video.flv" name="video" width="400" height="300" scaleMode="stretch" autoPlay="false" /> </LoaderMax> </data>
  9. Very Useful.Thank you. Can we do this for a loaded FLV too ? instead of movieClip ?
  10. I want to play A movieClip when a button is pressed. faster the button is pressed, Faster is the Clip playback and vice versa. So Playback of clip will be variable based on keypress. How is this doable using greensock ?
×