LoadVars() not working

My flash file loads variables from external text files. When
I run the swf file as a stand alone player it works great. However,
when I publish it with an html file and try to open it with the
html file (from my local harddrive with all files in the same
directory), the swf is unable to load the variables from the
external text files.
Here is a segment of my code:
myConfig = new LoadVars();
myConfig.onLoad = function(success)
if (success)
///// Get Course Name variable from ini file /////
myCourseName = this.courseName;
///// Get copyright variable from ini file /////
myCopyright = this.copyright;
///// Get Lesson Title variables from ini file/////
myLessons = new Array();
myLessons = this.lessons.split(";");
///// Get page variables from ini file /////
totalContent = new Array();
totalContent = this.pages.split(";");
///// Get title swf variable from ini file /////
myTitleScreen = this.titleScreen;
///// Get disclaimer info from ini file /////
myDisclaimer = this.disclaimer;
///// Get overview info from ini file /////
myOverview = this.overview;
myConfig.load(path+"/config.ini");

>>However, when I run the .swf on a different website
lets say
www.anotherexample.com/example.swf it doesn't work.. it
doesn't find the
www.example.com/main/sometext.txt
You'd need a cross domain policy file on example.com
permitting access from
anotherexample.com
Dave -
www.offroadfire.com
Head Developer
http://www.blurredistinction.com
Adobe Community Expert
http://www.adobe.com/communities/experts/

