| Register
Saturday, May 17, 2008   

Loading Dynamic Content in Flash

Created By  Satori Canton, at  7/13/2004 - 58 comments.

Click to view this author's website.

In my previous article I went over some simple but useful way to manage data in Flash using arrays. Mostly we talked about data that already existed in your Flash movie. However, when creating Flash applications, eventually you are going to want to load content from an outside source. Loading movies and JPGs are pretty straight forward. However, when loading text or other data in Flash, using the LoadVars object, it can be a little awkward. However, it doesn't have to be as awkward as it may seem.

LoadVars is a great little object once you get used to it. I use it for everything from loading text, data and even managing the loading images and SWFs. Everything I've ever read about LoadVars starts by showing you how to load a simple text file. Because LoadVars is expecting to load variables, the text must begin with a variable name, as in:

myText=The quick brown fox jumps over the lazy dog.

Supposing that you saved the text above in a text file called myText.txt and had a dynamic text field on your stage called myField_txt. You could load this text into your text field with the following code on the first frame of your movie:

var lv = new LoadVars();
lv._parent = this;
lv.onLoad=function(success){
   if(success){
      this._parent.myField_txt.text = this.myText;
   }
}
lv.load("myText.txt");

The first line var lv = new LoadVars(); creates a new instance of the LoadVars object and assigns it to the variable lv. LoadVars objects are data objects and do not have a _parent property like MovieClips. If you want to use the _parent property on a LoadVars object to reference the object that holds it, you'll have to assign that property with the line lv._parent = this;.

The lv.onLoad function is called when the variables have been loaded and parsed. If they were loaded and parsed successfully, the variable success will evaluate out to true. If there was an error, it will evaluate out to false.

Finally, we can assign the text that we loaded to the text field on the stage. Notice that when we are inside the lv.onLoad function, the term this does not refer to the movie clip holding the LoadVars object, but refers to the LoadVars object itself. We can take advantage of the _parent property that we assigned to reference the movie clip containing the LoadVars object.

If you did everything above and it worked, it's all well and good, but if you misspell your variable, you're hosed. If you put a space around the equals sign in your text file, you're hosed. If you forget any of the dozen things that you have to do or not do to make this work, you're hosed. You would think that there would be an easier way to simply load a block of text into a text field. And there is.

The method above is only useful if you are loading multiple named variables as in:

myText=The quick brown fox&myText2=jumps over the lazy dog&myNumber=235&myBoolean=true;

If you just want to load a block of text, any kind of text file (e.g. TXT, HTML, XML, etc.) into a text field and display it, the following method is much easier.

Create a new text file called myText2.txt in whatever directory you are working out of. Type some text into the text file. It can be anything, and don't worry about using the myText= variable at the beginning. We just need plain text without any variables.

In your same Flash movie, replace the code on the first frame with the code below:

var lv = new LoadVars();
lv._parent = this;
lv.onData = function(inString){
   this._parent.myField_txt.text = inString;
}
lv.load("myText2.txt");

This code looks very similar to the previous code. Notice that we are not using the lv.onLoad event, but we are using the lv.onData event. The onData event occurs prior to onLoad. If is telling you that it has completed loading the data (in this case your text file) but it hasn't parsed it yet. The event passes a string (we called inString) that is your complete text file. Since it's giving us the text file, we don't need the variable name at the beginning of the text file. We have the whole thing. All we need to do is assign the inString to the text field we have created on the stage.

Because the onData event provides us with the raw text, we can use this technique to load more complicated data tables. In my next article, I'll show how we can use the onData method to create a multidimensional array, which will represent a data table, from data that we'll load in externally.

Need Professional Help For Your ActionScript Project?
ActionScript.com Consulting Services provide top quality professional ActionScript consulting to businesses around the globe. If you have a professional project in need to world-class talent, tell us about your project by requesting a quote today.

