Professional Web Applications Themes

noob question: loading variables from an asp file - Macromedia Flash Data Integration

hi, im totally new to flash 8 and am currently trying to get flash to draw some information via a variable on an asp page already created. when i type the following at the bottom of the page where all the queries etc... <% Response.Write("myvariable=" & StationName) %> this is what i get myvariable=Brackley MOT & Service Centre So from that I obviously want to have the 'Brackley MOT & Service centre' to be displayed on my flash movie. I have a basic flash movie setup which works fine. a text box called myText_txt This is the actionscript used in ...

  1. #1

    Default noob question: loading variables from an asp file

    hi,

    im totally new to flash 8 and am currently trying to get flash to draw some
    information via a variable on an asp page already created.

    when i type the following at the bottom of the page where all the queries
    etc...
    <%
    Response.Write("myvariable=" & StationName)
    %>


    this is what i get

    myvariable=Brackley MOT & Service Centre

    So from that I obviously want to have the 'Brackley MOT & Service centre' to
    be displayed on my flash movie.

    I have a basic flash movie setup which works fine. a text box called myText_txt
    This is the actionscript used in frame one

    myData = new loadvars();
    myData.onLoad = function(){
    myText_txt.html = true
    myText_txt.htmlText this.myvariable;
    );
    myData.load("default.asp");

    when i test the flash project i get 'undefined' in the text box

    if anyone has any sugestion i'd love to hear them

    cheers

    andy


    andyburgess Guest

  2. #2

    Default Re: noob question: loading variables from an asp file

    You may want to check that the ampersand in your text isn't causing a problem
    because Flash uses the "&" as a delimiter between variable name and value sets.
    I'm not sure how to fix it if it's the problem, but if it is...at least you'll
    be pointing in the right direction.

    angelseyeinc Guest

  3. #3

    Default Re: noob question: loading variables from an asp file

    myText_txt.htmlText this.myvariable;
    should be
    myText_txt.htmlText = this.myvariable;


    as well test for success

    myData.onLoad = function(success){
    trace("success = " + success)

    as well test the results
    myData.onLoad = function(success){
    trace("success = " + success)

    trace("results = " + this.toString())

    as well get the capitalization of AS class names within the standards.

    myData = new LoadVars();

    Use the excellent templates examples in help to help write code:
    [url]http://livedocs.macromedia.com/flash/8/main/00002329.html[/url]
    var my_lv:LoadVars = new LoadVars();
    my_lv.onLoad = function(success:Boolean) {
    if (success) {
    trace(this.toString());
    } else {
    trace("Error loading/parsing LoadVars.");
    }
    };
    my_lv.load("default.asp");


    Be sure your ASP is not returning whitespace before and after the ASP tags
    and no HTML.

    --
    Lon Hosford
    [url]www.lonhosford.com[/url]
    May many happy bits flow your way!
    "andyburgess" <webforumsusermacromedia.com> wrote in message
    news:e1j9pm$rg2$1forums.macromedia.com...
    hi,

    im totally new to flash 8 and am currently trying to get flash to draw some
    information via a variable on an asp page already created.

    when i type the following at the bottom of the page where all the queries
    etc...
    <%
    Response.Write("myvariable=" & StationName)
    %>


    this is what i get

    myvariable=Brackley MOT & Service Centre

    So from that I obviously want to have the 'Brackley MOT & Service centre'
    to
    be displayed on my flash movie.

    I have a basic flash movie setup which works fine. a text box called
    myText_txt
    This is the actionscript used in frame one

    myData = new loadvars();
    myData.onLoad = function(){
    myText_txt.html = true
    myText_txt.htmlText this.myvariable;
    );
    myData.load("default.asp");

    when i test the flash project i get 'undefined' in the text box

    if anyone has any sugestion i'd love to hear them

    cheers

    andy


    Motion Maker Guest

Similar Threads

  1. loading variables from exe file
    By Kunth in forum Macromedia Flash Data Integration
    Replies: 0
    Last Post: February 25th, 12:59 PM
  2. Loading text into variables from .txt file
    By George in forum Macromedia Flash Actionscript
    Replies: 1
    Last Post: March 2nd, 02:29 AM
  3. loading variables from swf to swf > question was answered
    By Laiverd.COM in forum Macromedia Flash Actionscript
    Replies: 0
    Last Post: February 25th, 05:06 PM
  4. loading variables from a text file...
    By Zerox Millienium webforumsuser@macromedia.com in forum Macromedia Flash Actionscript
    Replies: 9
    Last Post: February 12th, 03:22 PM
  5. Load variables from text then loading image file with the filename...
    By Flashys webforumsuser@macromedia.com in forum Macromedia Flash Actionscript
    Replies: 9
    Last Post: January 27th, 02:34 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139