Similar Messages

  • LoadVars Not Working in 9 but fine 8

    I have a SWF that has a form and LoadVars.send() to send the
    form info to the server. It works in 8 but does not work in 9.0r16.
    The SWF is on the image server domain for several sites and
    the SJP file that it sends to is on a different domain. I have a
    crossdomain.xml in the file that the domain that recieves the forma
    data.
    Should the crossdomain.xml file be on the image server
    instead?
    If it is in the DOCROOT of that server do I still have t o
    load it with System.security.loadPolicyFile?
    Does that override what I put in
    System.security.allowDomain("")?
    Is my problem even cross domain related? since that should be
    a problem in 8 as well and in 8 it works just fine.

    First thing - all webpages should have a doctype.  Yours doesn't.  Add one that is consistent with the code you have already used on the page (looks like HTML 4.01 Transitional).  This will prevent browsers from rendering the page in quirks mode (a bad thing).
    Second - don't use commas or spaces in file/pathnames:
    background-image: url(images/Touring%20Sport%20-%20Sports%20Tours,%20Schools%20Tours%20and%20Corporate%20To urs.jpg);
    Third - when you specify a font, do it as a family, not a single font.  In your case, a computer that doesn't have Helvetica will default to Times New Roman, which is probably not what you intended:
    .Contact_Header {
    font-family: Helvetica;
    Fourth - justified text is not very satisfactory on the web, and is harder to read than non-justified text:
    .Main_Text {
    font-family: Helvetica;
    color: #666;
    text-align: justify;
    Finally, in addition to these things, wonky code is the cause of your problems.  Here is the validation report for this page - there are many things there that need to be fixed -
    http://validator.w3.org/check?uri=http%3A%2F%2Fwww.gecodesigns.com%2Ftest%2Ftouringsport%2 Ffootball-tours.html&charset=%28detect+automatically%29&doctype=Inline&group=0&user-agent= W3C_Validator%2F1.2
    Also, read this about the impact of using col- and rowspans the way you have in your layout tables -
    http://www.apptools.com/rants/spans.php

  • Loadvars not working on external domain

    Hi,
    I have Domain1 that is hosting my flash .swf file, and Domain2 that is linking to that .swf file. In the flash file I have a;
    loadVars.send("another-domain.com", "_self", "POST");
    command. When the flash file is placed anywhere on a page on Domain1, this works perfectly fine. But when placed on Domain2 (and other domains), this loadVars statement does not work and does not forward to another-domain.com.
    But when I change "_self" to "_blank" - the statement works fine on Domain2.
    Why doesn't "_self" work on external domains?
    Thanks

    This is my cross-domain.xml
    <?xml version="1.0"?>
    <!DOCTYPE cross-domain-policy SYSTEM "http://www.macromedia.com/xml/dtds/cross-domain-policy.dtd">
    <cross-domain-policy>
    <allow-access-from domain="*" />
    </cross-domain-policy>
    I've allowed access from every domain. Have I done something wrong here?

  • LoadVars not working with IE browser(on Server)

    Hello,
    I have loaded html file in flash for getting content from html file, it's work great on local machine. But when we have uploaded it to LMS(Blackboard) flash cant load html file. This happens only in Internet Explorer other brousers like Chrome and firefox works fine.
    Please provide solution
    myData = new LoadVars();
    myData.onLoad = function() {
    myData.load("myText1.html");
    Thanks in advance

    Thanks for reply, But Using flash in https webpage, which uses Loadvars.
    Works fine in Firefox, but doesnt display the loadvars data in IE 6.
    What are the main possible reasons why it doesnt work in IE? (uploaded on
    LMS)
    its work on Local
    Here is the Code:
    import flash.external.*
    import flash.LoadVars.*
    // Get raw_data from test.html
    var temp:LoadVars = new LoadVars();
    temp.onData = function(raw_data:String) {
    trace(raw_data);
    temp.load("temp.html");
    stop();
    HTML: test.html
    My First Heading
    My first paragraph.
    </html

  • LoadVars not working on Nokia N95 (US)

    Hi there,
    Each time my FL 2.0 standalone app tries to connect to a
    remote server, the application quits after I selest the WLAN
    connection to use for the connection from the system dialog. Below
    is the code in question. Running on the Device Central emulator
    works fine. Anyone else run into this issue?
    (Note, I've also tried this with Nokia's tutorial app:
    http://www.bysamir.fr/flashlite/nokiadev/Latest_Nokia_Devices.zip
    - same problem)
    Sequence:
    1. Launch SWF as standalone app
    2. Enter text in textField within app
    3. Call loadVars function
    4. System dialog appears asking which WLAN connection to use
    5. Select Access Point (AP) in system dialog
    6. Application quits! ??
    NOTE: I can connect to the AP normally using the web browser
    on the phone, so I know the connection works.
    var myListener:Object = new Object();
    myListener.onKeyDown = function() {
    if (Key.getCode() == ExtendedKey.SOFT1) {
    // Handle left soft keypress event.
    sendText(inputField.text);
    } else if (Key.getCode() == ExtendedKey.SOFT2) {
    // Handle right soft keypress event.
    fscommand2("Quit");
    Key.addListener(myListener);
    function sendText(myText) {
    responseField.text = "sending msg";
    var rvars:LoadVars = new LoadVars();
    rvars.onLoad = function(success:Boolean) {
    if (success) {
    responseField.text=this.msg;
    } else {
    responseField.text = "Failed!";
    var svars:LoadVars = new LoadVars();
    svars.inputMsg = inputField.text;
    svars.sendAndLoad(myURL,rvars,"GET");
    Device: Nokia N95-3 (US Edition)

    Using Sony Ericsson k800i with itunes non-drm tracks and they are playing without any problems. Used itunes agent application to sync phone memory card with itunes smart playlist (filter for "purchased"). Great that I can now use purchased itunes tracks on my ipod and phone!
    Maybe the N95 only supports aac up to a certain bit rate? Or check the file format (m4a?).

  • LOADVARS not working ...NEED HELP!!!

    I am trying to create a phonebook with mx 2004 pro, asp, and
    sql (access for now) using IE 6 sp2
    if i use the following it loads the returning variables into
    the textbox -but I don't know how i am unable to create an array
    and send them to a datagrid:
    on (release) {
    loadVariablesNum("dbphone0.asp?Record=" add myrecord, 0);
    myrecord="";
    firstName="";
    lastName="";
    City="";
    errorMsg="Please wait";
    if i use the following i get nothing back:
    var submitListener:Object = new Object();
    submitListener.click = function(evt:Object) {
    var result_lv:LoadVars = new LoadVars();
    result_lv.onLoad = function(success:Boolean) {
    if (success) {
    firstName = result_lv.firstName;
    } else {
    firstName = "Error connecting to server.";
    var send_lv:LoadVars = new LoadVars();
    send_lv.myrecord = myrecord.text;
    send_lv.sendAndLoad("dbphone0.asp", result_lv, "POST");
    submit_button.addEventListener("click", submitListener);
    and if I use the following i get my results back in a new IE
    window:
    var submitListener:Object = new Object();
    submitListener.click = function(evt:Object) {
    var result_lv:LoadVars = new LoadVars();
    result_lv.onLoad = function(success:Boolean) {
    if (success) {
    firstName = result_lv.firstName;
    } else {
    firstName = "Error connecting to server.";
    var send_lv:LoadVars = new LoadVars();
    send_lv.myrecord = myrecord.text;
    send_lv.send("dbphone0.asp", "POST");
    submit_button.addEventListener("click", submitListener);
    I have played with it for hours trying to use this.firstName
    or firstName.text so on and so on the debugger doesn't seem to work
    (remote debugging with the activex plugin does nothing) the
    internal one doesn't hit the database to pull the info.
    PLEASE HELP!!!!

    You need to restore the iPod via iTunes. Try the following to get iTunes to see the iPod so you can restore the iPod
    iTunes: Restoring iOS software
    Try:                                               
    - iOS: Not responding or does not turn on           
    - Also try DFU mode after try recovery mode
    How to put iPod touch / iPhone into DFU mode « Karthik's scribblings
    - If not successful and you can't fully turn the iOS device fully off, let the battery fully drain. After charging for an least an hour try the above again.
    - Try another cable       
    - Try on another computer                                                       
    - If still not successful that usually indicates a hardware problem and an appointment at the Genius Bar of an Apple store is in order.
      Apple Retail Store - Genius Bar                              

  • Contact form not working :( Please Help...

    Hey guys,
    I am really in trouble with flash forms and need help please. Ive been trying to get a contact form working for a few weeks but have had no luck.
    Below is the code I am putting in to the flash form and php file.
    (this is the code I have put for the send Button)
    on (release) {
             if (name eq "" or subject eq "" or message eq "" or email eq "") {
                   stop();
             } else {
             loadVariablesNum("form.php", 0, "POST");
             gotoAndStop(2);
    (this is the code I have put for the clear Button)
    on (release) {
        name = "";
        subject="";
        message="";
        email="";
    (And this is the php file i created in dreamweaver and saved it as form.php)
    $to = "[email protected]";
       $msg = "$name\n\n";
       $msg .= "$message\n\n";
      mail($to, $subject, $msg, "Message From: Online client\nReply-To: $email\n");
    ?>
    I have uploaded the swf file and php file on the server but my form is still not working by sending the information to my email.
    This is the link where i got the code from http://www.flashvault.net/tutorial.asp?ID=103
    It would be really greatful if someone could help me please
    I look forward to your opinions and ideas.
    Thanks

    you should really check a tutorial using loadvars.
    and there's no hope for that php file.:
    try:
    $to = "youremailaddress @ yourserver.com"; // change this to your email address
      $email=$_POST["email"];
       $msg = $_POST["name"]."\n\n";
       $msg .= $_POST["message"]."\n\n";
      mail($to, $subject, $msg, "Message From: Online client\nReply-To: $email\n");
    ?>

  • Scrollbar positions not working

    i got a tree like structure in jsp as
    Root
    --- Node1
    ---- ChildNode1
    --- Node2
    ---- ChildNode1
    ---- ChildNode2
    --- Node3
    ---- ChildNode1
    --- ChildNode1.1
    --- ChildNode1.2
    ---- ChildNode2
    .......and so on
    this is a dynamic tree . on click on each node the page is refreshed and the below child nodes are retrieved form the database.
    its all are working fine but my bug is on chicking on the each node, the page goes to the top again and again i ve to scroll down to position of the node what i have to do to hold on the scroll bar position where it is for the previous page.
    ive used ScrollTo() but its moving and again it goes to the top automatically wat to do

    Thanks for the suggestion, but I already looked before and
    after page 6, nothing has changed. I've been trying to create a new
    scrollbar with the instructions from the help on the UIScrollBar
    component, but the arrows on the scroll bar don't show up.
    I have the text in the text box showing up and changing with
    each page. But the scroll bars are not working. Here is the AS I
    have on frame 1:
    NarrativeText_bottom = narrative_text[_root.CurrentPgNumber];
    this.createClassObject(mx.controls.UIScrollBar, "my_sb");
    my_sb.setScrollTarget(InstanceName_0);
    my_sb.setSize(16,InstanceName_0._height);
    my_sb.move(NarrativeText_bottom =
    narrative_text[_root.CurrentPgNumber];
    this.createClassObject(mx.controls.UIScrollBar, "my_sb");
    my_sb.setScrollTarget(InstanceName_0);
    my_sb.setSize(16,InstanceName_0._height);
    my_sb.move(InstanceName_0._x + InstanceName_0._width,
    InstanceName_0._y);
    // Load text to display and define onData handler.
    var my_lv:LoadVars = new LoadVars();
    my_lv.onData = function(src:String) {
    if (src != undefined) {
    InstanceName_0.text = src;
    } else {
    InstanceName_0.text = "Error loading text.";
    ._x + InstanceName_0._width, InstanceName_0._y);
    // Load text to display and define onData handler.
    var my_lv:LoadVars = new LoadVars();
    my_lv.onData = function(src:String) {
    if (src != undefined) {
    InstanceName_0.text = src;
    } else {
    InstanceName_0.text = "Error loading text.";
    When I drag the component to the side of the text box, the
    instance name for the text field (InstanceName_0) automatically
    populates the _targetInstanceName property of the component, like
    it's supposed to. So why are the arrows on the scroll bar not
    showing up?? PLEASE HELP! thanks.

  • Flash 9...Buttons not working

    I created an app to simply send a few variables to a php
    script from flash and it worked perfectly before I upgraded to
    flash player 9. Now the buttons do not work!
    here is a snippet of the button code:
    my_btn.onPress = function(){
    email = _root.my_ti.text;
    if( modId == undefined or modId == "" ){
    gotoAndStop(3);
    }else{
    //Send
    ret = new LoadVars();
    //ret.email = my_ti.text;
    ret.modId = modId;
    ret.btn_press = "vote";
    ret.send("
    http://www.2wtmag.com/model_vote_handler.php","_self",
    "POST");
    I am pretty sure that the code is solid, so I have to assume
    that flash 9 is buggy. Has anyone had a similar experience?
    You can view the page at
    www.2wtmag.com

    If your Flash 9 movie is using AS3, you have to use
    navigateToURL() instead of getURL().

  • SendAndLoad do not work

    Hi everyone... i've seen this question posted elsewhere over
    internet but never had an answer. Hope here someone can help me and
    not only me.
    I'm trying to develop a simple application using FlashPlayer
    7 on my pocketPC.
    I need to send and retrieve datas from a web server.
    Obviously i'm using LoadVars for such task and i'm using
    SendAndLoad method but, it seem not working on a GPRS connection.
    I've tried everything to make it to work but unsuccesfully
    I'm simply desperate!
    I've seen that LOAD method work but when i try the SEND one
    don't work. Seem like a connection error occured because the
    web-page is not reached and a SUCCESS=false return on my ONLOAD
    function.
    I've tried the same application using my office connection
    instead of a GPRS... i mean to connect my ppc via USB to my pc and
    configuring the ppc for working on a network... and everything work
    fine!
    I've also tried using the XML functions of flash 7 but the
    send operations still not working.
    Why sendAndLoad do not work with a GPRS connection?
    Please help me.
    Thanks.
    P.S. i need to use a POST operation because GET have a limit
    on the size of the datas -_-

    I'm sorry but your post doesn't make much sense in English. You may want to try posting again in your native language.
    Best of luck.

  • Why the server side behavior of LoadVars() not consistent?

    In my server side script for FMS app,there is such code:
    var lv = new LoadVars();
    var params = new LoadVars();
    lv.send("http://mysite.com/registerVideo.php", params, "POST");
    The expected behavior is that the request will be as if sent directly from the browser,thus SESSION information is not lost ,which is the exact behavior for my computer.
    But it's not the case for my boss --- session information is lost for him.
    Why the server side behavior of LoadVars() not consistent?
    What do I need to do to make sure session information is not lost @ server side ?

    Oops,why this feature has always worked like charm for me only??
    Below is the server side request caught from firebug:
    POST registerVideo.php
    http://mysite.net/registerVideo.php
    200 OK
    mysite.net
    115ms
    ParamsHeadersPostPutResponseCacheHTML
    Response Headersview source
    Server
    nginx/0.7.67
    Date
    Tue, 29 Mar 2011 14:45:31 GMT
    Content-Type
    text/html
    Transfer-Encoding
    chunked
    Connection
    keep-alive
    Vary
    Accept-Encoding
    X-Powered-By
    PHP/5.2.14
    Expires
    Thu, 19 Nov 1981 08:52:00 GMT
    Cache-Control
    no-store, no-cache, must-revalidate, post-check=0, pre-check=0
    Pragma
    no-cache
    Content-Encoding
    gzip
    Request Headersview source
    Host
    mysite.net
    User-Agent
    Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.13) Gecko/20100914 Firefox/3.5.13
    Accept
    text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
    Accept-Language
    en-us,en;q=0.5
    Accept-Encoding
    gzip,deflate
    Accept-Charset
    ISO-8859-1,utf-8;q=0.7,*;q=0.7
    Keep-Alive
    300
    Connection
    keep-alive
    Cookie
    pass=angel333; user=liying123; PHPSESSID=8m966mbd070tsdqqodnncesbj5
    Source
    Referer: http://mysite.net/flash/main.swf?sessionId=8m966mbd070tsdqqodnncesbj5 Content-type: application/x-www-form-urlencoded Content-length: 35 name=test&record=live&action=insert

  • As2 form not working within action scripts

    this script is working on online but when i put this code within my project action scripts, its not working,,,
    stop();
    System.useCodepage = true;
    send_btn.onRelease = function() {
        my_vars = new LoadVars();
        my_vars.sender = email_box.text;
        my_vars.subject = subject_box.text;
        my_vars.message = message_box.text;
        if (my_vars.sender != "" and my_vars.subject != "" and my_vars.message != "") {
            my_vars.sendAndLoad("mailer.php", my_vars, "POST");
            gotoAndStop(72);
        } else {
            error_clip.gotoAndPlay(72);
        my_vars.onLoad = function() {
            gotoAndStop(73);
    email_box.onSetFocus = subject_box.onSetFocus=message_box.onSetFocus=function () {
        if (error_clip._currentframe != 1) {
            error_clip.gotoAndPlay(6);

    Are you testing on a server?  If not, do you have PHP installed to support trying to call upon a PHP file?

  • I'M WITH STUPID! sendmail.cfm hack not working...

    Hi, I'm a lonely, stupid, ignorant person whom is not interested in code or building a sendmail page. I can however, build a frameset in DreamWeaver and up load its page's and content onto the net using filezilla and a webhosting client, I can even build my own btn bar with a get URL content mainframe code...arrrggghh. But then stupid comes back and say's, "use a 2004 mx flash tutorial from the 2004 Flash MX bible, and insert its SWF file from a Flash FLA  from chapter 30" and guess what...It doe's not work! ooohHa! And a little horn apears, as a saintly brow turn's into a not so saintly V shaped furrow. Please, can anyone help, stupid?
    I need to know how to alter the sendmail code, to send email's to [email protected] from the contact page on the http://www.pizzapal.co.uk website.
    function sendComments() {
    var sender:LoadVars = new LoadVars();
    var responder:LoadVars = new LoadVars();
    responder.onLoad = function(success){
      if (success) {
       _global.serverTime = this.timeDate;
       _root.gotoAndStop("output");
      } else {
       _root.gotoAndStop("error");
    sender.fromEmail = fromEmail_txt.text;
    sender.fromName = fromName_txt.text;
    sender.body = comments_txt.text;
    sender.sendAndLoad("http://[email protected] ", responder, "POST");
    _root.gotoAndStop("wait");
    this._lockroot = true;
    Right? Wrong?  Plus, what file do upload onto my server to accomapy the SWF sendmail.cfm page.
    Many thanks for reading and I hope it was entertaining because actors like me and Joey are important to.
    The sendmail_cfm.swf is attached.

    Please can anyone remove the report abuse icon because I cannot continue with this thread.
    Sabby76
    Thanks Ross
    I accidentally deleted a content folder from the frameset and that meant due to low practical skills in Dreamweaver, I went ahead a deleted the whole site instend of renaming a secondary copy. I then built the frameset up again this evening after going for a walk to cool down, it was one way geetting to know Dreamweaver a little better. The time gave also an oppotunity to think about the sendmail problem and thing's were clearing on the return home, so I sat down a dragged in some new file's from the tutorial C.D and started again, with a copy paste from your email. Thank's once again, it was your advise that truned my attention to the sendmail.cfm, which incidentally, I had over looked on the first attempt's to get the contact's page running. It still doe's not return mail though, so I thought might like to have a look at the script from the sendmail.cfm file... {
    I hope I carried out your advice correctly and notice also the server port, which I have changed from 23 to 21 and the the servers I.D also was scrubbed in favor to my hosting clients. I've sent then a question on this subject, regarding your question on weather or not their server run's cfm, I will inform of their answer and keep trying anyway.
    sabby76
    Date: Wed, 23 Sep 2009 12:48:52 -0600
    From: [email protected]
    To: [email protected]
    Subject: I'M WITH STUPID! sendmail.cfm hack not working...
    Your code should look like this:
    function sendComments() {
    var sender:LoadVars = new LoadVars();
    var responder:LoadVars = new LoadVars();
    var scriptURL:String = "http://www.pizzapal.co.uk/sendmail.cfm";
    responder.onLoad = function(success){
      if (success) {
       _global.serverTime = this.timeDate;
       _root.gotoAndStop("output");
      } else {
       _root.gotoAndStop("error");
    sender.fromEmail = fromEmail_txt.text;
    sender.fromName = fromName_txt.text;
    sender.body = comments_txt.text;
    sender.sendAndLoad(scriptURL, responder, "POST");
    _root.gotoAndStop("wait");
    this._lockroot = true;
    And then, open the sendmail.cfm page in Dreamweaver or another text editor, find the email address the script is sending to (I am assuming this is part of the tutorial in the book as well...) and change it to your mailto:[email protected]
    Upload the SWF, and the CFM and it should work.... assuming your web host server runs coldfusion scripting.
    >

  • Not work tablet UI on Prestigio 5080 PRO tablet

    I read that browser.ui.layout.tablet = "1" can fix this problem. But it not works. I can work only in pnone interface that is not good for my 8'' tablet.

    Would it be possible for you to share the problematic pdf and OS information  with us at [email protected] so that we may investigate?
    Thanks,
    Adobe Reader Team

  • Why self-defined access sequences of free goods can not work?

    Hi gurus,
    I have maintained access sequences of free goods self-defined.but when i creat the SO it does not work!
    when i used the standard access sequences ,it is OK .
    Can anybody tell me why?
    thanks in advance

    Dear Sandy,
    Go to V/N1 transaction select your self defined access sequence then go in to the accesses and fields and check all fields are activated.
    Make sure that these fields are flowing in your sales order.
    I hope this will help you,
    Regards,
    Murali.

Maybe you are looking for

  • Search not working in Mail app

    Hello, I am on a 3.2 ghz intel core i3 iMac 27in from 2010. I'm on 10.7.5 which I recently upgraded maybe a couple months ago from 10.7.2. Mail version 5.3. For a while now, (and I honestly can't remember if it coincided with the recent upgrade), I h

  • How do I delete old photo's that has been transferred to my Iphone a year ago not by itunes?

    When i switched to iphone the old photos from my BB are transferred to my iphone, not by itunes, through another method which i don't remember. but now that i want to delete them but it does not give me the option. the albums are camera and pictures.

  • How To Compile Several Reports 6i At Once

    Hi Allz I want to know how to convert reports 6i rdf to rep at once not one by one.Plz dont give me any link cause i have viewed alls the solution but unable to understand yet.Moreever plz tell me specifically how will i know coversion is completed a

  • Using video from another site. (not YouTube)

    I am working for a parent company and would like to use a video on my website from their website. I asked for the video and they said they cannot give it to me but would allow me to use it if I can figure out how to set up the source code. I have tri

  • After reinstall, SSL certificates not accepted.

    Hello there! I've reinstalled my Macbook Air (Mid 2012, OS X Mountain Lion 10.8.2) due to a problem when I lost my password. When I launched an app like Safari, Mail or Chrome, I've experienced the same problem. Pages using the SSL encryption were un