PDA

View Full Version : Using Frame-Scripts & Document Class Together



dr_tchock
January 29th, 2009, 06:28 AM
I have a series of .fla's which all have the basic functionality written into a document class. However, each one contains data (text) specific to that particular .fla

At the moment, I am using a rather large case statement to store and select the data to be displayed but, with about 100 .fla's it's becoming a bit big.

Ideally, I'd like this data to be stored locally in each .fla in the form of variable declarations within a framescript to be used by the main doc class. Even better would be to declare a function in a framescript so I can tweak functionality for each .fla whilst maintaining the overall structure with the doc class.

I've tried simply adding a variable declaration in a frame but no dice - is this even possible?

creatify
January 29th, 2009, 03:10 PM
It's known that framescripts don't play well when your swf is initialized via a Document class. My advice would be to set up document classes for each of your sub swfs. If that's not an option, and if you're dealing with 100+ swfs, you may need to set up some type of manager class that essentially stores all the paths to your swfs and within that manager class you associate data for each on of the child swfs.

senocular
January 29th, 2009, 03:50 PM
http://www.kirupa.com/forum/showthread.php?p=1950401#post1950401
http://www.kirupa.com/forum/showthread.php?p=1914661#post1914661
(^ and if you already have one, its added into the existing)

dr_tchock
January 30th, 2009, 05:53 AM
Thanks for the answers. I guess I'll just have to persist with the current method as I don't want to have to make any substantial changes due to being halfway through this project already.

Cheers anyway!