Jump to content
Search Community

mindspaced

Members
  • Posts

    24
  • Joined

  • Last visited

Everything posted by mindspaced

  1. Incidentally, I also just tried the localRegistration property, and though it's behavior is closer, its still not correct. this["proxy"+mc.name].localRegistration = new Vector3D(248*.5,113*.5, 248*.5);
  2. I'm having an issue with a tweenproxy 3d. It works fine while testing in the child swf, but once it gets loaded into a parent swf, the registration goes whacky during the tween transition. I set some proxies on 3 movieclips, using their x position and half their width (to center), etc, as follows: function setProxy(mc:MovieClip):void{ this["proxy"+mc.name] = TweenProxy3D.create(mc); this["proxy"+mc.name].registration = new Vector3D(mc.x +248*.5, mc.y+113*.5, 248*.5); } function flipBox(which:String):void { var rVal:Number = (this["proxy"+which].rotationY==90) ? 0 : 90; TweenMax.to(this["proxy"+which], .5, {rotationY:rVal,ease:Linear.easeNone}); } function onClick(e:MouseEvent):void { flipBox(e.target.name); } There are two issues: 1) Though it tests fine, once I load in into another swf, the registration seems way off to the left (the flip actually goes off screen so I can't tell where it is exactly) and 2) There are some odd visibility issues, even when testing.The "flipped" proxy seems to mask some of the other display objects on the stage. I can generate some sample files, but it will take time so let me know if you have immediate insights that I'm missing. Thanks!
  3. Sure does. Thanks for the help. This was just a test case, so I realize that it could have been coded more succinctly. I was just trying to sort out why if(item.@hasSWF) was not working the way I expected. Now I know that XML content ends up being a string. Thanks!
  4. I have the following function, which is behaving unexpectedly: private function _xmlCompleteHandler(event:Event):void { var items:XMLList = (_xmlLoader.content as XML).item; for each (var item:XML in items) { if(item.@hasSWF){ trace("Says true"+"::"+item.@hasSWF); }else{ trace("Says false"+"::"+item.@hasSWF); } if(item.@hasSWF==true){ trace("Says true"+"::"+item.@hasSWF); }else{ trace("Says false"+"::"+item.@hasSWF); } } } The results I get are: Says true::false Says false::false Says true::true Says true::true Why does the first result appear contradictory? Is it related to the XMLLoader, or a syntax issue I'm unaware of?
  5. Though that doesn't excuse my carelessness! Just thought you'd like to know.
  6. Thanks, BTW, I've been a bit hampered by the fact that clicking on the "Show Inherited Public Properties" of your documentation fails in Chrome (5.0.375.86). Nothing happens when I click. I knew that I had seen that inherited parameter last week, but couldn't find it today. Might want to take a look at your js there. Also, on a side note, there is a broken link on the loadermax page (http://www.greensock.com/loadermax/), where it says "See XMLLoader's ASDocs for details."
  7. Doh! var loader:ImageLoader = LoaderMax.getLoader(item.@name+"Image") as ImageLoader; trace(loader.url); and of course it works.
  8. Thanks! I thought that was the case. I had tried this, but it fails. I'm missing something obvious, I think: var loader:ImageLoader = LoaderMax.getLoader(item.@name) as ImageLoader; trace(loader.url);
  9. Using the posted code from above, and after making the corrections, how would I access the url of the current loadermax item? I use the folloiwng line of code to get the image displayObject: image = LoaderMax.getContent(item.@name + "Image"); But how do I figure out its url? Thanks!
  10. Ok. Simple enough. There were two issues: 1) I needed to move the SWFLoader node up into the loadermax node, rather than two separate loadermax nodes. 2) I needed to active the SWFLoader plugin - LoaderMax.activate([imageLoader,SWFLoader]); Sorry for the obvious. My hopes for further samples still stands. Thanks!
  11. Hi Jack and others, I'm trying hard to wrap my head around this whole package, but for some reason, it's just not clicking for me yet. What I'm trying to do should be simple, but it stumps me. I dramatically simplified your sample files, thinking that there may be others in my position who are trying to get a handle on all this. I'm trying to load both images and swfs, based on results from an xml file. Basically, all items will have images, and some will also have swfs. I simply want the LoaderMax to find the swf node and load it if present. sample code here: private function _xmlCompleteHandler(event:Event):void { var _item:LoaderMaxTestItem, thumbnail:DisplayObject, swf:DisplayObject; var items:XMLList = (_xmlLoader.content as XML).item; //could also do LoaderMax.getContent("sites").site for each (var item:XML in items) { thumbnail = LoaderMax.getContent(item.@name + "Image"); if (thumbnail != null) { _item = new LoaderMaxTestItem(item.@name, item.@title, thumbnail); _items.push(_item); } swf = LoaderMax.getContent(item.@name + "SWF"); if (swf != null) { trace("success"); //still to create the TestItem swf here, if successful } } //loop through the items and position them in 5 columns on the screen for (var i:int = 0; i < _items.length; i++) { _item = _items[i]; this.addChild(_item); _item.width = 100; _item.height = 100; _item.x = (i % 2) * _item.width + 25; _item.y = int(i / 2) * _item.height + 54; } //retreive the "imagesLoader" LoaderMax instance that was dynamically created by parsing the XML file. _imagesLoader = LoaderMax.getLoader("imagesLoader") as LoaderMax; } I think I'll be using LoaderMax in many, if not most, future projects. Therefore, more sample files that illustrate the various ways it can be used would be great, if/when you have time to create them. Thanks!
  12. Hi Jack and Steve, I was having this same problem, and the answer to my problem should have been obvious but took me far too long to troubleshoot. To get the dynamic xml to generate, I had to run it on a server. I was trying to test it in flash. Sounds like this could be the issue here. Once I tested the file on my test server (running MAMP), LoaderMax performed as expected. Thanks!
  13. One "hacky" workaround would be to throw a label on the same frame as the callback, which I could query using the currentLabel property, and based on the currentLabel, perform an action (in the case of the previous flv example, find the right position in the flv and start playing it). However, given that I have other callback functions I'm utilizing as well, I'd like a more elegant solution that would be reusable in various situations (what if several callback functions should be active for a given moment in the timeline?).
  14. Morning! I've created a simple timeline scrubber that uses the gotoAndPlay method of timelineMax. Works beautifully, thanks to Jack's hard work on the platform. However, I also use the addCallback method to trigger other actions on the timeline. An example for one animation is that I want to trigger an flv to start playing at 20 seconds. So I add tl.addCallback(playFlv, 20); Easy enough. However, I'm trying to figure out how to handle the event that someone scrubs 21 seconds into my timeline. I miss the callback, though when they release the scrubber, I want to still trigger the flv to play and choose the right point in the flv. Any ideas on the easiest way to accomplish this kind of checking? TIA!
  15. Thanks! I created some custom classes for the popups (one for text, another for images). The images are loaded using a basic loader, and then I duplicate the bitmap and run the following code to throw it on a timeline (using timelineLite) and have it popup: var image:Bitmap = Bitmap(loader.content); var duplicate:Bitmap = duplicateImage(image); s = new Sprite(); s.addChild(duplicate); duplicate.y = -loader.height - 20; s.rotationX=-90; s.alpha = .2; this.addChild(s); this.addChild(p); OverwriteManager.init(OverwriteManager.NONE); tl = new TimelineLite(); tl.insert(TweenMax.from(p, .1,{autoAlpha:0, ease:Elastic.customEaseOut, onStart:setTriggers})); tl.insert(TweenMax.from(s, .01, {autoAlpha:0})); tl.insert(TweenMax.to(s, .01, {blurFilter:{blurX:25, blurY:25},tint:0x225180})); tl.insert(TweenMax.to(p, 1.5,{rotationX:0,ease:Elastic.customEaseOut})); tl.insert(TweenMax.to(s, 1.5,{rotationX:-75, ease:Elastic.customEaseOut})); tl.insert(TweenMax.to(p, .4,{rotationX:-90, onComplete:eventComplete}), l); tl.insert(TweenMax.to(p, .2,{autoAlpha:0, delay:.2}), l); tl.insert(TweenMax.to(s, .4,{rotationX:-90, autoAlpha:0}), l);
  16. I'm looking to distort the object as it moves. Delving into the source code of similar effects is a rabbit hole. Fingers crossed that I'll come out the other side. Thanks for the quick response. If anyone has seen this kind of effect and/or how to accomplish it, please let me know. Thanks!
  17. Hi all, I've been scouring the web for code samples of ribbons (of which there are plenty), but haven't found what I'm looking for. Basically, I'd like to animate a shape along a bezier path, so that it flows like a slithering snake. Anyone seen/done anything like that? I'm thinking I can use the bezierThrough and possibly orientToBezier to help, but that only gets me part of the way there. Other suggestions? Thanks!
  18. Well, as TronicVolta pointed out, the bug is fixed, though not exactly identified. There's an enter_frame loop that updates the thumb position on the scrubber. The code is as follows: function onLoop(event:Event):void { if(!dragging){ scrubber.thumb.x = tl.totalProgress * 130; } } The fix? Add an else statement there. Weird! Previously, the vid would just pause while scrubbing. But then I discovered greensock's timeline method of gotoAndStop(). I figure, why not display the frame that the thumb represents to the user while scrubbing. When I did that, browsers in windows stopped crashing. Not only did it fix my problem, but it's now a much cooler scrubber. Thanks Jack for your animation awesomeness! See updated code below: function onLoop(event:Event):void { if(!dragging){ scrubber.thumb.x = tl.totalProgress * 130; }else{ var scrubTime:Number = scrubber.thumb.x / 130 * tl.totalDuration; tl.gotoAndStop(scrubTime); } }
  19. Well I continue to have bizarre issues with that swf crashing.... The swf is now public, so you can see it at http://elluminate.com/ Click on the "elluminate in 50 seconds" link and use the scrubber at the bottom right. It works fine on mac, crashes on windows. Interestingly, I pared down the file dramatically, and stumbled upon the fact that if I move the scrubber to the top left quadrant of the swf, it stops crashing. Seems like bizarre behavior. The mouseup handler is as follows, in case that offers any insight (given that it crashes onMouseUp): function mouseUpHandler(e:MouseEvent):void{ stage.removeEventListener(MouseEvent.MOUSE_UP, mouseUpHandler); if( dragging ) { // Stop drag scrubber.thumb.stopDrag(); // Seek var selectedTime:Number = (scrubber.thumb.x - 1 ) / scrubber.width; phTime = Math.round(selectedTime * phLength); tl.gotoAndPlay(phTime); soundManager.playSound("vo", 1, phTime*1000); isPlaying = true; dragging = false; } }
  20. Hi Jack (and others) I've got a very cool use of timelinemax (imho), which I look forward to sharing as soon as it goes live. It involves synching dozens of animations and embedded timelines with an audio track and scrubber. However, I just discovered that I'm having issues with firefox crashing on Windows only. Seems to be working fine in all other browsers/platforms tested. FF is running flash player version 10,0,42,34. I also tried 10,0,12,36 with the same results. I tried ff 3.5.7, 3.5.8, and 3.6, again with same results. I realize I'm being vague, but my question is how to troubleshoot the problem. I tried searching the forums for other users with the same problem but no results. Thanks!
  21. Works like a charm! How did I miss autoAlpha before? Thanks Jack! Wish there were an AS book about using the Greensock tweening platform. Any chance one is in the works?
  22. In the objects I'm creating, I have the following code: public function Popup():void { //for brevity's sake this.visibility = false; tl = new TimelineLite(); tl.insert(TweenLite.from(p, .1,{alpha:0, ease:Elastic.customEaseOut, onStart:eventStart})); tl.insert(TweenLite.to(p, .4,{rotationX:-90, onComplete:eventComplete}), l); } private function eventStart():void { this.visible = true; } private function eventComplete():void { this.visible = false; }
  23. Well, I got a good jump on it. I changed it to a TimelineMax instance and used the getActive method with my mouseUpHandler: function mouseUpHandler(e:MouseEvent):void { //dragging code here //visibility code var active:Array = tl.getActive(); for each (var o:Object in active) { o.target.visible = true; } } The only remaining issue is that some objects on the stage may be visible even though they may not be actively tweening (say, an object that animates for 1 second, waits for 5 seconds, and then animates out). Those objects are not found in the getActive method. Other ideas or suggestions?
  24. I love TimelineLite! Very cool. Very powerful. I'm creating a bunch of nested timelines within a root TimelineLite instance, and have created a scrubber that allows me to jump to anywhere in the animation. However, there are dozens of objects on the stage, and I'm worried about performance with all the alphas set to 0. I'm nearing the end of coding, but it seems to be getting sluggish (the animation is 51 seconds long). What I currently try to do is set the visibility to false for each object when initialized, then when each nested timeline begins I set the visibility to true, resetting it to false when the nested timeline completes. It works great if you watch it normally, but using the scrubber causes problems for the objects that are in the middle of running b/c the visiblity toggle doesn't fire except at the beginning of each animation. Ideas? Are there other ways to combine many objects, a master timeline and optimization? Thanks! Aaron
×
×
  • Create New...