Solved

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

Posted on 2007-12-02
4
221 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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
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

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Suggested Solutions

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 set there setting in Adobe Flash Media Live Encoder and YouTube for optimal video and audio quality.
The goal of the tutorial is to teach the user how to select the video input device. Make sure you have an input device that in connected and work and recognized by Adobe Flash Media Live Encoder and select it in the “video input” menu.

763 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

8 Experts available now in Live!

Get 1:1 Help Now