Using LoadVars to load large text data values from within flash

Posted on 2005-02-25
Medium Priority
Last Modified: 2012-06-21

I currently am using a text file to load vars into flash. The text file contains many values and a lot of text. This works fine but I want to secure this text file by having its' contents already existing in Flash to use, is this possible?

for instance one of the variables in the text file is used for a html field in flash, eg:  f030txt="<ol><li>Place bcrossways under chest</li><li>Prop up on elbows</li><li>Sag chest down</li><li>Look straight ahead</li></ol>";

f030 gets loaded into a html field. But when I retrieve this variable (f030txt) by other means apart from load vars in text file it will only display the first bullet point.

I hope this is clear enough.

Question by:Chris_Granger
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

Accepted Solution

sokhodom earned 2000 total points
ID: 13407564
hi chris,

Try to enable the "Render Text as HTML" property for the text field.


Author Comment

ID: 13409211
Yes, render as html is on which is why this part is displayed and rendered correctly: ="<ol><li>Place bcrossways under chest</li>"  the rest of the string isn't though. But if I load this text into a loadvars object from a text file I can access all the variable strings in the object and they display correctly. I really need to stop people from getting easily to this text, is there another way for me to secure this file, both on mac and pc?  Such as Flash encryption?


Expert Comment

ID: 13409620
>> But when I retrieve this variable (f030txt) by other means apart from load vars in text file it will only display the first >>bullet point.

What is other means apart from load vars?
Sometimes, we choose "single line" instead of "Mulitple Lines". May be you could try the "Multiple Lines" property of the text field?


Author Comment

ID: 13580509
The other means I use which works is with the object:

      loadVarsText = new LoadVars();
      loadVarsText.load(assetdir + "data");
      loadVarsText.onLoad = function(success) {
            if (success) {
                    exfield.html = true;
                    mufield.html = true;
                    exfield.autoSize = true;
                    mufield.autoSize = true;
                    var exdescription = "<b>Instructions</b><br>" + eval("this." + ex);
                    myexfield = exdescription;
                    if(eval("this." + mu) == VOID){  // if no associated clip
                          mymufield = "";
                          mymufield = eval("loadVarsText." + mu);
            } else {
                      trace("not loaded");

The only other method for this to work would be to set every variable as globals at the start of movie and relate to them without an object..

This will be what i must do....   :-(

Thanks for the help

Featured Post

Enroll in August's Course of the Month

August's CompTIA IT Fundamentals course includes 19 hours of basic computer principle modules and prepares you for the certification exam. It's free for Premium Members, Team Accounts, and Qualified Experts!

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…
I have found that much of my time doing support ends up being a constant repetition of the same steps to different people.  Early on I stated using web pages with Frequently Asked Questions (FAQs) to alleviate most of the burden.  Sometimes this jus…
In this tutorial viewers will learn how to create a basic motion tween animation in Flash Open a new document in Flash: Draw/import an image: Press CTRL + F8 to convert it into a graphic symbol: Select a frame (how long you want the tween to last): …
The goal of the tutorial is to teach the user what frame rate is, how to control it and what effect it has on the video.
Suggested Courses
Course of the Month9 days, 18 hours left to enroll

762 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