I am in a situation that i have found no solution for after days of searching and have come to you all, this reliable resource, for help.
I have been succsessful in loading external text with a variable into a dynamic text box with an instance name as outlined in the number of tutorials on this site. my question is, following the script mentioned above, how do i target the variable (ie “mytext= blah blah” found in the external text file) created in one movieclip placed on the stage to load into a different movieclip also placed on the stage following a “onRelease” command?
scenario: a button in movieClip “A” needs to load external text into dynamic text box instance name “box” in movieClip “B” with an OnRelease action. both movieclips appear on stage of maintimeline.
perhaps there is a simple actionscript language i’m unable to understand.
all help is greatly appreciated as always.
Thank you very much, i haven’t found instructions for this nature anywhere.
If I understand what you’re saying:
You need to have your script point to that textbox through a path like:
[AS]
_root.b.box
[/AS]
If you use this from movieClip A, then _root starts at the timeline, goes to movieClip B, then to the textbox ‘box’.
Sorry I disappeared for a little while. I was at work and needed to go home to Flash to answer your question. You kinda called my bluff because I had never done that before; so I had to go home and see if I could.
Your actionScripts above is correct!! Here’s a fla that I threw together real quick like:
(BTW - for my fla to work, make a txt file called Textbox.txt!!)
And yes, leave this.myNews as is.
As an afterthought, is it possible to have text in a dynamic textbox (preferably the loaded text from the above example) link / communicate with the timeline ie actionscript?
for example:
have one word “news” in the textbox act as a link that will tell the timeline to go to a “news” label for example? I understand how to create a URL link with one word, just not a native flash link. How i’m doing it now is using buttons placed in front of the text which makes it difficult when new text keeps getting flowed in:)
visual example:
08.13.03
[COLOR=skyblue]NEWS[/COLOR]
Today is a landmark in outer planetary interactivity. today, people from other galaxies are communicating via the ethernet blah blah.
Thanks for any and all brain-cells excercised in this activity!
It’s because of people like you that these open-exchange forums work…you have a friend here.
Stop it, I’m gonna cry!!
Next, no, as far as I know you can’t have a link like that point back to the Flash movie. If you REALLY wanted to, you could have a link activate a PHP script that would assign a variable to the Flash movie to have it gotoAndPlay(whathaveyou); I’m just learning PHP and just used something like that; but that may be an overkill for you.
The only easy way around it is creative cheating. You could have some static text turned into a button behind the textbox (because it’s transparent), and then have it go visible when you hit the button. I posted another fla.
First, take this text and make it into a text file called Textbox.txt:
&myText=Hi!! My name is Freddythunder.
I really don’t have much to say. I do, though have red hair. Well, actually, it’s orange!!
Leave the carridge return after ‘Freddythunder.’ That leaves the space for where the button will appear when you hit the black button.
I always find that if you can’t do something right, you may be able to find a way to cheat!! See what that does for you.