Solved

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

Posted on 2007-12-02
4
267 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

SharePoint Admin?

Enable Your Employees To Focus On The Core With Intuitive Onscreen Guidance That is With You At The Moment of Need.

Question has a verified solution.

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

Recently, I was asked to recommend a tracking system to be implemented on a clients website. As the entire site was built on flash, my first thought was to suggest custom built tracking system. However, our company at that point of time didn't h…
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…
The goal of the tutorial is to teach the user how to how to record live broadcast.
The goal of the tutorial is to teach the user how to set there setting in Adobe Flash Media Live Encoder and YouTube for optimal video and audio quality.

718 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