Jump to content
GreenSock

kamcknig

Members
  • Posts

    18
  • Joined

  • Last visited

kamcknig's Achievements

Newbie

Newbie (1/14)

1

Reputation

  1. Yes you are right. Animation.as was actually referencing the wrong SimpleTimeline because I had some folders messed up. it is now fixed and working properly! Thanks!
  2. I just donated to get the shockingly green and downloaded a fresh version of the AS3 version of Greensock. When I run my code I'm getting an error in Animation.as Line 210 1061: Call to a possibly undefined method add through a reference with static type com.greensock.core:SimpleTimeline. It says that there is no function "add" in SimpleTimeline, but I made sure and the SimpleTimeline does have the add function so I'm not sure why I'm getting this.
  3. Oh wow thanks! I looked in the docs, but I just kind of skimmed over them so I guess I missed that! This is excellent Kyle
  4. Is there anyway to automatically increase or decrease the duration of any of the instances of these classes? I'm making a game where there are a lot of automated animations and events going on, and it'd be nice to give the player an opportunity to increase the speed of these animations if they don't want to sit through them all the time. So is there a way to do this automatically? Thanks! Kyle
  5. Hi everyone, I'm trying to scale an item in the y direction, and then scale it in the x direction using the transformAroundCenter plug-in with TweenLite. Here is my code for when an external SWF file has been loaded into my movie. private function onResumeLoaded(e:Event):void { e.target.removeEventListener(Event.COMPLETE, onResumeLoaded); var loader:Loader = e.target.loader as Loader; loader.scaleX = .01; loader.scaleY = .01; loader.x = stage.stageWidth / 2 - loader.width / 2; loader.y = stage.stageHeight / 2 - loader.height / 2; addChild(loader); var yTween:Object = new Object(); yTween.transformAroundCenter = new Object(); yTween.transformAroundCenter.scaleY = 1; yTween.onCompleteParams = [loader]; yTween.onComplete = function(loader:Loader):void { var xTween:Object = new Object(); xTween.transformAroundCenter = new Object(); xTween.transformAroundCenter.scaleX = 1; TweenLite.to(loader, .5, xTween); } TweenLite.to(loader, .5, yTween); } But when this executes... the y scale tween works fine and it scales it and keeps it centered on the stage like it should, but when the y tween is complete and the x tween goes, then as it scales, it moves off to the left rather than staying centered! Anyone know why? Thanks! Kyle
  6. Oooh great! Thanks I will check that out!!
  7. Nevermind figured it out. Had to set the SoundTransform of the SoundChannel to a new SoundTransform that I created. And have to do that in the onUpdate listener. I don't like that bleh.
  8. I have a sound and sound channel that i'm trying to fade, but it's not seeming to work. var sc:SoundChannel; var song:Sound = blah; //blah is a sound, trust me, it plays fine and everything i just don't want to put the code in here for the loading and such; sc = song.play(); then when my app ends, var fadeOb:Object = new Object(); fadeOb.volume = 0; TweenLite.to(sc.soundTransform, 2, fadeOb); But this doesnt work. If i use the onUpdate listener and check the volume of the soundtransfomr, it always stays at one
  9. yeahhh, sorry bout that, i ddint have time haha. the code is in the Game.as in the assignCountriesToPlayers() function. there is a line "country.color = " and that calls the setter in Country.as which is where the tween takes place. Kyle
  10. Here it is without spaces: http://icsna.net/backup/Dominationv1.3.zip
  11. The second one I posted: http://icsna.net/backup/Domination%20v1.3.zip should work. This one is working for me.
  12. http://icsna.net/backup/Domination%20v1.3.zip er there is the link
  13. I pass it in in the form of a hex number... e.g. 0xFF0000. so yeah, it should but uint. Here is a link to the source. http://icsna.net/backups/Domination%20v1.3.zip Thanks, Kyle
  14. Hi all, I've used the TintPlugin before and gotten it to work, so I can't understand why I can't get it to work now :/ I have a Main class and in there I activate the plugin: import com.greensock.plugins.TintPlugin; import com.greensock.plugins.TweenPlugin; import com.greensock.TweenLite; public class Main extends MovieClip { public function Main() { TweenPlugin.activate([TintPlugin]); } } Then I have a class called Country that I'm trying to change the tint of a MovieClip inside of Country: import com.greensock.easing.*; import com.greensock.TweenLite; public class Country extends MovieClip { public var outline:MovieClip; public var fog:MovieClip; public function Country() { } public function set color(val:Number):Void { var tintTween:Object = new Object(); tintTween.tint = val; tintTween.ease = Linear.easeNone; TweenLite.to(this.outline, 1, tintTween); } } This, however, does not work. The color of the outline MovieClip just stays it's default color! Does anyone see anything wrong or have suggestions? Thanks! Kyle
×