Solved

How do I use inputted text in swfs loaded into a project?

Posted on 2007-12-02
4
243 Views
Last Modified: 2010-04-21
I have created a movie which loads external swfs.  I have an input text field in one movie which asks for the persons name.  I need to be able to pull and use the name in other swfs that are loaded later, such as the quit one.  I created a global variable, and tried calling that, but it shows up as "undefined" in the  other swfs when it should show the name.

Hope someone can help with a solution that isn't too complex (newbie here) and doesn't require me to rebuild the project work that I've got so far!

TIA,
wordee
0
Comment
Question by:wordee
  • 2
  • 2
4 Comments
 
LVL 2

Expert Comment

by:h8tow8
ID: 20394595
Well, If i have this correct, if you define a variable such as

var Num:Number = 0

on your base movie, you should be able to assign and retrieve values from that variable by using

_root.Num  

Maybe give some more information about what you have tried
0
 

Author Comment

by:wordee
ID: 20399786
Does your answer require the text to be inputted in the root or main movie?  The way my program is set up, it is not.  It is gathered in one of the other swfs that the root movie calls using  the LoadMovie function.
Is it not possible to get it from that?  (Thank you for the response.)
0
 
LVL 2

Accepted Solution

by:
h8tow8 earned 500 total points
ID: 20402184
Ok, you need to declare the variable in your base movie.

using the same example as i did above

var Num:Number

Then when you are in your movie that you loaded from that base movie using the LoadMovie function, you can assign a value to that variable such as

_root.Num =  this.my_input.text

that value is now stored inside the Num variable on your base movie.

You can call this variable from any subsequent movie loaded by the LoadMovie function. by always referencing the "_root". This will take the absolute root, so make sure that if you a movie inside of a movie inside of a movie, you reference this correctly. (If that makes any sense at all)

Maybe put a code snippet in here if this doesnt make sense to you
0
 

Author Closing Comment

by:wordee
ID: 31414428
thank you very much!  I just got this, and the project was due two days ago, so I turned it in "broken", but I will use the knowledge learned here to improve any new ones that I build.

Regards,
wordee
0

Featured Post

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Here are some practices and techniques that can be adopted into your Flash/Flex application development process. Note: Not all "performance tips" provide an immediately-recognizable benefit.   This article does not include timing validation data,…
In my long career of working as an actionscript developer, I had spent sleepless night often working hard to solve some small problems which actually took a lot of my development time; later found out the solutions to be a line or two. Here are s…
In this tutorial viewers will learn how to create a basic shape tween animation in Flash including shape hints for smooth animation Open a new document in Flash: Draw a shape: Select another frame (how long you want the tween to be): Right click and…
The goal of the tutorial is to teach the user how to how to record live broadcast.

775 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question