Jump to content


  • Posts

  • Joined

  • Last visited

NIKESLB's Achievements


Newbie (1/14)



  1. yes I have the latest. I tried the example and yes It works. I'll show a sample of my code: public function Class{ .... //Line this.lineHori = new Shape(); this.projet.getPalco.addChild(this.lineHori); this.lineHori.graphics.lineStyle(7, 0xFFFFFF, 1); this.lineHori.graphics.moveTo(20, this.projet.getPalco.stageHeight/1.3+61); this.lineHori.graphics.lineTo(150, this.projet.getPalco.stageHeight/1.3+61); createSub(this.projet.getPalco.stageHeight/1.3, "Aplication"); createSub(this.projet.getPalco.stageHeight/1.3, "Images"); ... } //y value and text private function createSub(vY:Number, myText:String){ spriteTextMenu = new Sprite; var textMenu:TextField = new TextField; textMenu.selectable = false; textMenu.width = 200; textMenu.height = 25; textMenu.text = myText; this.spriteTextMenu.addChild(textMenu); this.spriteTextMenu.buttonMode = true; this.spriteTextMenu.mouseChildren = false; this.spriteTextMenu.name = myText; this.spriteTextMenu.y = vY; this.spriteTextMenu.x = 30; this.spriteTextMenu.width = 150; this.spriteTextMenu.addEventListener(MouseEvent.MOUSE_OVER, menuOver); this.spriteTextMenu.addEventListener(MouseEvent.CLICK, menuClickRemovePrevious); this.projet.getPalco.addChild(this.spriteTextMenu); } private function menuOver(e:MouseEvent):void{ TweenLite.to(this.lineHori, 2, {y:10}); }
  2. Hi. After few weeks using Tweens from Greensock, I'm still confused with his behavior. Example: TweenLite.to(this.sprite, 1, {y:5}); Supposedly, my object will go to the top. Sometimes it happen and sometimes is different. Right now I have an object at the middle of the stage (y=400), if I use the previous code, he is not going to the top, but moves +5 in y (y = 405). So my question is what I need to do for my object go to the top and not +5?
  3. thank you so much, I understand where was my error and this is exctly what I wanted. Problem solved
  4. Hi, I found greensock today and its very great. I tried the Loadermax but I got a problem. I have two class: Main.as and Loader.as. Loader.as: var urls:Array = ["graphics/home/card.png", "sounds/test.mp3"]; LoaderMax.activate([ImageLoader,MP3Loader]); var queue:LoaderMax = LoaderMax.parse(urls, {onProgress: progressHandler, onComplete: completeHandler}, {autoPlay:false}); queue.prependURLs("media/"); queue.load(); ... Main.as //this function call and create a new Loader() beginLoad(); var img:ImageLoader = LoaderMax.getLoader("media/graphics/home/card.png"); getStage.addChild(img.content); var s:MP3Loader = LoaderMax.getLoader("media/sounds/test.mp3"); s.playSound(); The image display well but the sound is giving an error: ArgumentError: Error #2068: Invalid sound. at flash.media::Sound/play() If i put this codes in the Loader.as it works, but not in the Main.as. There is any solution to solve that please? *One more thing, there is a way to know wich files was loaded(or are inside) by LoaderMax?