Jump to content
Search Community

craig.murray

Members
  • Posts

    7
  • Joined

  • Last visited

craig.murray's Achievements

0

Reputation

  1. I'm sorry I didnt realize autoAlpha was a flash-only property. Yes that plugin should do the trick for me in the JS target, thank you!
  2. Let me give a short example: var img:Image = new Image(AM.getTexture("SceneBG")); var spr = new Sprite(); spr.addChild(img); spr.x = 100; spr.y = 100; Starling.current.stage.addChild(spr); (note this is haxe compiling to JS target, the Starling stuff is our port of Starling to haxe, compiled to JS, using canvas API instead of the shader library //this works TweenMax.to(spr, 2.0, { alpha:0, yoyo:true, repeat: -1, onUpdate:function():Void{trace(spr.alpha);} } ); //this fails TweenMax.to(spr, 2.0, { autoAlpha:0, yoyo:true, repeat: -1, onUpdate:function():Void{trace(spr.alpha);} } ); //this fails TweenMax.to(spr, 2.0, { autoCSS:false, autoAlpha:0, yoyo:true, repeat: -1, onUpdate:function():Void{trace(spr.alpha);} } );
  3. We're using autoAlpha because the as3 code we've ported to haxe uses it extensively to set the visible property for us. When I tween alpha it works fine, but when i tween autoAlpha neither the .visible property nor the .alpha property are modified.
  4. Thanks for all the help guys, and the fast response. You're correct in that we're using <canvas, but we are wrapping them in our own Texture, Image, Sprite, MovieClip, and so on. So a .visible property, is defined on our own classes and used when rendering our the final <canvas image to display. As a result, the CSS operating on the DOM doesn't play well with our own DisplayObject.visible property, since a DisplayObject in many cases is just a rect and a transform matrix pointing to a spritesheet. Option 1 from Jack said "Dont load CSSPlugin". I'm pretty sure I never did that, so I'm not sure how to not do it. Do I load a different on instead? Also using autoCSS didnt seem to help: TweenMax.to(spr, 2.0, { autoCSS:false, autoAlpha:0, yoyo:true, repeat: -1, onUpdate:function():Void{trace(spr.alpha);} } ); This does not change the alpha property. Note in the above example spr is a Sprite(), my own class, which wraps a Texture. This would be the same thing if I was using Pixi or Easel or some other display library. Only different is these classes were authored by my team. I should also mention that this is being written in Haxe, targeting both Flash and JS targets. As a result I'd rather not have to look at every single tween that does autoAlpha and put autoCSS:false in them conditionally for JS target. I'd rather it just work, which is why I favored the "dont load the css plugin" approach. This is moot right now though, since the autoCSS:false doesnt seem to work in my situation. Finally that codepen example: http://codepen.io/jo...hlf?editors=101 If I try to tween the alpha property it doesnt do anything. Same with autoAlpha.
  5. I'm a little confused. It appears that tweening properties like autoalpha and visible is using the DOM and css to do it's work? Is there a way to disable that behavior and tween the properties like alpha and visible and whatnot like normal object properties? We've got some code we're porting from as3 that uses greensock and we want to use the greensock.js to handle it, but we're not using the DOM, we're using a modern html5 rendering system, which doesn't seem to be working with greensock.js Or am I misunderstanding what's going on? Thanks!
  6. Thanks for your quick response Jack. I have created a sample project that should demonstrate this issue. All you'll need to do after importing into Flash Builder is create a sourcepath into the greensock libraries (I didn't include those to keep zip filesize down). On some machines, the complete is called, on other machines it's not. If it gets called on your machine, just play around with the append() calls, either adding or removing various ones until you reproduce the problem. Not sure how to manage attachments on this site so I'm emailing the project to you.
  7. I'm loading a large number of resources of all types with a single LoaderMax instance. Several times during loading I call pause() and then resume() a second or so later. At first it worked, but as my resource list changed, I started having failures. There were no errors reported, I just never received a complete on the load. I found a single swf file with some audio inside that I was loading, which when removed from the load, fixed the problem. The swf is fine, and if I simply remove the pause() and resume() calls, I can load the swf without issue. One thing I noticed is that I get a report of Flash decompressing the swf file twice. I have verified that it is only loaded once, and with pause() and resume() removed, it only decompresses once. [sWF] C:\_projects\game\bin-debug\assets\swfs\Soundtrack.swf - 1,502,520 bytes after decompression [sWF] C:\_projects\game\bin-debug\assets\swfs\Soundtrack.swf - 1,502,520 bytes after decompression Is it possible that pause() and resume() are interacting with the Flash Player's swf decompression somehow? Resuming before it's fully paused or something? Any ideas what's going on here? Thanks! Craig
×
×
  • Create New...