Jump to content
GreenSock

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

carlosfandang

Members
  • Posts

    24
  • Joined

  • Last visited

carlosfandang's Achievements

0

Reputation

  1. Hi, I think I've basically go to grips with loadermax, but wonder if you could give me an idea ond a silly problem that I'll try and explain but is still related to the 3rd party dispatchevent!! Basically, I animate my main site at load (I keep the load small initially for many reasons, including stuttering from 3rd party apps loading during animation). Then I load swfs when I need them (i.e the .load() event only occurs when a menu button is clicked). However, it seems crazy not to actually have some of these sub swf's loading in the background, BUT I have a newbie problem concerning "if" a sub swf is loaded or "else" (but not relating to your loadermax oncomplete). My main issue is that most of my sub swf's are built through third party apps, they are quite large galleries and therefore I would like to load them once and then just play with visibility, etc. Makes sense - I load a sub swf, a "loading" icon is displayed until the third party app dispatches it's own complete event at the end of a load (as this post originally dealt with). That's cool - show icon, then hide it on 3rd party dispatchevent. Then I hide the window when other menus are clicked. My problem is that if I then click on that menu again (say to toggle the visibility of the app) - then the "loading" icon is displayed again, but as the 3rd party app is already loaded it will not disappear as there is no dispatchevent again from the 3rd party app. Whilst, I've done a "hoaky" fix (replace the original menu button on first click with another that doesn't launch the "loading" code) - is there a way to code some script to say if "3rd party dispatchevent has already happened "don't show loading layer again". This also affects why I am not loading it in the background - if a user clicks the menu and it hasn't finished loading, then that's fine, but if it has finished then the "loading" icon is shown and won't disappear - again I could do a "hoaky fix" but surely there is a simpler way!! Sorry for longwinded explanation, but hope that makes sense. Thanks in advance.
  2. Thanks for the quick reply, as always I appreciate your kidn help. I started looking into all your suggestions and then suddenly had a "newbie" brainwave (stroke/ wonder if!), I tried it and it works!! Bascially, I imported the swf into the library and went into the movieclip and just added 2 more frames for each keyframe. So, whilst probably not the done thing, it's slowed everything down by 2/3rd's - result. Of course it's easier on a small web banner, but will look into your suggestions for content that is more complex. Thanks again, you the man. Fandang
  3. Hi, I am running my main site at 30fps and most of my loaded swfs are at the same fps. However, I have a number of flash banners I have made in the past that I want to display using Loadermax. These banners run at between 12-15fps (I no long have the fla's just the swf's, so can't change them) - when loaded they run at 30fps as per the main site. I don't suppose there is a way of running them at their own fps?? Cheers Fandang
  4. Mmmm - well you've got me there I'm afraid. The photo galleries are all standalone SlideShowPro components - which are pre-coded and there doesn't seem to be much ability to mess around with it. The answer is yes, I didn't know about LoaderMax before I used these, but also don't have much chance of correcting it. The only thing I can find from their forum re:QueueLoader errors is to disable Content Caching. Might try that, but it does work for the average user!!
  5. Well, seem to have been at this since forever - but many thanks to Greensock and all the help on the forum - my first fully Flash website is now completed (for the time being!). See what you think: www.fandang.com Cheers Fandang
  6. Genius - thank you so much for your continued help. That did the trick beautifully and I think it's all slowly sinking in!!
  7. Hi, I'm getting stuck with something which I'm sure is dead simple - event listening and dispatch. Find it hard anyway, let alone through using it in LoaderMax. Basically, I'm using LoaderMax to load separate SWF's ("EventsAlbum", etc) into a parent SWF ("Gallery Holder"). That's cool, got that and very happy there. But my problem is that the child swf's are SlideShowPro galleries which have a delay in starting up in their AS3 component (so you get a blank screen for a while - it's a recognised problem with their component!!). So I thought, I could get the parent to listen for the "onAlbumStart" event that you can script in the child (i.e when the gallery has completed its load) and then run a TweenMax. BUT I'm just not understanding the event bubbling process at all !! So I have a LoaderMax set up and then a btn function load it: var queue1:LoaderMax=new LoaderMax({name:"photoQueue1"}); queue1.append( new SWFLoader("photos/events.swf", {name:"EventsAlbum", estimatedBytes:96000, visible:false, container:this, x:44, y:47}) ); queue1.load(); var contentevents:ContentDisplay = LoaderMax.getContent("EventsAlbum"); function eventslaunch(event:MouseEvent):void { // set loader content and visibility LoaderMax.getContent("EventsAlbum").visible = true; The child script is below - this says when the Album has loaded and started: eventsgallery.addEventListener(SSPAlbumEvent.ALBUM_START, onAlbumStart); // Preloading is done, what to do now? function onAlbumStart(eventObject):void { trace("GALLERY LOADED"); }; In the parent, I simply want to know when "onAlbumStart" has happened and then run a simple Tween. Can anybody help a dumbass with the script to dispatch event in the child and then listen through a LoaderMax in the parent? Sorry, I'm always the stupid one, but I'm learning!!
  8. Thanks for the quick response, I agree I am probably doing it wastefully - and through lack of expertise!! I think I need to re-think the loading process. Currently, the external swf's only start loading on a menu click. I think therefore, I should have everything loading at the beginning, and have a look at prioritising. Thanks, I'll have to try and get to grips with the queue mechanism.
  9. Hi, just discovered Loadermax - very nice thank you. I have a snag I can't seem to get around (mainly because my knowledge is still limited). The scenario is this: 1) I have a number of timeline animations for each menu button - each has an onComplete event to load an external swf - "addChild(Loader.content);" 2) I am using the onComplete in my animation timeline because the animation needs to finish first, then load the swf (interim solution). 3) The external swf's (e.g "First.swf") run their own animations BEFORE they then load another swf into themselves ("external subwindow") - these are 3rd party swf's including highslide photo gallery and coverflow gallery. I accept it's clunky, but I was trying to minimise initial preload and lack of skill!! Right that aside, all that's important is that "First.swf" preloads (3rd party apps take care of their own loading). 4) Thus, I have 2 oncomplete events that I need to synchronise. How do I ensure that "timeline1" ONLY runs addChild IF "FirstLoader" has actually completed its loading of "First.swf". So in very basic terms and stripped down, my code is: var timeline1:TimelineMax = new TimelineMax({onReverseComplete:triggerQueue, paused:true}) timeline1.insertMultiple([ new TweenMax(whatever}}), new TweenMax(whatever, 2, {blurFilter:{blurX:3, blurY:3, quality:2}, onComplete:finish}), ], 0); // function finish(){ FirstLoader.load(true); addChild(FirstLoader.content); } My Loadermax is set up as this: FirstLoader = new SWFLoader("First.swf", {name:"First", x:0, y:0, estimatedBytes:920000, onComplete:FirstcompleteHandler}); } function FirstcompleteHandler(event:LoaderEvent):void { Object(FirstLoader.rawContent).Firststart(); //that gets my external timeline running in First.swf } function FirstClick(MouseEvent:Event):void { RunTimelineAnimation(); //runs timeline1 } Any help much appreciated, I'm not very good with IF statements and listeners!! Thanks so much in advance
  10. Hi, Forgive my stupidity, but I'm having problems with running my tweens in frame 2 after a preload. I'm using AS3 so PreloadAssetManager is not really for me. I have a number of fairly complex tweens running in separate swf's that I want to load into a parent swf. I want to make sure they have completed loading before the animation starts (which is instant) and therefore, wanted to do a preload inside the external swf's in frame1 and then goto frame2 and start the animations. Frame1 action script in each file would be: stop(); //Listener addEventListener(Event.ENTER_FRAME,loading) ; Mouse.hide(); // Mouse Hide preloading.startDrag(true); //Drag Start function loading(e:Event){ var loaded = Math.round(stage.loaderInfo.bytesLoaded); //Download File Size var total = Math.round(stage.loaderInfo.bytesTotal); //Total File Size var getPercent = loaded/total; preloading.txt.text = Math.round(getPercent*100); if (loaded == total) { //File Download Finished Site or Project Open 2. frame removeEventListener(Event.ENTER_FRAME,loading); preloading.stopDrag(); Mouse.show(); gotoAndPlay(2); } } I have the import greensock classes and all the assets on frame2, and it just won't work. I'm new at this, so just not been able to work it out, get an error #1009. Am I putting the import classes and assets in the wrong place? Thanks for any help.
  11. Genius, thank you so much. I'm really having to study this hard to get to grips with it, but thank you again. Just to share with other users on the forum looking for similar functionality, the final solution is provided below - and to be honest "Greensock" pretty much did it all. Basically, it provides the following: 1) Each menu button has its own animation - plays at normal speed. 2) Each animation will run, after a reverse (reverse plays at twice speed) of the other animations and a delay between them. 3) The "reset" function also has an oncomplete (this is separate - I use it because it affects other animation unrelated to the menu animations). The menu functionality: var activeTimeline:TimelineMax; var queuedTimeline:TimelineMax; function activateTimeline(tl:TimelineMax):void { if (activeTimeline != tl && activeTimeline != null && activeTimeline.currentTime != 0) { queuedTimeline = tl; activeTimeline.reverse(); activeTimeline.timeScale = 2; } else { queuedTimeline = null; activeTimeline = tl; activeTimeline.play(); activeTimeline.timeScale = 1; } } function triggerQueue():void { activeTimeline = queuedTimeline; if (activeTimeline != null) { activeTimeline.delay = 0.75; activeTimeline.timeScale = 1; activeTimeline.restart(true); queuedTimeline = null; } } function resetclick(event:MouseEvent):void { if (activeTimeline != null) { var t:TimelineLite = new TimelineLite({timeScale:2}); t.append( activeTimeline.tweenTo(0, {onComplete: myfunction}) ); } } The code at the beginning of each separate menu animation: var yourtimeline:TimelineMax = new TimelineMax({onReverseComplete:triggerQueue, paused:true}) The code in the menu button listener: function menuclick(event:MouseEvent):void { activateTimeline(yourtimeline); Brilliant, thank you for all the help and hopefully this may prove useful to those looking to run animations from menu clicks with a sort of oncomplete function. Fla enclosed. Cheers Fandang
  12. Well, I decided to take the easy route based on what knowledge I have. I simply created a blank timeline (i.e no animation) to replace the reset click. Now the "home reset" works at double speed on the reverse and fades in the assets animation for the homepage - not good coding I suppose, but works fine. Of course I had to reduce the delay between animations, as that takes me back to my original problem of not having a delay from when you're technically on the homepage! Thanks for the continued help.
  13. Thanks for the response again, unfortunately I'm so fresh with scripting I haven't worked out how to just set a boolean variable for the reset function only in triggerQueue (I'll keep looking at it, but as I said, it's all trial and error with me!). So I successfully implemented the tweenTo oncomplete function which achieved what I wanted apart from the timescale. I see you covered this topic with user gerrydesign. All my reverse animations run at timescale = 2, whilst play runs at timescale = 1. So sadly, the reset tweenTo reverse is great apart from it runs at the timelines original speed. Thanks anyway, will have to keep trying to work things out. Cheers
  14. Thanks for the response, just back from a trip and I will have a look into your suggestions. I got the timescale reverse (speed) sorted by trial and error, so I'm learning all the time. Thanks
×