Jump to content
Search Community

ukla

Members
  • Posts

    78
  • Joined

  • Last visited

ukla's Achievements

0

Reputation

  1. Here is a follow-up question. I have a full screen image gallery using bitmaps and scrollRect. In one example I tween the alpha (fading in on white background) and in another I tween the tint (using #ffffff). Based on CPU usage it seems like tweening the tint is getting better performance. Can someone verify this to be the case?
  2. I'd like to help but I can't go save for CS3 using CS5.
  3. I didn't mean to leave cacheAsBitmap set to true. I was working from one file and saving them out with various code changes. Overlooked that. I do see higher CPU usage via my Task Manager when rendering the vector versions. Thanks for the clarification.
  4. Ok, I am now thoroughly confused. Just did performance tests: vector tween, vector tween using scrollrect, bitmap tween, bitmap tween using scroll rect. If the code for the tests was correctly written, the vector tweens use much less memory than the bitmap tweens. Am I wrong?
  5. Haven't been checking frame rates. But I'll get that set up. Just dissatisfied with the jittery motion. Even without scrollRect setting it to whole pixels it is still jittery. I guess I expected better results than the vector version but I'm not seeing any difference. I'm running 32 -bit Windows 7 on a 27" iMac > Intel Core2 Dueo 3.06 GHz, 4 GB RAM. Certainly not the fastest computer in the world, but still fast. I'll keep plugging away.
  6. I hear that ... but seems like a tall order considering that the elements in the land scape will have animation (ie. waves). I am referring to the "camera" idea ... not just creating a bitmap from the vector.
  7. Yes, this helps. Too bad that vectors provide very manageable file size but suck when it comes to rendering.
  8. I'm in the early stages of a project - a long, horizontal landscape scene that will ultimately serve as a highly animated history time line. Before making decisions on the logic and how to build the project, I needed to do some testing in order to determine how to get the best rendering performance. I figured it would be wise to see how the scene performs moving horizontally from one end to the other over the course of 10 seconds. The result is quite jittery and I'm not sure how to resolve the issue. This example uses scrollRect and I am fully aware that the landscape scene will be rendered on whole pixels. But even without scrollRect, performance doesn't change. Files are attached. PLEASE DO NOT LIFT ANY OF THE GRAPHICS / TEXTURES! While only a rough concept, please show respect for creative property.
  9. That doesn't surprise me! You are always incredibly thorough! Which reminds me ... my membership expired a couple of weeks ago. Time to renew.
  10. I've dealt with this before. I built an embeddable video player that needed to load fonts.swf from another domain. This code was written before I started using GreenSock loading. But it should point you in the right direction. Pay attention to the following: import flash.system.LoaderContext; import flash.system.SecurityDomain; import flash.system.ApplicationDomain; var context:LoaderContext = new LoaderContext(); context.checkPolicyFile = true; context.securityDomain = SecurityDomain.currentDomain; package com.blueion { import flash.display.Loader; import flash.display.MovieClip; import flash.display.Bitmap; import flash.text.Font; import flash.net.URLRequest; import flash.events.* import flash.system.LoaderContext; import flash.system.SecurityDomain; import flash.system.ApplicationDomain; public class LoadDisplayObject extends MovieClip { private var _loader :Loader = new Loader(); private var _path :String; private var _filetype :String; //- CONSTRUCTOR ------------------------------------------------------------------------------------------- public function LoadDisplayObject(path:String,type:String):void { _path = path; _filetype = type; addChild(_loader); addEventListener(Event.ADDED_TO_STAGE, onAddedToStage); addEventListener(Event.REMOVED_FROM_STAGE, onRemovedFromStage); } //- PRIVATE METHODS --------------------------------------------------------------------------------------- private function init():void { removeEventListener(Event.ADDED_TO_STAGE, onAddedToStage); _loader.contentLoaderInfo.addEventListener(Event.COMPLETE, loadCompleteListener, false, 100); _loader.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS,loadProgressListener, false, 100); _loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR,loadIOErrorListener, false, 100); var _localmode = new RegExp("file://").test(loaderInfo.url); if (_localmode){ this._loader.load(new URLRequest(_path)); } else { var context:LoaderContext = new LoaderContext(); context.checkPolicyFile = true; context.securityDomain = SecurityDomain.currentDomain; _loader.load(new URLRequest(_path),context); } } private function loadProgressListener(e:ProgressEvent):void { this.dispatchEvent(e); } private function loadCompleteListener(e:Event):void { e.target.removeEventListener(Event.COMPLETE, loadCompleteListener); e.target.removeEventListener(ProgressEvent.PROGRESS,loadProgressListener); e.target.removeEventListener(IOErrorEvent.IO_ERROR,loadIOErrorListener); if (_filetype == "font"){ showEmbeddedFonts(); } if (_filetype == "image"){ var bitmap = Bitmap(_loader.content); bitmap.smoothing = true; } if (_filetype == "swf"){ } this.dispatchEvent(e); } private function showEmbeddedFonts():void { var fonts:Array = Font.enumerateFonts(); fonts.sortOn("fontName",Array.CASEINSENSITIVE); for (var i:int=0;i trace("Embedded fonts = " + fonts[i].fontName + ", " + fonts[i].fontStyle); } } private function loadIOErrorListener(e:IOErrorEvent):void { // Data did not load. trace("LoadDisplayObject: loadIOErrorListener > error"); this.dispatchEvent(e); this.destroy(); } private function onAddedToStage(e:Event):void { this.init(); } private function onRemovedFromStage(e:Event):void { this.destroy(); } private function destroy():void { this.removeEventListener(Event.ADDED_TO_STAGE, onAddedToStage); this.removeEventListener(Event.REMOVED_FROM_STAGE, onRemovedFromStage); try{ removeChild(this._loader); _loader.contentLoaderInfo.removeEventListener(Event.COMPLETE,loadCompleteListener); _loader.contentLoaderInfo.removeEventListener(ProgressEvent.PROGRESS,loadProgressListener); _loader.contentLoaderInfo.removeEventListener(IOErrorEvent.IO_ERROR,loadIOErrorListener); _loader.close(); _loader = null; }catch(e:Error){ // Do nothing. _loader = null; } } //- PUBLIC METHODS ---------------------------------------------------------------------------------------- //- GETTERS & SETTERS ---------------------------------------------------------------------------------------- public function get filetype():String { return _filetype; } } }
  11. Instead of doing it this way, you can simply write this for each font you use > "Font.registerFont(Georgia);" I attached any example of my fonts.swf file that I use regularly. Then I just load fonts.swf into any other swf that needs it.
  12. Cool deal. Seems like this was strictly a way to help with file size rather than performance. I appreciate the info.
  13. Thanks tripso. Makes perfect sense. Love that site. I remember when it won an FWA and I'm glad to see that it is still around. As a follow up, are you using ScrollRect? And in your experience, what is the best / most efficient way to detect if the tile is on the stage?
  14. This is a bit off topic since I doesn't have anything to do with GreenSock. I was hoping that someone could point me in the right direction on how this is being done. In both of the sites below you will notice that there is some sort of "grid loading" going on. Similar to Google maps when you pan an area. http://www.capri-sonne.com/de/deu/kids.html http://pinocchioisonfire.org/#/experience/a_closer_look (zoom in on artwork and then pan - you will see that the image is blurry at first and then the high resolution pixels load in). Does anyone know how this is being done?
×
×
  • Create New...