Jump to content
Search Community

Zync

Members
  • Posts

    72
  • Joined

  • Last visited

Contact Methods

Profile Information

  • Location
    Melbourne, Australia

Zync's Achievements

0

Reputation

  1. The best way would be to load your swf into an empty movieclip or sprite. Load stuff directly to the stage (while that works just fine) I've always found it to be less convenient and harder to manage than if it was just in its own empty container. Then depending on what you call the container, you can use the While loop. And hey ya Carl, yeah its been a while. Finally back from holiday and really want to start getting some game tuts out again for 'gaming with greensock'
  2. Hmm thats weird, I'm getting the same result. Figured at that point the bytes loaded should be back to 0. Edit: Just had a look see at the LoaderCore.as and around line 250 I justadded in: if (scrubLevel != 2) { _cachedBytesLoaded = 0; //Add this in for a quickfix dispatchEvent(new LoaderEvent(LoaderEvent.UNLOAD, this)); } But might wanna wait for Jack to see if its meant to function like this or not.
  3. Hey ya mate, Think you have to listen for the unload event and then do your trace from there: http://www.greensock.com/as/docs/tween/ ... tml#unload var IMAGE1:ImageLoader = new ImageLoader("images/flower.jpg", {name:"flower", container:this, x:0, y:0, width:200, height:200, onComplete:imageLoaded}); IMAGE1.addEventListener(LoaderEvent.UNLOAD, imageUnloaded); IMAGE1.load(); function imageLoaded(e1:LoaderEvent):void { IMAGE1.unload(); trace(IMAGE1.bytesLoaded); // unload event hasn't completed yet } function imageUnloaded(e1:LoaderEvent):void { trace(IMAGE1.bytesLoaded); // should work now }
  4. Hey ya mate, If I'm understanding you right, you want to clear the old clip before you load in a new one? If thats the case its not really a LoaderMax issue but more the way Flash handles objects in its display list. If you are loading your movies/images etc into an empty movieclip or sprite its faily easy to do: while (holderMovieClip.numChildren > 0) { holderMovieClip.removeChildAt(0); } The will remove any old clips in your holder movieclip, if you stick this just before you load in a new clip in your code, it should remove it before it places the new loaded clip in.
  5. Reckon you could post your files and I could take a quick look see?
  6. I think that has to do with your l, t and p values. You can just use: //event.target.progress //So function updateText(event:LoaderEvent):void { //l = loader.bytesLoaded; //t = loader.bytesTotal; //p = Math.ceil((l/t)*100); loader_mc.loader_txt.text = "Loading: " + String(event.target.progress) + " %"; } to get the progress of the loader instead without all the math and getting of variables if that's what your looking for.
  7. When your loading with LoaderMax you have to use the event it's sending it as your argument in your function. And that event type is a LoaderEvent not a ProgressEvent. Try this for your function instead. function updateText(event:LoaderEvent):void { l = loader.bytesLoaded; t = loader.bytesTotal; p = Math.ceil((l/t)*100); loader_mc.loader_txt.text = "Loading: " + String(p) + " %"; }
  8. Just wrapped up a huge project I've been working on with a mate. A flooring interior designer. 3D was done in 3DSMax and Greensock all the way for the loading and animations. http://www.zyncinteractive.com.au/portfolio/kbdesign/ And another one for a photographer, built with GAIA and Greensock and integrating VIMEO Video http://www.jodymuston.com
  9. Hi Berilac, Yeah typically in site design you want to have all your pages separate as you should think about the end user. They probably don't want to load the entire site in 1 shot, not only would it be slow on some connections but there may only be some specific pages that they want to see. By having a loader for each page you give the user a choice as to weather or not to download that page. You can either make self loaders in each page, or what most people do is build a loader function in the main 'shell' or 'holder' page of your site that loads the separate pages into a movie clip container. GAIA btw is a great framework that guides you with building multipage flash websites both quickly and easily and best of all uses the Greensock library. I don't have any examples at the moment but I'm working on a GAIA + Greensock tutorial series showing how how build a complete site with the GAIA framework + using loaderMax and TweenMax for various elements. Should be out soon.
  10. And you can also use autoAlpha. Will set the visible to false after the tween hits 0 alpha TweenMax.to(mc, 1, { autoAlpha:0 });
  11. Hey ya mate, can you goto Publish setting in your flash movie and turn on debugging under the flash tab. That should tell which line the error is on
  12. Hey ya X10, A technique I use when I want to setup an animation with bezier curves but don't want to keep retyping numbers all the time is to setup a few 'dummy' movieclips on the stage. You can name them p1, p2, p3, p4 etc for however many you need. Then reference the x and y coordinates of each Movieclip as points in your bezier curve. That way you can simply move the movieclips around the stage and it will allow you to dramatically speed up your preview when you are testing your movie without retyping x and y values. Hope that helps.
  13. G'day mate, What error are you getting? And just quickly glancing over your code, with this line: mc_txt.text="loading"+ kbps.ToString()+"%"; The ToString method should be .toString. ie no capital on the T mc_txt.text="loading"+ kbps.toString()+"%"; But yeah if you can post the error your getting it might help find the problem as well. Cheers -Z
  14. Hmm yeah that sounds really weird indeed. A compiled swf should be a compiled SWF with all the AS code embedded although I haven't worked with As2 is a fair while in regards of loading another SWF into a container SWF for ad distribution. I used to make ads for the Eyeblaster network if your familiar with that. Anyways glad you got it working. The code all seems fine.
  15. Hmm not quite sure atm but I can have a look see at it after work today
×
×
  • Create New...