1 person found this helpful
a cdata tag is needed if you have content you don't want parsed by the xml parser. most commonly that would include any content that contained an angle bracket: < or >
but can include other situations.
I decide to use the following code:
var myFormat = new TextFormat ();
myFormat.font = "Arial";
myFormat.size = 12;
myFormat.color = 0x006699;
I have 32 swfs each have 5 frames, they load into a movieHolder clip in the Movie Holder movie. The code works but it has to be input on each button release when the movie moves to each frame and then the code will be input on each of the 32 swfs.
I was just wondering if there was a way to set all the code in one spot or one swf. Any idea help is appreciated!!
yes, code can always be maintained in one location. but how you do that depends on your setup and i don't understand your setup.
My setup is 32 questions (swfs) consisting of 5 frames. Each frame is basically the same. The first asks the user to pick the one item out of 4. When the user selects and item he goes to a frame 2, 3, 4 or 5. These frames tell user if he is correct or incorrect and provide a description to him of the item he chose. Each frame has dynamic text boxes where the text is pulled in from an XML file.
There are 32 swfs each subsequent one loaded once the user selects the correct item. There is a MovieHolder.fla and within the clip movieHolder these 32 are loaded using loadmovie.
I don't know if that makes sense to you but that's about how it is working. I am ok with inputting the textformat code in each swf if I have to.
HAve a great day.
your main swf could contain the code for all 32 load targets. if you xml files aren't conveniently named, you will need to use an array to associate the loaded swf with the corresponding xml file.
I'm going to look into this. Thank u!
I put the formatting code in the main movie which contains the swfs. Each swf loads the other, the main movie loads the first swf. I could not target the loaded swfs from the main movie, they are all loaded in the MC "movieHolder" so one swf loads each subsequent one. The first two swfs do not have dynamic text boxes which I need to format, the rest do.
I tried the basic:
the bold is the movieclip. mainTitle is the text format variable. Does flash need to know when theparticular swf movies load? Also how can you target frames within those swfs. Sorry so many questions.
This code works if it is placed in each swf:
I wanted to know if I could just use the formatting code once in the main movie. Any help is appreciated.
the main swf should load all the other swfs if you want to centralize your code.
I see what you mean. Unfortunately it was not originally set up that way. Hmm I will have to just add the code to each swf or try and centralize the code. Ok thanks!