Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Refrencing Dynamic Text

Status
Not open for further replies.

WelshTeckie

IS-IT--Management
Aug 9, 2007
37
GB
Hi,

I am trying to change text from a click of a button in another scene. I have got it working in the same scene by using the following

buttonname.onRelease=function(){
DynamicTextName.text="new text.";
}

But I need the text to be in another scene.

Is there a way to code layername.dynamictextname.text or something??

Thanks
 
I have not got it uploaded yet.

I am not sure that I am using the right terms, as in scene, I am new to flash and it might be a symbol, or something else. But its a Dynamic Text box in not in the same layer as the button.

Is there not a global name you can give something to reference from anywhere?
 
Ok let me try and explain just in case its not clear what part I am trying to reference.

There is 1 scene called "Scene 1", in that scene there is a component?(the thing with a cog or gear for an icon)
And within that there is a layer called LayerText and within that there is a dynamic textbox called MainText. And I am trying to reference that and change the text through a .text property from another cogie/gear thing!
 
Not too sure I want to upload the fla. its a template I just bought for my website.

I have narrowed it down. I am now using a global variable which is declared in the frame where the dynamic text box resides

_global.ServiceInfo = "TEST";
var TempVar;
TempVar = ServiceInfo;

I had to use a local variable and pass the global because I couldn't get the text box to display either ServiceInfo or _global.ServiceInfo?

So then I link the variable to my text box, and on the button I have the following

clickit.onRelease=function(){
S
_global.ServiceInfo ="New Text.";
}

But when I click the button nothing happens, so I'm not sure whats going wrong.

Hopefullt you have some ideas without an upload, Thanks.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top