Jump to content
Search Community

Wonder Giant

Members
  • Posts

    17
  • Joined

  • Last visited

Everything posted by Wonder Giant

  1. Hi all, This may be more of a theoretical question. I need to pick someone else's brain since I have tried everything I can think of. I am working on an app that has a video track (with audio), and then I need ANOTHER audio track to be playing on top of that (in sync). The purpose being that I need to be able to toggle the second audio track on/off The video is in a VideoLoader. The Audio is in an MP3Loader. The are both set to autoPlay:false When I am ready to show them I call: // Sync the sound loader to wherever the video is mySoundLoader.soundTime = myVideoLoader.videoTime; // Play both files at once. myVideoLoader.playVideo(); mySoundLoader.playSound(); Trouble is if one or the other lags at all, then they will be out of sync. So I wrote a function to check on it every once and a while and resync the two files, but that in itself causes a 'glitch' when it resyncs. So overall I was wondering if there is some other magic way I do not know about to keep the two in better sync?
  2. Not sure if it is supposed to behave like that, but...I found a workaround. Instead of just jumping to the sections offset().top, you can check to make sure the "top" isn't taller than the height of the browser. // set to the "top" var dest=location.offset().top; // now check if the top is too tall if (dest > $(document).height()-$(window).height()) { dest=$(document).height()-$(window).height(); } TweenMax.to (window, 1, {scrollTo:{y:dest}, onComplete:myFunction});
  3. When using: TweenMax.to (window, 1, {scrollTo:{$("#footer").offset().top}, onComplete:myFunction}); It will fire the "myFunction" if the window is able to scroll all the way to that section, but imagine you have a small 50px footer, and you want to "scrollTo" that. The behavior of your browser is to allow you to scroll until you hit the end of the page (rather than continuing to scroll up even higher than the sites height). When that situation happens, the TweenMax scrollTo onComplete won't fire if the window stops short of the official "offset().top" Any advice?
  4. With the FLVPlayback component, if you go into fullscreen mode, the video will automatically be pulled to the top of the displaylist so all you see if video, and no interface. This is the behavior I need, but I was unsure if that was specific to the component, or if there was a way to do this with videoloader as well. If not, how would I go about pulling the video to the top of the display list (note that its in a child swf), and then returning it back to its original when someone exits fullscreen mode. I tried looking around for an answer to this but was unsuccessful.
  5. No, I am not sure it is TweenMax related. It is interesting that tweening something with a drop-shadow is seemingly causing a memory leak though. I will perform some more tests and report back as soon as I get through this project.
  6. Kind of solved it/have another question... My particles had a slight dropshadow applied to them. When i removed the drop-shadow the memory would stay at a semi-consistent level. For whatever reason, using a drop-shadow or cacheAsBitmap will both make the memory increase slowly if I use TweenMax on those objects. So this would obviously indicate that the "cache" from the cacheAsBitmap is being retained in memory. Any idea if it would ever leave, or a way to force it? It doesn't seem to be ever removing itself from memory
  7. I have seen MANY threads on here about garbage collection and ultimately TweenMax is doing its own collection, but I have a situation that seems to be showing me otherwise (though very slowly leaking). I have a test file setup that is forcing garbage collection (I know this is for debug only), and checking the memory every second: private function forceClear (event:TimerEvent):void { System.gc(); System.gc(); try { new LocalConnection().connect('gc'); new LocalConnection().connect('gc'); } catch (e:*) {} trace (getMemory ()); } private function getMemory ():String { var mem:String = Number( System.totalMemory / 1024 / 1024 ).toFixed( 2 ) + 'Mb'; var time:Number = getTimer(); var hours:Number = Math.floor (time/3600000) var min:Number = Math.floor ((time - (hours * 3600000)) / 60000); return String(mem + " | "+ hours + "hr " + min + "min"); } Then my swf has a bunch of particles inside of it that generally do nothing, but will randomly grow: public function passiveAnim ():void { TweenMax.delayedCall (Math.random ()* 140, grow); } private function grow ():void { TweenMax.to (center, .5, {scaleX:centerStartScale + .3, scaleY:centerStartScale + .3, yoyo:true, repeat:1, onComplete:passiveAnim}); } If watch the memory traces I see this: 108.14Mb | 0hr 0min 108.21Mb | 0hr 0min 108.29Mb | 0hr 0min 108.25Mb | 0hr 0min 108.21Mb | 0hr 0min 108.23Mb | 0hr 0min 108.25Mb | 0hr 0min 108.29Mb | 0hr 0min 108.27Mb | 0hr 0min 108.33Mb | 0hr 0min 108.38Mb | 0hr 0min 108.40Mb | 0hr 0min 108.41Mb | 0hr 0min 108.36Mb | 0hr 0min 108.41Mb | 0hr 0min 108.41Mb | 0hr 0min 108.56Mb | 0hr 0min 108.59Mb | 0hr 0min 108.58Mb | 0hr 0min 108.64Mb | 0hr 0min You can definitely see a pattern of growth. But if I turn the tween off, and the particles just sit there my trace is as follows: 109.22Mb | 0hr 0min 109.24Mb | 0hr 0min 109.24Mb | 0hr 0min 109.23Mb | 0hr 0min 109.23Mb | 0hr 0min 109.23Mb | 0hr 0min 109.23Mb | 0hr 0min 109.23Mb | 0hr 0min 109.23Mb | 0hr 0min 109.23Mb | 0hr 0min 109.23Mb | 0hr 0min 109.23Mb | 0hr 0min 109.23Mb | 0hr 0min 109.23Mb | 0hr 0min 109.23Mb | 0hr 0min 109.23Mb | 0hr 0min 109.23Mb | 0hr 0min 109.23Mb | 0hr 0min 109.22Mb | 0hr 0min It is almost perfectly steady. Any ideas? I can let this thing run for hours and it will climb slowly the entire time.
  8. So we all know that making a seamless loop with an mp3 can be a pain. If I understand correctly it is nearly impossible to get a seamless loop using an mp3. You always end up with a gap at the end. So that brings me to the LoaderMax MP3Loader. It has the option to do repeat:-1, but that still has the gap in the end. Does anyone know if there is a way to get a seamless looping sound loaded into flash with the convenience of and stability of LoaderMax. For example is there another method for loading in a sound (maybe an AIF, or raw bytes) with LoaderMax that will allow a seamless loop with repeat:-1?
  9. Never fails; As soon as you make a post, you will figure it out. I was running an older version of LoaderMax. Updated to the latest and it's fixed!
  10. No matter what I try, i can't get the volume to actually be 0. It is always at full volume; no more, no less. I have the following code: backgroundMusic = new MP3Loader("Tone_Loop.mp3", {name:"music", volume:0, autoPlay:true, repeat:-1}); backgroundMusic.load (); Any ideas?
  11. I am using a queue to load an xml and video: queue = new LoaderMax ({name:"mainQueue", onComplete:transitionIn2}); queue.append (new XMLLoader ("cofig.xml", {name:"myxml"})); queue.append (new VideoLoader (videoFile, {name:"myvideo", repeat:-1, container:main.videoHolder, autoPlay:true, scaleMode:"proportionalOutside", width:800, height:600})); queue.load (); Then later I am trying to pause the video, but when I do this: var video:VideoLoader = LoaderMax.getLoader ("myvideo").pauseVideo (); I get this error: 1061: Call to a possibly undefined method pauseVideo through a reference with static type com.greensock.loading.core:LoaderCore. Any ideas?
  12. So I am working on a project where I need a ton of PNG sequences which makes working with, and saving, files a nightmare. So my thought was to keep a "holder" movieclip in my parent.swf, and move the PNG's into the root timeline of a separate animation.swf file. So animation.swf is strictly just a timeline with a sequence of PNGs on it. What I would like to do is load that animation.swf and stick that timeline in my parent.swf "holder" movieclip as if it was always there. So to illustrate, currently it is doing this (rightly so): parent.swf > holder movieclip > loaded animation.swf > png sequence inside But I want to do this after I load animation.swf: parent.swf > holder movieclip > png sequence Does this make sense at all? Any ideas, if at all?
  13. Hello Forum, I have a huge video (1536x2720, f4v). I am using VideoLoader with repeat set to -1 in order to loop it. The problem is, when it goes to loop it causes a visual glitch in everything being processed. I.E. If something is moving it will hang for a second like the processor is being hogged. I guess I was curious if this is a behavior I can alleviate with some trick anyone knows, if this is a known behavior of using VideoLoader repeat, or if this is just the nature of looping such a large video. Thank you as always!
  14. In the spirit of giving back and not jut having another dead question post, I will post my work-around solution until I know of a better way. 1. I load the config.xml separately and DON'T include it in the preloaders progress 2. Once that is loaded I loop through the xml and "queue.append ()" all the loaders in it to a new LoaderMax instance 3. Before starting my new LoaderMax, I loop through my font nodes that I needed first and tell them all to LoaderMax.prioritize (); Probably not completely ideal since this requires me to know ahead of time what nodes in the config.xml that I need to loop through and add to the queue (somewhat defeating the purpose of having LoaderMax instances in the xml), but at least it works. I get my config.xml and fonts loaded first before the main swf files need them.
  15. I searched around for other posts about this topic, but didn't have much luck, so I'll try to explain my situation as simple as possible: 1. 'index.swf' has an XMLLoader that loads 'config.xml' with 'requireWithRoot' turned on so it is a part of my preloaders total "100%" 2. config.xml (sample below) has SWFLoader's and XMLLoaders inside of it that automatically get parsed and loaded. -- here is the issue --- 3. config.xml has SWFLoaders that contain font swfs that need to be loaded in BEFORE the other items inside my config.xml get loaded in. 4. I attempted to set a "prioritize=true" on their SWFLoader xml nodes, but it doesn't seem to bump them up to the top. It seems to load all the nodes form the config.xml in a fairly random order. 5. I need all of these items to be a part of the same load process since they all need to add up to the intial "100%" in my preloader. -- here is the question -- How do I get the font SWFLoader nodes to make sure they are loaded before the other items in the config.xml, but also make sure all of it takes part in the same load sequence so they all count toward my preloaders "100%". Hope that makes sense, and thank you for any help! -- here is my sample xml ---
  16. Hello all, I was unable to find anyone else with this issue, so chances are it is something I am doing, but I am writing this in hopes that someone else has found and fixed this issue. I made an app that uses TransformManager, and it works perfectly fine. Then when I load that swf into my main site, it will give me the appropriate cursors (like the TweenManager four-arrow move cursor), but it will not let me actually transform the items. Also the TweenMax cursors will stick to my mouse and not let go once I have clicked on an TransformItem. So essentially, it completely breaks down when loaded into another swf. Flash 10, AS3, Gaia Framework (for main site).
  17. So TransformManager has a handy "fitInsideBounds", but I actually need the opposite of that for what I am doing. Basically I have a 300x400 masked area, and I need the transformItem inside of it to always stay larger than that size. As well as staying larger than the masked area, I want it to basically drag so that you can never see the edge of the image either. Basically a startDrag bounds, but the bounds should always be the edge of the image no matter how big you make it. Not sure if I am describing this in the best way. hopefully someone gets what I mean, and might have a suggestion.
×
×
  • Create New...