This content has been marked as final. Show 4 replies
In regards to the first part of your question, are these webpages loading automatically regardless if the user clicks on the buttons in the main.swf? If not, then if the user is in the ‘AboutUs’ section of the site and wants to go to the ‘Contact’ section, just have the button direct the playhead on the main timeline to go to the contact section frame. So you would have something like this in that button’s eventhandler;
And then on frame 5 (Contact section) of the main swf, have an unloadClip() that will remove the current swf (in this example it would be the ‘AboutUs’ swf) from the MovieClipLoader instance before creating/loading the Contact.swf.
To answer the second part of your question, yes Flash will get sluggish if you are animating text. Thankfully in Flash 8 you can set the cacheAsBitmap() to true and should see a increase in performance. Would you be perhaps scrolling these textfields that are causing this poor performance?
Hi myIP, thanx for the help, it works. =)
I didnt think ._parent works on loaded swf, because i had to use _lockroot on the loaded swf.
what you said, about unloadClip() maybe you could give me some pointers on better layouts.
because the way im doing it now is, i have one main timeline, where all the pages are spread out on frames. and on each page i'm using a different movieClipLoader() which loads a preloader and the preloader loads the actual swf.
there has to be an easier way to do this, and im thinking your unloadClip() is one of those ways. =)
a final site i make looks something like this..
i have a separate preloader for each page in the site. and a separate movieClipLoader() for each page's preLoader.
basically, it's quite a mess. =)
if you wanna see an example, i can give you a FLA to see the mess i work with. =P
and "no" the textfields im working with dont animate.. i was saying when im working with the FLA inside Flash, it slows down my comp quite abit when i have alot of text on stage.
i just have a movieClip with a big text field on it's timeline, and the only animation it does is at runtime when the user rollsOver a button, the MovieClip itself scrolls up and down.
“I didnt think ._parent works on loaded swf, because i had to use _lockroot on the loaded swf.”
The _lockroot property prevents absolute paths from the incoming swf reaching into the main swf. So if you use “_root” in the incoming swf you would want to set the _lockroot property to true. However, since the following;
…is a relative path, the _lockroot is property is not needed.
From what you have mentioned about all of your swfs, I would recommend having a preloader that will handler all incoming swfs (homeLoader, aboutLoader, contactLoader) in the main swf. You can have this preloader called out (using attachMovie() ) from the Library when it is needed and using the removeMovieClip( ) when it is not needed. I would still use the ‘unloadClip( )’ each time you enter into a new frame in your main.swf to clear the content.
“…it slows down my comp quite abit when i have alot of text on stage.”
If this is the case then lower the render quality when in author-time. You can do this by navigating to the following in Flash, View> Preview Mode>Fast. This will not affect the quality of the SWF when it is compiled.
im affraid im not that advanced yet =)
i dont know how to call movieClips from the library. also, the preloaders i use, have a emptyMovieClip which loads the external swf into. now if i understand you correctly, if i use removeMovieClip() after it's been loaded, then the loaded content goes with it.
I really need to change the way i do flash sites. Your method seems a better way, but i cant use it with my knowledge right now. (which is quite limited ) =P
Thanx for the info, i'll look into it and try to learn how i can use your method.
and thanx for the Preview Mode Tip, that worked great. I was starting to think that my comp had something wrong with it.