Jump to content

Recommended Posts

 

Hi,

 

I am using a flash movie with a compentent on the canvas at root level called 'myBook'. Within the component I am loading other flash movies.

 

On my root canvas, I have a text field (instance name 'display_txt') and I am able to create a variable called 'res' and display the value of it in my text field using the script below:

 

res = hello;
display_txt.text = res;

 

But I can't get the value of it to display inside the embedded movie, in the text field with the instance name 'test_txt'. Does anyone know how to do this? Is my variable available or do I need to make it global? I've tried the following:

 

test_txt.text = res;
test_txt.text = _root.res;
test_txt.text = _parent.res;
test_txt.text = level0.res;

 

Thanks for any help you can offer.

 

I've now managed to get it work but not completely. I was defining my variable within a function so it wasn't global. My defining it outside a function I am able to access it with the following code.

 

test_txt.text = _root.current_page;

 

However, I NEED to define the 'current_page' variable within a function. How can I do this but still make it global?

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.