Helpful Information
 
 
Category: Flash Help
using a var off the main timeline in a movie clip?

I know this can’t be too difficult, but my flash bible falls a little short on this one… Please keep in mind I am very new to using Vars in flash (but love it so far).

I’m creating and updating variables in my main timeline. I have a movie clip in that same main time line that I want to display text based on the variables that are being updated in the main time line. What is the codedge for the text box in the movie clip to display the info assigned to the variable in the main time line?

Thanks!!!!

Hmmm....

I could be wrong, but I think that the movieclip on the mainline should have this action:

onClipEvent( enterFrame) {
this.textbox1 = _root.variable1;
}
Does anyone agree?

are you using dynamic textboxes in your movieclip??? if thats what you are doind than the name of the text box is the name of a global variable connected to it...everytime you change the value the text box will change...maybe i'm just getting confused about what youre aiming for...rob

you got it rob.

I changed the varible for the text box to _root.atext and boom!!!

now,, why does the text in the dynamic text box look choppy? That just won't do....

Thanks for your help

sorry...missed one detail...at the bottom it sat "embed font"...this is where you can embed the font into your swf for antialiasing...
if you click "[ ]" it will embed the whole thing...boosting your file size by like 20k or more...or choose a combo between [AB] [ab] [123] [()!] for just embedding the caps, lowercase, numbers, and punctuation respectively...or if you need a very small subset...simply type the characters ya want into the text box at the end...for most cases choose upper and lower cases, numbers and punctuaton, this will still leave out about 100 characters that you'll most likely never use like the 1/2 and circle R...

btw: your variable name doesn't need to be so..um..f'd up...so ya can just name the text box myDynamicText...or don't...but the way you named it seemed that you are thinking setting it's value somehow has to do with timelines...its a global so anywhere you say myDynamicText="Poop" will work fine...

Thanks Rob,

This project is a part number configurator for an electronic rack product line. There are 16 boxes to fill (A-P) with numbers which build the unique part#. atext will be the text equivilate to a number that is filled in. then there will be a btext, ctext and so on.

Thanks for your help again. I'm having fun building my 1st flash app. I'll shot you off a link when there is more to see.

not to make you feel as if you're goin crazy, but apparently what i said about dyn. text boxes being linked to global variables was untrue...so...like you said you do need instancename.textfiledname ="blah"
my bad...good luck, rob










privacy (GDPR)