Jump to content
GreenSock

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

ggritmon

Members
  • Content Count

    45
  • Joined

  • Last visited

Everything posted by ggritmon

  1. Thanks. I wasn't aware that modifying an XMLList would update the origin XML. That helped a lot! Final method looks like this: private function _onRawLoad(e:LoaderEvent):void { _log.trace("onRawLoad") var url:String; var xmlList:XMLList = e.target.content..@url; for each (var node:XML in xmlList) { i++; url = node.parent().@url; url = StringUtils.format(url, { lang:profile.language, quality:profile.quality } ); node.parent().@url = url; } }
  2. Update: Essentially what I want to do is replace any instances of @lang@ in my XML to the user's selected language. Example: <ImageLoader url="@lang@/imagefile.jpg"> should become: <ImageLoader url="en/imagefile.jpg"> I've got the following listener, but it throws an error when I try to write the XML content back to the XMLLoader. private function _onRawLoad(e:LoaderEvent):void { var raw:String = (e.target.content as XML).toXMLString(); raw = StringUtils.format(raw, { lang:"ENGLISH" } ); e.target.content = new XML(raw); } Please advise.
  3. I agree that putting it in PrependURLs may not be the appropriate place. The location where the final URL is assembled and attempts to be loaded is really where it should go, as part of the 'assembly' process.
  4. If you prepend "../../", it would do just that, and subloaded assets would load from 2 levels above. The "../" replacement is conditional. Essentially, if "../" is found anywhere in a URL after another directory, it is removed along with the preceding directory. How the "../" got there is irrelevant. it's just another level of validation to the URL. The example I listed above would work in both cases.
  5. All this change does is apply relative paths when they are prepended with absolute paths. They wouldn't be removed, they would be applied (for each "../", the folder before it is stripped out). If your XML contains relative paths, then reason would stand that they are relative to the asset loading the XML, and should still apply even if some absolute location has been specified. Do you disagree? Otherwise, this means the locations of assets in one place differs from the other (assets which used to be relatively outside this folder location are now within it?)
  6. When nesting loaders in an XMLLoader, I can use prependURLs to modify the location in which the assets are loaded. Unfortunately, if "../" was part of the URL path, the result is an invalid path. // example: inside data/assets.xml <SoundLoader url="../shared/sound1.mp3"> w/ prependURLs "http://foo.com/game/", this becomes: "http://foo.com/game/../shared/sound1.mp3" when it should be: "http://foo.com/shared/sound1.mp3" I was able to resolve this issue with an update to the LoaderMax.prependURLs method: public function prependURLs(prependText:String, includeNes
  7. I have an XMLLoader which loads an XML containing 2 LoaderMax objects, one with load="true" and one with load="false". When the XMLLoader triggers onComplete, I start my app and want to request the second LoaderMax to start. When I do this, however, the assets never seem to start loading. Am I calling things correctly? // XML <GameAssets> <LoaderMax name="Subload" load="false" childrenVars="autoPlay:false"> <VideoLoader url="videos/Main/M1.f4v" name="M1MainAnimation" autoDispose="false" /> </LoaderMax> </GameAssets> // AS3 private functi
  8. I'm sorry, but now I can't reproduce the issue (before I even copy this new version over). Did Adobe decide to finally resolve this issue in FP 11 or something? Now when I call rawContent.clear() it works perfectly fine. I looked at the new clearVideo() method & it looks like it would do the trick nicely (assuming the user is in a player which demonstrates the problem?)
  9. I have an app where relative loading is not an option. Instead, I use recursivePrependURLs with the absolute location of the files specified in the XML loaded via XMLLoader. Unfortunately, some file locations include the '../', which when combined with a recursivePrependURL is invalid example: prependURL="http://www.foo.com/widgets/" asset URL = "../images/bar.jpg" expected result = "http://www.foo.com/images/bar.jpg" actual result = "http://www.foo.com/widgets/../images/bar.jpg" I've written a validator on my end which scans for ../ in the middle of a URL and removes the preced
  10. Sorry, not sure what you mean by 'be in my GreenSock account". I'm not a Club Greensock member, and am unsure where else you may be referring to.
  11. Is there anything yet which highlights the new features/improvements of v12?
  12. Can't wait for v12. Sounds like the custom easing class would be a good solution.
  13. I was thinking the call would parse the array into the separate .to calls (like you said can already be done) rather than store the array and have conditional logic on every frame. But I see what you're saying, regarding the need for more customizability. What if it there was instead a way to store presets, something like: // Create a custom ease var customEase:Array = [] // Start by Strong.easeOut animating 60% of the way over 1/4 the duration customEase.push({ease:Strong.easeOut, start:0, end:.6, duration:.25}) // Next, animate back to 40% of the way over 1/2 of the duration custo
  14. I think it would be neat if you could pass multiple ease types to TweenMax.to, something like: mc.x = mc.y = 0; // Example 1: Elastic ease in to 150:150 over 1.5 seconds... // ...followed by Strong ease out to 300:300 over 1.5 seconds TweenMax.to(mc, 3, {x:300, y:300, ease:[Elastic.easeIn, Strong.easeOut]}); // Example 2: Strong ease in to 150:150 over 1.5 seconds... // ...followed by Strong ease out to 300:300 over 1.5 seconds TweenMax.to(mc, 3, {x:300, y:300, ease:[strong.easeOut, Strong.easeIn]}); // Example 3: Strong ease in to 100:100 over 1 second... // ...followed by Linear
  15. Looks like there is an even simpler solution, found here: https://bugs.adobe.com/jira/browse/ASC-3115 "...just set video.smoothing=false before you call clear and the video is cleared. You'll then need to set it back to true when you reuse it."
  16. When I show a video on start, the last frame of that video displays for a split second since that is the current data until the Video refreshes. Normally, Video.clear() would be the fix for that, but... ...there is a known bug with Video.clear(), logged in the Adobe system & never getting fixed: https://bugs.adobe.com/jira/browse/FP-178 The workaround seems to be either: show & hide video (which doesn't help since showing the video on start still displays the last frame) or: when clear() is called, destroy & reinstantiate the Video instance. It wo
  17. I think this will work. With this, I would need to have different LoaderMax nodes for each type of Loader, right? Since I may want SWFLoaders to noCache=true but not ImageLoaders.
  18. Or, in keeping with the LoaderMax syntax, something more like: VideoLoader.defaults = {noCache:true, autoPlay:false} SWFLoader.defaults = {context:child, noCache:true}
  19. I love how XMLLoader allows me to define additional assets to load within the XML file, but there is no way to override the default settings for each type, so I need to add the same properties over & over. For example, I am loading 100's of sounds & videos for use on demand. If I don't set autoPlay=false on every single corresponding node, everything starts to play immediately, shattering my eardrums It would be good if we could set the default values for these properties on some global level. If the corresponding node is not found, the default for that type would be used.
  20. I may have found a fix!!! I can't say whether or not there are side-effects, but I haven't found any yet. After loading all my assets (videos & sounds), I call SoundMixer.stopAll(); . This seems to free up the sound channels that were being held by the videos. So far, this doesn't seem to keep the video sound from playing when the video is playing. Please let me know if this fix works for you, or if you find any side-effects. Greensock, I'm not sure if the SoundChannel being held by video is a side-effect of Flash's native netStream stuff or something specific to VideoLoad
  21. Thank you for this post. I was banging my head against the wall trying to figure out why, after a certain point, sounds stopped working. I'd rather not change the way I load and manage assets (I don't want to unload & reload videos as I need them to play instantly upon request). Is the Sound Channel limitation only active sound channels? Is there a way, perhaps, to free up the video sound channels unless the video is actively playing?
×