Solved

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

Posted on 2007-12-02
4
233 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

This article describes a solution to a problem of subloading one movie into another when they have different SWF versions. Sometime back, I was working on an ActionScript project while I came across an interesting fact which I would like to share…
The last time I worked with Flash and Socket connections was in AS1. A recent project required flash connecting to a Socket, and sending receiving information - we figured it would be easy enough - we all know about the socket policy documents and c…
The goal of the tutorial is to teach the user how to how to load their YouTube profile onto Flash Media Live Encoder.
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.

863 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

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now