Reader Comments

  1. Satori  Replied:
    ( 7/13/2004 At 8:23 PM)

    I ran a little long in my article, but I wanted to explain what I meant by managing the loading of images and SWF files with the LoadVars object. In Flash MX, when you load an external image or SWF, you have no way of knowing when the image has loaded completely. The onLoad event of a MovieClip doesn’t work correctly. A simple and elegant way around this is to use the LoadVars object to load an image. Such as:

  2. asdf  Replied:
    ( 7/14/2004 At 12:13 AM)

    This sounds interesting, and I'd like to be able to utilize this technique. However,I'm not sure i correctly understand it. If the goal is to know when the image has been loaded, there are a couple problems with the implementation as stated here ...

  3. nuno mira  Replied:
    ( 7/14/2004 At 12:21 AM)

    I wasn't aware of that method to load images and movies, but it would have been useful...

  4. Alexei Startsev  Replied:
    ( 7/14/2004 At 3:22 AM)

    Thank you for your article!

  5. Bob  Replied:
    ( 7/16/2004 At 3:02 AM)

    Very helpfull article.

  6. Satori  Replied:
    ( 7/16/2004 At 4:38 PM)

    You're right, I meant "LoadMovie" not just "Load" in my comment. Checking for a change in width/height, only works if you are loading a movie once. If you are making a slide show of clips that are the same size, that doesn't work.

  7. Satori  Replied:
    ( 7/19/2004 At 11:15 PM)

    I'm not sure that I understand what you are trying to do. If you load a movie into another movie clip, it's variables will load with it. You should be able to place it on the stage anywhere you like. If you can be more specific or send me a FLA file showing my what you are trying to do, I'll try to help.

  8. John Dwight  Replied:
    ( 7/21/2004 At 7:33 PM)

    I use LoadVars to load my latest content SWFs into my index page's blank base SWF. The base SWF merely sets the frame rate, and loads the real SWF via LoadVars and a text file containing the new SWF's URL.

  9. Sean  Replied:
    ( 7/25/2004 At 11:25 PM)

    Similar to Kamal's question but more specifically:

  10. Satori  Replied:
    ( 7/26/2004 At 12:15 AM)

    I’m not sure if I understand Kamal’s question, but I’ll try to answer both questions about loading data and content at the same time.

  11. VALERIO  Replied:
    ( 8/1/2004 At 9:41 PM)

    VALERIO HUAMANI

  12. Nelis  Replied:
    ( 8/23/2004 At 2:50 PM)

    I am trying to build a chatroom in flash using PHP and maybe MySQL for the back-end... Anybody have any idea about checking for new data from database or a text file?

  13. Karthikeyan  Replied:
    ( 5/8/2005 At 6:27 PM)

    Sir,
    I need to grab a dynamic image in flash from a URL "http://xxx/yyyy/zzzz.exe"( Server ) at particular position.please send the code to my mentioned mailID.Or Suggest me it's urgent.
    ThankS
    Karthik

  14. Aaron Becker  Replied:
    ( 6/17/2005 At 11:17 AM)

    I spent more than a day trying to find appropriate code for such a simple action. Thank you for all your help! I have several other questions that you might be able to help me with:
    -Do you know how to load images into a dynamic text field?
    -Do you know how to make active links within the dynamic text field?
    -Do you know how to create a built-in Quicktime in a Flash doc?
    Thanks again for everything,
    Aaron

  15. Gavin Scott  Replied:
    ( 8/12/2005 At 7:57 PM)

    I am trying to "animate" a dynamic text field. But I loose visibility when I either skew the Movie Clip that holds it, or make the movie clip move. Do you have any suggestions?

  16. Sachin Srivastava  Replied:
    ( 8/13/2005 At 2:51 PM)

    Dear Sir
    I have made one presentation in flash in which I have desined movie where I have taken 4 buttons that I want to call some differnt scene, but it doesnt work. It doesn't go to the other scene. I tried the same thing when I created a scene where I have designed 2 buttons to call different scenes but now it works. Please let me know if I can send you my movie that I'm working on.
    Thnx & rgds
    Sachin Srivastava

  17. Greg  Replied:
    ( 8/29/2005 At 11:32 PM)

    Hi, Satori
    Is there a way to pass the name of a file to my movie, right now I have it hard coded with the name, how do I pass it name of a file instead
    var quizItems=new Array();
    var myData=new XML();
    myData.ignoreWhite=true;
    myData.onLoad=onQuizData;
    myData.load("http://www.faithavenue.com/quiz.xml");
    stop();

  18. Satori Canton  Replied:
    ( 8/30/2005 At 1:52 AM)

    Hi Greg,
    There are a variety of ways to dynamically pass the name of the file into a flashMovie. The easiest (for me at least) is just to add is as a perameter in the object embed tag (where you embed the swf on the page). Where you declare the swf such as "myMovie.swf" you would change to "myMovie.swf?movieToLoad=myOtherMove.swf"
    When the movie starts, you'll have a populated variable called movieToLoad on the _root timeline. You can then loadMovie(movieToLoad) and "myOtherMovie.swf" will load. Remember there are two declarations of the swf in the object and embed tags (so you need to make this change in both).
    Alternatively you could use the variables and flashvars method described here:

  19. kavitha  Replied:
    ( 10/12/2005 At 10:04 PM)

    I need to grap files (image as well as text ) for photogallery from server as well as from own computer (any destination) i need it urgently please send me code or similar example to my email address sun_kavi17@rediffmail.com

  20. mahesh  Replied:
    ( 10/24/2005 At 5:26 PM)

    how to dynamically change swf banner
    i have three files here.
    i want to randomlly change this file
    so, can u tell me how to do this
    which script i use for this work
    this is urgent
    pls, reply

  21. Manuel  Replied:
    ( 11/7/2005 At 6:38 PM)

    you made my day, thank for the idea with the onData event!
    greetings from germany

  22. Govind  Replied:
    ( 11/8/2005 At 3:06 PM)

    Hi,
    How to send/Recive the Flash textfield values in to/from PHP?.
    Below i have given given My coding. But it doesn't work.please tell me where i am wrong?
    lv = new LoadVars();
    lv.realname = realname.text;
    lv.onLoad = function() {
    var userv=lv.userval
    trace(userval);
    }
    }
    lv.sendandLoad("http://localhost/Myflash/userval.php", lv, "POST");

  23. Greg  Replied:
    ( 11/9/2005 At 1:22 AM)

    try putting quotes around your file name.
    lv.realname = "realname.txt";

  24. Govind  Replied:
    ( 11/9/2005 At 9:42 AM)

    Hi,
    Thanks for your reply. But it again shows error.Actually what I need is, in my flash file i have two Text Fields.
    One is for giving input (username) and another one is for show a result.

    When I press a button this input value should go to PHP file and check this name is exist or not. If exists “username already exists” message should show in the showmessage field, otherwise it shows message “not exist”.
    Below I have given my coding,
    On (press)
    {
    lv = new LoadVars();
    lv.username = _root.username.text; // assign input value to Loadvariable
    lv.onLoad = function() {
    _root.showmessage.text=lv.showmessage; //return output to showmessage field
    }
    lv.sendandLoad("http://localhost/Myflash/userval.php", lv, "POST");
    }
    I have just written simple PHP coding
    $passIn = "" ;
    $passIn .= "&showmessage=" . “Use exists” ;
    echo $passIn;
    ?>
    Please tell me where I am wrong?.

  25. shirley  Replied:
    ( 11/10/2005 At 10:53 PM)

    hi Sartori
    what about to pass some vars from an asp.file to an swf.movie?
    Say I want to send my swf.movie to frame 1 or frame 2 by cliccking onto different text-links on my asp.page?
    Is this a quite straightfoward process??
    (So far I was only able to achieve this by using a quite complicate system of redirect files)
    Thanks Shirley

  26. Satori Canton  Replied:
    ( 11/11/2005 At 12:24 AM)

    Hi Shirley,
    If you wanted to change the state of a Flash movie from external links (like going from frame 1 to frame 2 by clicking on a text link in a web page), you would use JavaScript to call a function inside of your Flash movie.
    If you're using Flash MX 2004, you'd be best off to use the Flash JavaScript Integration Kit - http://osflash.org/flashjs. If you're using Flash 8, you can use the new ExternalInterface object. You will find it documented in the Flash help files. A quick summary of it can be found at http://blog.deconcept.com/2005/08/16/external-interface/.

  27. shirley  Replied:
    ( 11/11/2005 At 9:38 PM)

    thanks Sartori
    I found on this issue another very useful tutorial at
    http://www.informit.com/guides/content.asp?g=flash&seqNum=340&rl=1
    shirley

  28. robin  Replied:
    ( 11/11/2005 At 11:56 PM)

    funny -- using the faimous sentence that contains all alphabet letters: "The quick brown fox jumps over the lazy dog."

  29. shirley  Replied:
    ( 11/16/2005 At 4:17 AM)

    robin be more specific!
    who is the fox
    who the lazy dog
    and who is
    fa i mous!!!
    anyway after having played around with both the integration kit and the new ExternalInterface Class I am still a bit stock. Quite a lot of limitation there. Still not so straigtfoward task to call and controll flash movies from outside; especially if your flash movie sits outside the html file hosting the javascript.
    Anyway ... we will get there
    we ll see
    Shirley

  30. David  Replied:
    ( 11/21/2005 At 3:22 AM)

    Hello, I have a problem, both LoadVars and XML on my webpage's flash always return false when they try to load data from my webpage. I can't seem to get it to load anything from within the webpage, but it works outside a webpage in Flash Player. Any help?

  31. Satori Canton  Replied:
    ( 11/21/2005 At 4:17 AM)

    David,
    It sounds like you're having a cross-domain security issue. Flash can load data across domains when running on your desktop, but when it's in a browser, the security sandbox is much tighter. Here is some info:
    http://www.google.com/search?hl=en&lr=&safe=off&q=flash+cross+domain+policy&btnG=Search
    If you don't have control over the remote domain, you'll need to use something to proxy the data to you (like Flash Remoting, ASP, PHP, ColdFusion, etc.)

  32. David  Replied:
    ( 11/21/2005 At 4:41 AM)

    The link didn't help much. I still only can see the loaded content inside Flash only (using Test Movie and Projector). I have control over my webserver, I am using PHP to create the XML and send it. But since that works in a Flash App, that doesn't seem like the problem. It only fails when loaded in Flash Player as a SWF or loaded as published. Im at such a loss here.

  33. Satori Canton  Replied:
    ( 11/21/2005 At 6:53 AM)

    David,
    It sure sounds like a sandbox issue. If you want, contact me directly (send me your files) and I'll have a look at them.
    satori@actionscript.com

  34. David  Replied:
    ( 11/21/2005 At 8:59 AM)

    I tried a few more different ways for linking the files and I got them, you were right that there was a cross-domain error. Thanks for the help.

  35. Lakil ESSADY  Replied:
    ( 11/25/2005 At 6:22 PM)

    hi,
    I am trying to load imagenes of the directory and it works to me with this Array:
    var img_array=["mini_0", "mini_1", "mini_2", "mini_3", "mini_4", "mini_5", "mini_6", "mini_7", "mini_8", "mini_9", "mini_10"];
    but I want to know if I can put this Array in txt external and load it of this form:
    vars.txt==
    &img_array=mini_0", "mini_1", "mini_2", "mini_3", "mini_4", "mini_5", "mini_6", "mini_7", "mini_8", "mini_9", "mini_10"
    ActionScript:
    loadVariables("vars.txt", _root);
    thanks!

  36. Mark L  Replied:
    ( 11/28/2005 At 9:37 AM)

    I'm not sure if this is a sandbox security or what but I can't seem to figure out why when I try to load a file (LoadVars or XML) from localhost it returns an: error loading URL. But if I paste that url in the address bar of safari or firefox it works fine. I've tried changing the settings from, Access local files only to Access network only and still same problem. Wasn't sure if this was a Mac (10.4.3) and Flash 8 issue or what. Any suggestions?

  37. Mark L  Replied:
    ( 11/28/2005 At 7:58 PM)

    Found the problem, and if you're on a Mac and run any type of firewall config tools just to make sure it's not blocking Flash making calls to http...

  38. Govind  Replied:
    ( 11/30/2005 At 12:43 PM)

    Hi,
    I have done Flash panning successfully. For this i have exported movieclip on run time. Now all the images are rotating. Here my question is When i click any image I want to stop the the rotation.
    Please tell me the solution..
    Thanks!

  39. Govind  Replied:
    ( 12/1/2005 At 9:59 AM)

    Hi,
    I have done Flash panning successfully.I have using the same code what they given in below link
    http://www.kirupa.com/developer/actionscript/camera_panning.htm
    under "Merry-go-round of Spinning Images"
    It's running successfully. It coutinously rotating. But i want to stop the rotation when i click the Image.
    i have tired so many ways to stop the rotation. But i couldn't do successfuly.
    Please tell me your ideas.
    Thanks!

  40. alex  Replied:
    ( 12/5/2005 At 11:33 PM)

    I am trying to use this feature in my scrolling text box, and I can't seem to get it to work. It just doesn't read the code correctly; when I export it I get the "_level0.containerMC.text1" message, which I take as meaning the script is not being read corectly. Forgive me if it is something really obvious, I am 14 and just starting out.
    Thanks, Alex

  41. Akhila  Replied:
    ( 12/7/2005 At 8:36 AM)

    Dear Mr. Satori,
    I have problems in the simple task of loading movie in Flash My intention is to create a picture gallery. I am not able to see the pictures on stage whne the program is tested
    Can u help me plese? I am working with Max 2004
    this.pathToPics = "bollywood/";
    this.pArray = ["imag0.jpg", "imag1.jpg", "imag2.jpg", "imag3.jpg", "imag4.jpg", "imag5.jpg", "imag6.jpg", "imag7.jpg", "imag8.jpg", "imag9.jpg"];
    this.fadeSpeed = 20;
    this.pIndex = 0;
    // MovieClip methods ----------------------------------
    // d=direction; should 1 or -1 but can be any number
    //loads an image automatically when you run animation
    loadMovie(this.pathToPics+this.pArray[0], _root.photo);
    MovieClip.prototype.changePhoto = function(d) {
    // make sure pIndex falls within pArray.length
    this.pIndex = (this.pIndex+d)%this.pArray.length;
    if (this.pIndex<0) {
    this.pIndex += this.pArray.length;
    }
    this.onEnterFrame = fadeOut;
    };
    MovieClip.prototype.fadeOut = function() {
    if (this.photo._alpha>this.fadeSpeed) {
    this.photo._alpha -= this.fadeSpeed;
    } else {
    this.loadPhoto();
    }
    };
    MovieClip.prototype.loadPhoto = function() {
    //specify the movieclip to load images into
    var p = _root.photo;
    //------------------------------------------
    p._alpha = 0;
    p.loadMovie(this.pathToPics+this.pArray[this.pIndex]);
    this.onEnterFrame = loadMeter;
    };
    MovieClip.prototype.loadMeter = function() {
    var i, l, t;
    l = this.photo.getBytesLoaded();
    t = this.photo.getBytesTotal();
    if (t>0 && t == l) {
    this.onEnterFrame = fadeIn;
    } else {
    trace(l/t);
    }
    };
    MovieClip.prototype.fadeIn = function() {
    if (this.photo._alpha<100-this.fadeSpeed) {
    his.photo._alpha += this.fadeSpeed;
    }
    else {
    this.photo._alpha = 100;
    this.onEnterFrame = null;
    }
    };
    // Actions -----------------------------------------
    // these aren't necessary, just an example implementation
    this.onKeyDown = function() {
    if (Key.getCode() == Key.LEFT) {
    this.changePhoto(-1);
    } else if (Key.getCode() == Key.RIGHT) {
    this.changePhoto(1);
    }
    };
    Key.addListener(this);

  42. Moss  Replied:
    ( 12/22/2005 At 8:58 PM)

    Hi,
    I have created most of my website, but i am having problems when loading a game (.swf file) onto my webpage (also written in flash). How would you load an the game (.swf source from external website) into my flash document and position/size it?

  43. Satori Canton  Replied:
    ( 12/23/2005 At 2:54 AM)

    Moss,
    You're probably not going to be able to load SWFs from outside of your domain unless you can set up a cross-domain security policy file on the remote server.

  44. kamary cyfrowe  Replied:
    ( 12/29/2005 At 8:56 PM)

    Very good site. You are doing great job. Please Keep it up….!

  45. jeff dereszynski  Replied:
    ( 1/5/2006 At 6:10 PM)

    Satori, awesome article.. but my problem is a little different. I have 1.swf which loads inside main.swf and in 1.swf I have a dynamic text file which pulls info from a .txt file, how can i make a link in the text file link to 2.swf and have it load in main.swf, right now it just opens in a new window jeff

  46. Satori Canton  Replied:
    ( 1/5/2006 At 8:13 PM)

    Hi Jeff, If you search Flash Help for asfunction, it will show you how to call a function from an HTML text link. Basically, you structure your anchor tag as <a href="asfunction:_root.myMethod">my link</a> to execute a root level function called myMethod. **caveat: _root level functions are something you should steer away from, but for simple illustrative purposes, it's the easiest way to demonstrate the idea.

  47. Maureen Feeley  Replied:
    ( 1/5/2006 At 8:53 PM)

    Mr. Canton,
    I have a flash movie that dynamically creates a drop down menu from an XML file. The buttons are very large as the menu will be used in a touch-screen application. It all works very well as long as the button is identified with text. I have now been instructed that I will need to substitute the text for images and I can't seem to get the images into the movieclip. You said it is possible to use LoadVars() to place images into textbox via XML. Can you provide an example?? If you wish I can send my .fla, .xml files for you to take a look at.
    Best regards, and many thanks in advance.
    -Maureen

  48. Satori Canton  Replied:
    ( 1/5/2006 At 9:11 PM)

    Hi Maureen,

    You could load an image into a text field if the field is HTML enabled. If so, you can use an image tag in the HTMLText to load an image or SWF. For example:

    this.createTextField("my_txt", this.getNextHighestDepth(), 10, 10, 160, 22);
    my_txt.html = true;
    my_txt.htmlText = "<img src='myImage.jpg' />";

  49. Maureen Feeley  Replied:
    ( 1/5/2006 At 11:35 PM)

    Mr. Canton,
    Thanks for your reply to my question.
    I am working in Flash MX and the textfield does not have an option I can set to enable html. Is it still possible if I set it to html in code as described in your reply? Or do I need to purchase Flash 2004 to do this?
    Thanks again for the timely reply.
    Best regards,
    -Maureen

  50. Satori Canton  Replied:
    ( 1/6/2006 At 2:31 AM)

    Hi Maureen,

    If I remember correctly, <img> tag support was implemented in Flash Player 7, so you won't be able to use this in Flash MX. The Flash MX text field can display HTML, but not this particular tag. You'll definitely be limited in your options in Flash MX.

  51. Maureen Feeley  Replied:
    ( 1/6/2006 At 1:03 PM)

    Many thanks for your reply.
    Best,
    -Maureen

  52. Siddhartha Nihalani  Replied:
    ( 12/20/2006 At 11:15 AM)

    i m loading external text into a dynamic text field. i need to resize the text box depending on where the user clicks.... the content, the position as well as the size of the text box change. how do i do this??? the text box is inside a movie clip. i m not able to access the text box property using

    mymc.mytext._height=mymc.mytext._height + 20;

    though i m able to change position by changing the movie clip x,y co ordinates....
    but, if i change the movie clip height, the text shrinks or stretches... which i dont want....
    can u please help....

  53. narender reddy  Replied:
    ( 2/10/2007 At 6:06 AM)

    hi
    i have a problem, i want to load a .swf file on the context area when ever i select a particular option from combobox. for eg: when i select "car" option that i have to display the car movie file, and when i select aeroplane then car movie has to clear and at the same place aeroplane has to display and viceversa..

    can anyone help me please.....

    thank you,

  54. Mike Hakak  Replied:
    ( 3/22/2007 At 5:11 PM)

    Hello,

    My mind is rattled with this problem:

    there are two servers, one with a bunch of ads (jpgs, swf) on it - I call this server "A server", and the other has the application - I call this server "P Server".

    I am trying to load the ads onto the application, however I am unable to do so for the swf files. It works fine for jpgs, but fails on swf files.

    I thought it might be a cross domain issue, but there is a policy file on "A server". I try to load a swf ad from "A server" into level0 of the flash file on "P server" and that works, so I think the crossdomain.xml is working. Yet, when I try to load the file into a movieclip the app never completes.

    here is basically the run down:

    function adLoad() {
    this.theAd = _level0.createEmptyMovieClip("ad"+this.myNum, this.myDepth);
    var loadAdInfo = new LoadVars();
    var thisobj = this;
    loadAdInfo.onLoad = function(success) {
    if (success) {
    thisobj.url = this.url;
    //I even tried to hard code the location of the file
    this.theAd.loadMovie("AServer/laxit/test.swf");
    } else {
    thisobj.defaultAd = true;
    }
    }//LoadAdInfo;

    System.security.allowDomain("AServer");
    loadAdInfo.load(this.theAdURL);

    }//adLoad


    A Little explaination:
    The loadVars tries to load a php call(this.theAdURL)
    the php call returns the value "url=test.swf";
    I don't really use this yet, but it will become neccessary later for targeting types of ads. But loadInfo.url will be test.swf just for kicks on why I am trying to load the swf from within a loadvars onLoad function.....

    can you suggest some areas that I may have overlooked that may be causing this loading issue??

    Kind regards,
    Mike Hakak.

  55. Marcus Measley  Replied:
    ( 3/26/2007 At 11:00 AM)

    Hey there.. was so glad to find this article.. as it mentions
    "The method above is only useful if you are loading multiple named variables as in:

    myText=The quick brown fox&myText2=jumps over the lazy dog&myNumber=235&myBoolean=true;"

    ..which is exactly what i want to do. However.. I am having a hard time doing it.
    I have one text field, with the instance name "DETIALS" and I am loading from an external file... which works great... if I hard code the variable that is being displayed. But, what I need to do is change the variable displayed based on userinteraction... like this..
    -user chooses photo one...and text displayed as:
    Photo One Details: blah blah blah
    -user chooses photo two...and text displayed as:
    Photo Two Details: yeah yeah yeah yeah

    I have the text file set up with the variables like this example:
    photo01=Photo One Details: blah blah blah
    &photo02=Photo Two Details: yeah yeah yeah yeah

    ...make sense? I just cant seem to tell the text box to change the variable expected.

    any help would be great!
    Take care

  56. ernie bryant  Replied:
    ( 4/2/2007 At 3:56 PM)

    I've been working on some ASP.net sites, particularlty some MOSS 2007 sites, and i was wondering if there was a way to import the dynamic content created by MOSS into a flash menu. I've embedded flash objects in the sites before, but i've never been able to get dynamic content from MOSS to flash.

  57. ola lekan  Replied:
    ( 5/25/2007 At 7:44 PM)

    i want you to be sending actionscript and site of the week to my email.
    Thanks

  58. ola lekan  Replied:
    ( 5/25/2007 At 8:03 PM)

    i want you to be sending actionscript and site of the week to my email.
    Thanks

Login to post your comments. If you do not have an account with us please Register.
Copyright 2005 by ActionScript, Inc.   |  Privacy Statement  |  Terms Of Use  |  ActionScript Client Extranet