View Full Version : I have troubles wit a document class
jazone
October 24th, 2008, 04:35 PM
Hi there.
I have a FLA file where I'm using two frames, in the first one I have just some simple code, but in the second frame I need to use a Document Class because I have a MP3 player that use all the classes in that document.
This document works perfectly when I use only one frame, but when I add a frame before the MP3 player crashes.
If you have any idea, please let me notice.
See you later.
creatify
October 24th, 2008, 06:25 PM
if you're referencing the mp3 player in your Document class, and it doesn't exists on frame one, the Document class isn't going to "find" it as the Document class is initialized on Frame one.
My recommendation, and I'm sure other people have others, is: if using a Document class, keep your main timeline at only 1 frame. Anything that you've placed on the timeline that is referenced in your Document class, needs to exist on frame one. Either slide your mp3 off the stage so it can't be seen, or set it's alpha = 0, then when its needed, set its position or alpha in the Document class. This is a quick way to handle this, it would be better, imo, to just use addChild to add your items to the stage after the Document class has been initialized. If you need timeline animations, I'd place those within their own movieclips on frame one. If you have objects within any nested timelines that you're trying to control via the Document class, you'll also have to make sure those are on the first frame of the nested clips, and hidden by one of the techniques mentioned above.
hope this helps.
jazone
October 24th, 2008, 06:41 PM
I think that this is my solution, because I have already tried to arrange in some forms, but just doesn't work.
Thanks for your help.
Regards
Powered by vBulletin® Version 4.1.10 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.