Jump to content
GreenSock

Search In
  • More options...
Find results that contain...
Find results in...

mindspaced

Members
  • Posts

    24
  • Joined

  • Last visited

mindspaced's Achievements

Newbie

Newbie (1/14)

0

Reputation

  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);
×