Jump to content
Search Community

upressplay

Members
  • Posts

    15
  • Joined

  • Last visited

Profile Information

  • Location
    Los Angeles, CA

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

upressplay's Achievements

1

Reputation

  1. I had a similar problem with the radius not working in Safari. I found that this fixed it: overflow:hidden
  2. So, I'm creating an Image Gallery. Clicking on buttons calls the "change_section" function, passing it the hires image id. I want to fade out the current image, load the new image, than fade it on the screen. But, for some reason when it losing track of the "this.hires" array that contains the image url, width, height and id. I think it's calling an undefined "Gallery" javascript object. Any insight would be appreciated. Gallery.prototype.change_section = function(_id) { this.new_section = _id; //// Started with TweenMax.to(this, .5, {hires_alpha:0, overwrite:2, onUpdate:reDrawMain, onComplete:this.check_hires}); ///I've tried this var obj = this; TweenMax.to(obj, .5, {hires_alpha:0, overwrite:2, onUpdate:reDrawMain, onComplete:obj.check_hires}); /// Calling just this works, and still sees the "this.hires" array in the Gallery object. So, I don't think it's my logic, but rather I'm not referencing the right javascript object with the onComplete call. this.check_hires(); }; Gallery.prototype.check_hires = function() { var i; for (i=0;i<this.hires.length;i++) { if(this.hires[i].id == this.new_section) { if(!this.hires[i].loaded && !this.hires[i].loading) { this.load_hires(); } else { this.active_section = this.new_section; this.open_hires(); } } } }; The code below is for reference. Maybe I have conflicting calls to TweenMax or something. Gallery.prototype.open_hires = function() { TweenLite.to(this, .5, {delay:.5, hires_alpha:1, overwrite:2, onUpdate:reDrawMain}); }; Gallery.prototype.load_hires = function() { trace("Gallery load_img") var obj = this; var i; var s; for (i=0;i<this.hires.length;i++) { if(this.hires[i].id == this.new_section) { var hires_img = new Image(); this.hires[i].obj = hires_img; hires_img.id = this.hires[i].id; hires_img.onload = function () { obj.hires_loaded(this.id); } this.hires[i].loading = true; hires_img.src = this.hires[i].img; } } }; Gallery.prototype.hires_loaded = function(_id) { var i; for (i=0;i<this.hires.length;i++) { if(this.hires[i].id == _id) { this.hires[i].loaded = true; this.active_section = _id; this.open_hires(); } } };
  3. I used the last one. Creating redraw boolean for each of the canvas. Thank you sir.
  4. I'm trying to use TweenMax/TweenLite to control the drawing of my site. TweenLite.ticker.addEventListener("tick", drawCanvas, this, false, 2); This seems to be firing all of the time. I thought it only fired when the TweenMax was updated. Am I missing a setting? What I want to do is have 3 canvas' in play. One for the main content, the nav and an overlay for content showcasing. I would like to limit the drawing to only when elements in these canvas areas are updated. Which would be triggered by a TweenMax animation event. TweenLite.ticker.addEventListener("tick", drawMain, this, false, 2); TweenLite.ticker.addEventListener("tick", drawNav, this, false, 2); TweenLite.ticker.addEventListener("tick", drawOverlay, this, false, 2); Or am suppose to do this? TweenLite.to(this, .2, {colorProps:{fill:"rgb(202,202,202)"}, roll_alpha:0, overwrite:2, onUpdate:drawMain}); TweenLite.to(this, .2, {colorProps:{fill:"rgb(202,202,202)"}, roll_alpha:0, overwrite:2, onUpdate:drawNav}); TweenLite.to(this, .2, {colorProps:{fill:"rgb(202,202,202)"}, roll_alpha:0, overwrite:2, onUpdate:drawOverlay}); The above seems to get caught up, when there are multiple buttons firing. Like when someone mouses over 5 buttons at the same time. Firing something similar to the above in the over and out states of each button. What is the best approach? Any ideas would be appreciated?
  5. Right off the bat, the JS TweenMax is picking up where they left off in Flash. Digging it. I demoed out EaselJS and KineticJS. Not sure if you need a framework, but a good animation engine and some basic prototype Javascript Objects, and I"m getting pretty close to what I could do with Flash. MouseOver and MouseOut are the biggest challenges of this platform. So, I got to a point that I want to use TweenMax to animate specific values in the javascript space. This is what I have so far. Tweening a javascript number variable, with ease. var siteY; var maxY = 800; var wheel_speed = .2; function MouseWheelHandler(event) { event.preventDefault(); var wheelY = event.wheelDelta || event.detail; var newSiteY = (siteY*1) + (wheelY*-wheel_speed); if(newSiteY < 0) newSiteY = 0; if(newSiteY > maxY) newSiteY = maxY; /// This is where I'm not sure. How do I animate the value of "siteY"? It's in the main javascript file that does all of the logic. It also drives positioning of page elements. I want the TweenLite to give that mouse wheel value ease. TweenLite.to(siteY, 1, {value:newSiteY, ease:Elastic.easeOut, onUpdate:drawCanvas}); } Is there some type of variable declaration I'm missing for declaring the DOM space, or Javascript space or something? I think this would come in handy for a lot of values, and animation techniques. Or, is my approach wrong?
  6. I tried to use the blitmask. Never knew what that was before. Worked pretty good, but it killed a parallax thing we have going in a more advanced version of the SubSection class this example is based on. And it didn't cure the choking issue. Same result in Flash 11.
  7. The section is set up to remove any image that is not in the viewable area. So, at any given time, it should only have 3 on the stage. I don't think it's the amount of images on the stage at one time. It works fine on slower machines, PC and Mac Flash Player 10. It's only choking in the newest Mac Flash Player 11.1.102.5 Plugin. I've also used this technique before, incorporating video assets along with images and sounds.
  8. I created a generic example of what is happening, and have isolated it to the Mac version. PC performance seems to be fine. I also disabled any sound elements running in the background and removed any reference to swfaddress. I don't think it's TweenMax specifically that's causing this issue, rather that 11 is not performing as intended during a TweenMax animation. Any advice would be most appreciated. Mac OS X 10.6.6 Chrome 15.0.874.121 Flash Player 11.1.102.55 This also happens in Mac FF and Safari, with Flash Player 11.1.102.55. Example: http://firstworldproblems-themovie.com/ ... 1_example/
  9. The publish from flash will throw errors, but the file is fine. If you load deploy/index.html into a browser you will see the updated swf working in the site environment. What leads me to believe there is a conflict, is that all assets are loaded with LoaderMax, all animations are with TweenMax, and this all works fine in Flash Player 10, but not 11. I'm not sure what else there is, minus a timing issue of adding stuff to the stage.
  10. Not looking at it in context, I don't think will help diagnose the issue. Just isolating the transition would probably take a full day. And won't really expose it. Considering the whole site is built dynamically, using Greensock products exclusively. I don't think it's my technique, something I've been using for a while now. It's a conflict between TweenMax and Flash 11. The area of interest in my code example is 10 lines of code really. TransitionSection The source is fully ready for publish, and works locally. fla/preloader.fla. It's the only file that needs to publish. You don't need any fonts, they are all external swf loads. You can view the published site in deploy/index.html. You can load it locally. Any help would be appreciated. Did you see the jump by comparing Flash 10 to 11?
  11. You can see my source at the following: [link removed because it contained members-only plugins] src / com.site.main.Main loadSection Function (Line 428) Is where the section is being added to the stage. TransitionSection Function (Line 484) Is where the section is being transitioned in. This is called in the Preloader.as once the load completes. This is where it's skipping.
  12. Ok. Swapped out com.greensock in my source. Still the same result, jumps and skips 10-20 frames.
  13. I'm having a performance problem that seem to be related to Flash Player 11. I noticed this mainly because Chrome auto-updates the flash player. So, it's now up to 11 in Chrome. During a sliding section transition, the flash player chokes and skips about 10-20 frames. In essence the content jumps, not a smooth transitions. You can see this at the following url. Using a browser with 10 plays as intended, a separate browser with 11 chokes and jumps ahead. http://firstworldproblems-themovie.com/ I have security sensitive site, that is more elaborate, that I can't share here. But, the same issue is happening above. I'm using LoaderMax to load assets. Adding it to the stage and then animating them in from the left or right of the stage, using Tweenmax. The one I can't show is a series of images, 1280x640 pixels, 10 in total. I've spent the last couple weeks tweaking the transition. Removing items from the stage when they are not visible, so I can get the CPU usage back. On Flash Player 10, this is working as intended. On 11 it jumps. I don't think it's the removing assets from the stage that's choking the player, because the above link has the same issue. I feel like this is a Flash Player 11 performance issue. Has anyone seen this Flash Player 11 issue? What things should I be avoiding?
×
×
  • Create New...