Jump to content
Search Community

ivzb

Members
  • Posts

    8
  • Joined

  • Last visited

Everything posted by ivzb

  1. I've realized that my app gets slow if I populate my onComplete function, like this: tweenHolder.addChild(infoView); infoView.y = 640; TweenLite.to(tweenHolder, 0.5, {x:-640, ease:Quad.easeOut, onComplete:function():void { buttonsBar.infoButton.gotoAndPlay("up"); removeButtonEvents(); tweenHolder.removeChild(mainView); tweenHolder.removeChild(buttonsBar); if (tweenHolder.contains(mentionsView)) { tweenHolder.removeChild(mentionsView); } if (tweenHolder.contains(outrosView)) { tweenHolder.removeChild(outrosView); } }}); (tweenHolder is a Sprite present on stage that contains two MCs). basically this tween pushes the current window of the app to the left and brings another one to the stage. This new view of the app will have code, such as event listeners, so I was deleting the other views of the app to free memory. Is the onComplete() function the ideal place to do this? Again, thanks for the help.
  2. These are the graphic elements that are simultaneously present on my app: 1) Status bar. 640x128px, .png with shadow effect (made in Photoshop and imported, not in Flash); 2) Background: 640x720px, bitmap; 3) Buttons bar: 640x78px, bitmap. What could possibly explain the delay on the first tween (as soon as I open the app)?
  3. 1) Yeah, I wasn't sure what that meant... how can I make sure it's set to seconds, and not frames? If I simply do not declare "useFrames:true", is it going to tween in seconds? Is there a difference in performance related to this? 2) Not really... everything is 640x920px or smaller, since it's going on an iPhone app. 3) Sorry... it was working pretty irregularly (the onComplete function was trigged, and sometimes it jumped to the end value), but I fixed some bugs and it's really better now. The only problem continues to be the first time I touch the test MC after opening the app: the tween jumps to the end value, triggers the onComplete function but the tween looks buggy in a user perspective. 4) I'm using TweenLite 11.63. I haven't tried v12. thanks!
  4. Is it better to dispatch three TweenLite events at the same time (for three different MovieClips) or is it better to add all of them to a holder (Sprite) and use just one TweenLite.to?
  5. 1) You mean like setting a delay? I'm not using this on my tween; 2) I thought it could have something to do with this, but I did a test and it's still slow. "test" and "testTwo" are two MC that contains one jpg picture each: import flash.events.MouseEvent; import flash.display.Sprite; import com.greensock.*; import com.greensock.easing.*; var test:Teste = new Teste(); test.cacheAsBitmap = true; var testTwo:TesteDois = new TesteDois(); testTwo.cacheAsBitmap = true; var holder:Sprite = new Sprite(); holder.cacheAsBitmap = true; holder.addChild(test); stage.addChild(holder); test.addEventListener(MouseEvent.CLICK, swapPicture); function swapPicture(e:MouseEvent):void { holder.addChild(testTwo); testTwo.x=320; TweenLite.to(holder, 0.5, {x:-320, ease:Quad.easeIn}); testTwo.addEventListener(MouseEvent.CLICK, swapPictureTwo); } function swapPictureTwo(e:MouseEvent):void { TweenLite.to(holder, 0.5, {x:0, ease:Quad.easeOut}); testTwo.removeEventListener(MouseEvent.CLICK, swapPictureTwo); } 3)Specially the first Tween doesn't work properly. On my iPad, the following ones work great, but on my iPhone 4S it's too slow and none of them work. Some settings that I thought it could have something to do with it: - FPS: 30 - Stage Size: 320 x 480 - Images were resized to fit the stage - Publish settings: Rendering (Auto), Resolution (Standard). This is my first iOS application, so thanks for the help!
  6. I'm having the same problem, have you figured out how to solve it? The first time I open my app on my iPhone and touch the screen, the first TweenLite annimation runs very slow (and sometimes it doesn't work at all). After the first one, everything's normal.
  7. Here's the xml: http://cl.ly/2e2g0P0w3j452L141m15 It loads normally when I use the loader class from flash pro.
  8. Hello, I'm a begginer in actionscript and I'm not sure what I'm missing... I'm trying to load an external xml file from this url https://microblog.lccv.ufal.br/cgi-bin/microblog.cgi?action=xml_posts&term=%24raphael%5fbastos&format=raw, but it only returns this: I'm used to using the loader class from Flash Pro, so I think I got something wrong during this transition. What am I doing wrong? It doesn't seem to load/recognize the child node values... import com.greensock.*; import com.greensock.loading.*; import com.greensock.events.LoaderEvent; import com.greensock.loading.display.*; var queue:LoaderMax = new LoaderMax({name:"mainQueue", onProgress:progressHandler, onComplete:completeHandler, onRawLoad:carregar, onError:errorHandler, integrateProgress:false}); queue.append( new XMLLoader("https://microblog.lccv.ufal.br/cgi-bin/microblog.cgi?action=xml_posts&term=%24raphael%5fbastos&format=raw", {name:"xmlData"}) ); queue.load(); var xml:XML; function progressHandler(event:LoaderEvent):void { trace("progress: " + event.target.progress); trace("total bytes is: " + event.target.bytesTotal); } function completeHandler(event:LoaderEvent):void { xml = new XML(event.target.content); trace(xml); } function carregar(event:LoaderEvent):void { //trace("Raw loaded. "); } function errorHandler(event:LoaderEvent):void { trace("Error - " + event.target + ": " + event.text); }
×
×
  • Create New...