Downloading problem with AS2

Hi all,
I have an issue which has been driving me mad all morning. I'm trying to download a file from a remote server. I use the following code:
import flash.net.FileReference;
var listener:Object = new Object();
var fileRef:FileReference = new FileReference();
fileRef.addListener(listener);
var url:String = "http://www.mysite.com/myFolder/myFile.jpg";
if(!fileRef.download(url)) trace("dialog box failed to open.");
If I execute this code, it works just fine. If I insert this code inside a sendAndLoad, it stops working. Here's an example:
import flash.net.FileReference;
c = new LoadVars();
r = new LoadVars();
r.onLoad = function(ok)
     var listener:Object = new Object();
     var fileRef:FileReference = new FileReference();
     fileRef.addListener(listener);
     var url:String = "http://www.mysite.com/myFolder/myFile.jpg";
     if(!fileRef.download(url)) trace("dialog box failed to open.");
c.a = 1;
c.sendAndLoad("http://www.mysite.com/myPhp.php", r, "POST");
Does anyone have any idea as to why it doesn't work?
Thank you!!!

Hi, I'm back again.
I've tried every possible combination, but I get the same results. Here's the code:
import mx.controls.Alert;
import flash.net.FileReference;
System.security.allowDomain("www.mysite.com");
// FIRST TRY  <------- GETS EXECUTED IF I RUN THE SWF, NOT IF I RUN THE HTML
var listener:Object = new Object();
listener.onSelect = function(file:FileReference):Void { trace("onSelect: " + file.name); }
listener.onCancel = function(file:FileReference):Void { trace("onCancel"); }
listener.onOpen = function(file:FileReference):Void { trace("onOpen: " + file.name); }
listener.onProgress = function(file:FileReference, bytesLoaded:Number, bytesTotal:Number):Void { trace("onProgress with bytesLoaded: " + bytesLoaded + " bytesTotal: " + bytesTotal); }
listener.onComplete = function(file:FileReference):Void { trace("onComplete: " + file.name); }
listener.onIOError = function(file:FileReference):Void { trace("onIOError: " + file.name); }
var downloadItem:FileReference = new FileReference();
downloadItem.addListener(listener);
if(!downloadItem.download("http://www.adobe.com/platform/whitepapers/platform_overview.pdf")) { trace("dialog box 1 failed to open."); }  
    c = new LoadVars();
    r = new XML();
    r.ignoreWhite = true;
    r.onLoad = function (ok)
        delete this.onLoad;
        var nodes = this.firstChild.childNodes;
       trace(nodes[1].firstChild.nodeValue);    <-------- GETS EXECUTED IF I RUN THE HTML, NOT IF I RUN THE SWF
// SECOND TRY  <------ NEVER GETS EXECUTED
var listener:Object = new Object();
listener.onSelect = function(file:FileReference):Void { trace("onSelect:  " + file.name); }
listener.onCancel = function(file:FileReference):Void {  trace("onCancel"); }
listener.onOpen = function(file:FileReference):Void { trace("onOpen: " +  file.name); }
listener.onProgress = function(file:FileReference, bytesLoaded:Number,  bytesTotal:Number):Void { trace("onProgress with bytesLoaded: " +  bytesLoaded + " bytesTotal: " + bytesTotal); }
listener.onComplete = function(file:FileReference):Void {  trace("onComplete: " + file.name); }
listener.onIOError = function(file:FileReference):Void {  trace("onIOError: " + file.name); }
var downloadItem:FileReference = new FileReference();
downloadItem.addListener(listener);
if(!downloadItem.download("http://www.adobe.com/platform/whitepapers/platform_overview.pdf"))  { trace("dialog box 2 failed to open."); }
c.a = 1;
c.sendAndLoad("http://www.mysite.com/myphp.php", r, "POST");
Here's the deal:
1) I execute the SWF alone ---> the saveFile dialog appears. No trace messages appear. The 'download' that's getting executed is the one labeled FIRST TRY.
2) I execute the HTML ---> No saveFile dialog appears, but I get 2 trace messages telling me that dialog boxes 1 and 2 have failed to open and I get the trace containing the value returned by the PHP
I've tried this from two different computers, one at home, the other at the office and get the same results. What am I doing wrong??? I appreciate all your help.

Similar Messages

  • Download problem with pacman

    Hi,
    i'm new to archlinux and am currently installing arch, unfortunately pacman waits for about 15-20 seconds after each package before he gets the next one so that installing packages is realy time consuming (downloadspeed of the packages is normal around 600kb/s). i do not have any similiar problems with other distributins or downloads and couldn't find anything like this in the wiki,forum or with a searchengine. i realy don't know what could cause this problem and would appreciate any help.
    regards,
    otowa

    Otowa wrote:thx nDray, already tried that without any success
    When you download manually a package (or any file) with wget, is it slow to connect or what?

  • Download Problem with iPhoto 6.0.4.

    New Mac user here. I have a clean install of OS X, uodated to to 10.4.8. I bought a copy of iLife 06 from Amazon.com and installed it and successfully updated the various programs....except for iPhoto.
    The version installed is 6.0.1. When I look for updates I get the message that 6.0.4 is available and I download it (i've done this 3 or 4 times) and each time it shows a successful download and then I get an error message:
    "The update "iPhoto Update" can't be installed.
    The digital signature for this package is incorrect. The package may have been tampered with or corrupted since being signed by "Apple"."
    This is odd. After I installed iLife from the disk I bought (in a sealed box) from Amazon I have successfully downloaded and installed updates to the other component programs; it is just iPhoto that is giving the problem.
    Which figures because that is the one program in the suite I want to use.
    I would appreciate any help or direction in solving this problem.
    (btw: I noticed some comments on this forum about problems with v 6.0.5. I have only been 'offered' a download of 6.0.4. Has 6.0.5 been withdrawn?)
    Thanks,
    --Bob
    G4 Pbk 12" Mac OS X (10.4.8)
    G4 Pbk 12"   Mac OS X (10.4.8)  

    Try downloading the standalone updater for iPhoto 6.04. iPhoto 6.05 has not been pulled, but you cannot install it until you've successfully installed the iPhoto 6.04 updater, and Software Update isn't supposed to show you any updates which can't be installed on your configuration.
    (16965)

  • Download Problems with iTunes Match

    I'm having problems with iTunes Match, upload the songs are done and had great difficulty with the freezing of steps.
    I'm not able to make the songs appear in iTunes: http://pqp.me/7qr
    and when I get the songs come I can not download:http://pqp.me/7qq
    Can you help me?

    Vinny Bastos wrote:
    I'm not able to make the songs appear in iTunes: http://pqp.me/7qr
    I don't know what you mean by this. Do you mean you can't figure out how to get off that screen? Click the "done" button.
    This is just to say that I managed to sync with iTunes Match, in my other notebook I can not do the songs appear.
    Vinny Bastos wrote:
    and when I get the songs come I can not download:http://pqp.me/7qq
    You're connection the iTunes Match servers is offline. That's why the songs are greyed out and the cloud icon has the horozontal lines in it. Quit iTunes, wait a few seconds, re-launch the application and wait until the tracks are no longer greyed out and you will be able to download them.
    That part you answered, thanks.
    How often iTunes Match is off? Sometimes?

  • TV Show download problem with library on a network share

    My local drive has 100GB disk space available. I have my iTunes library configured to be on a network share which happens to be on a NAS (network attached storage) drive. My NAS drive has over 600GB disk space available. When I try to download a TV Show (Battlestar Galactica) I get an error which says that:
    "The disk you are attempting to use is full"
    This is nowhere near true. I tried several times, then switched my iTunes library to point to my local drive, and the download worked. Does iTunes have a problem with a library on a network share?
    Help!
    Thanks,
    Brad

    Not easy because in order to open just one library file you would have to be running the same version of iTunes on all computers which would be limited to the lowest version supported by your computers (the G3).  Try to open a iTunes 10 library with 9.2.1 and it will refuse. This in turn might not support your equipment.  Even if you can do this you would have to make sure only one copy of iTunes was running because the library file cannot be opened by multiple copies of iTunes at the same time.

  • Download Problems with K8N Neo4 Platinum Nvidia Ethernet Controller

    Just to ask if there is some basic setup for Nvidia network drivers in Windows or in BIOS since I'm having download errors with a DSL connection when i use the Nvidia networking controller, not depending from  the OS I'm booting (WinXP Pro SP2 or  WinXP pro 64). When I download using the Marvell Yukon controller everything  works fine in both operating systems. Additional specs:
    K8N Neo 4 Platinum (latest MSI Nforce4 drivers)
    Athlon 64 X2 4200+
    2GB Transcend RAM
    EVGA 6600 GT 128MB PCI-E
    Samsung Spinpoint 200GB SATA (Win XP Pro + SP2)
    Samsung Spinpoint 200GB SATA (Win XP Pro 64)
    Samsung TS-H522U DVD-RW
    Seventeam ST-550EAG  3.3@30A  5.0@30A  12V1 & 12V2 @ 18A each

    Quote from: Indigian on 07-November-05, 00:23:35
    Open up the nvidia firewall.
    Click on 'Active Armour'
    Click on 'Application'
    change the setting from 'offloadable' to 'notoffloadable'
    This solves the download problem.
    Indigian,  you are The Man!!!!!
    That solved it !!! Thank you very much!

  • Download problems with 10.1.3 JDeveloper

    Has anyone else had problems with downloading the new version of JDeveloper? The link appears to be going nowhere.

    we heard that people sometime are having problems that are usually solved by trying again a little later.
    Another option that might work is to add -west to the server name so it will become download-west.oracle.com

  • Download problem with EM 11g Grid Control Release 1 (11.1.0.1.0)

    Hi all,
    I have problem with Enterprise Manager 11g Grid Control Release 1 (11.1.0.1.0) for Linux x86-64 (64-bit) downloaded archives.
    Actually with GridControl_11.1.0.1.0_Linux_x86-64_2of3.zip (1,589,671,704 bytes) (cksum - 535544209)
    I successfully downloaded all archives but cksum for this file (...2of3...) is invalid.
    Even it is invalid I tried to install. Installation starts ok, but it breaks after few moments.
    Regards

    Here is cksum from file that I downloaded 3966614633 and on download page is 535544209.
    It's obvious that something is wrong!
    Oracle personal should fix this issue.
    Anyhow, there is another way... Download from different location. See this thread:
    Re: Invalid Software Download from OTN for Grid Control 11g on Linux x86_64
    Regards

  • Folio download problem with Android app

    I still have a problem with the app. It's ok with the certificate now and ok on google play store.
    The app was updated on two android tablets and when I try to download an issue which was uploaded a few months ago with v30 DPS tools, the app can't download it because I need to upgrade the app.
    The first one was build with v25 tools, is this something with the certificate.
    Yves

    What version number shows in the about dialog of your application? You can get to the about dialog from the "..." or hardware menu button on your device while in the library view. Select "About".
    Also, can you send me a private message with the adobe ID that you're using to publish your folios?
    Neil

  • Download problem with iPod Touch January software update

    Hi, some problems with the software update. Please advise
    - Ipod Touch user from australia
    - went for holidays in malaysia for a while and purchased the software update via itunes australia
    - The download did not start but i was charged $25AUD
    - Returned to australia, attempted the download again but failed because itunes stated that the update has already been downloaded.
    - Attempted to update the iPod Touch by clicking on "Check for Update" but software has already been updated to the current version (1.1.3).
    - The new applications did not appear on iPod Touch.
    Thanks in advance!

    Hi pdra05,
    Do you manually manage your music?
    iTunes has to sync to unlock the January software, manually manage music has to be deselected.
    Make sure your content on your ipod is backed up before sync.
    [Installing and verifying the iPod touch January Software Upgrade|http://docs.info.apple.com/article.html?artnum=307243]
    fern

  • EmbedFonts problem with AS2

    Hey everyone,
    I am having a problem using embedded fonts within my movie and no matter what i try I cannot get it to work. I  have a font embedded which is set to be exported for actionscript and  exported in the first frame. It has an identifier of myfontid. The  following code works fine and displays a text box using Arial:
    Actionscript Code:
    target.createTextField("newText",target.getNextHighestDepth(),50,50,100,300);
    target.newText.text="hi there";
    var myTextFormat = new TextFormat();
    myTextFormat.font = "Arial";
    target.newText.setTextFormat(myTextFormat);
    However the following doesn't work at all:
    Actionscript Code:
    target.createTextField("newText",target.getNextHighestDepth(),50,50,100,300);
    target.newText.text="hi there";
    var myTextFormat = new TextFormat();
    myTextFormat.font = "myfontid";
    target.newText.setTextFormat(myTextFormat);
    target.newText.embedFonts=true;
    I have been toying with this for ages now and read everything I can  about it  but am still having problems. It works when I use similar code  within an empty flv
    file just not within my main movie. This is being run within an  onLoadComplete method for after the image that it sits on finishes  loading, i suspect there must be some issue with this but i can't see  what it is given it works without embedded fonts.
    Thanks so much for your help on this, it's driving me crazy!!
    Dave

    This is driving me nuts When i copy the embed code across into a blank flv file (with the embedded font) and replace target with this then it works perfectly but it will not work no matter what i do within my main swf. The exact code i'm using is:
    target.createTextField("newText",target.getNextHighestDepth(),50,50,100,300);
    target.newText.text="hi there1";
    var myTextFormat = new TextFormat();
    myTextFormat.font = "fontid";
    myTextFormat.color = "0xFFFFFF";
    target.newText.setTextFormat(myTextFormat);
    target.newText.embedFonts=true;
    I just don't even know what to try anymore, i would think there's maybe a problem with running it all within an onloadcomplete statement or something like that however it works perfectly when i use standard non embedded fonts. Also when i debug the movie i can see the textfield newText and it has the correct variable and is has embedFonts set to true but still nothing shows up.
    Any other suggestions would be massively appreciated as i really don't know what to try any more....
    Thank you so much for your help,
    Dave

  • Download problems with Oracle 9i

    So that we may better diagnose DOWNLOAD problems, please provide the following information.
    - Server name : http://download-east.oracle.com
    - Filename : 92010NT_Disk1.zip, 92010NT_Disk2.zip, 92010NT_Disk3.zip
    - Date/Time : 15 Aug 2002
    - Browser + Version : IE 5.x, Netscape 4
    - O/S + Version : MS Windows 98/2000
    - Error Msg
    I have been trying to download Oracle 9i for the past three weeks. Every time I try to download the above mentioned files the file Login.jsp gets copied. I've tried using both GetRight and GoZilla!
    Could someone please advise me what to do. Any help would be appreciated.

    I recently downloaded Oracle9i personal edition, it took me more than 7 hours, and the downloaded zip file is A91514-01.zip. You need to check how reliable is your internet connection. regards. winston

  • Download problem with Tunsten E2 Guide

    I'm trying to download the "Tungsten E2 Getting Started Guide".  It stops 3/4 of the way through the download.  I downloaded the "User Guide" successfully so I know there is nothing wrong with my software.  Can somebody check that please?  Thank you.;
    Post relates to: Tungsten E2

    I'll try downloading it with Microsoft IE to see if that works.  My current browser is Mozilla Firefox which I'm happy with.  Also I'm using Norton Security and the firewall might get in the way.  Thanks.
    Post relates to: Tungsten E2

  • Mountain Lion download problems with Lion 10.7.5 (no VirusBarrier issue)

    I have a mid-2009 Macbook Pro. From the factory it came with Snow Leopard but has since been upgraded to Lion OS X 10.7.5. I do not have VirusBarrier, I am writing from a recently clean-installed Lion.
    I have now been troubleshooting my Mac for several days. When I wrote first, I had an issue with Safari having been damaged and so I wasn't able to reinstall Lion - but after a certain extremely helpful community member I finally succeeded in installing Lion.
    But the issues with the App Store still persist. All my Mountain Lion downloads fail, getting the error message "can't verify, might be corrupted" what many here have also been getting. However, most solutions were related to VirusBarrier (which I don't have), or /var/folders errors (Console does not show any var-related errors).
    So if it's not a var-related issue, or related to firewalls or virus softwares (I have disabled the Firewall and I have no virus software installed), what could it be?
    When the download and install of ML failed last time, Console showed the following messages:
    11/30/12 11:54:44.617 AM com.apple.SecurityServer: Failed to authorize right 'system.install.app-store-software' by client '/System/Library/PrivateFrameworks/PackageKit.framework/Versions/A/Resources/in stalld' [235] for authorization created by '/System/Library/CoreServices/Software Update.app' [567]
    11/30/12 11:54:44.617 AM com.apple.SecurityServer: Failed to authorize right 'system.install.software' by client '/System/Library/PrivateFrameworks/PackageKit.framework/Versions/A/Resources/in stalld' [235] for authorization created by '/System/Library/CoreServices/Software Update.app' [567]
    11/30/12 12:25:49.252 PM authexec: executing /Applications/Install OS X Mountain Lion.app/Contents/Resources/InstallAssistantTool
    11/30/12 12:26:17.178 PM Install OS X Mountain Lion: Stopped operation queue with Error Domain=IAErrorDomain Code=101 "This copy of the Install OS X Mountain Lion application can't be verified. It may have been corrupted or tampered with during downloading." UserInfo=0x7f93aad17ee0 {IAErrorAlternateAction=App Store, NSLocalizedRecoveryOptions=(
        Cancel,
        "App Store\U2026"
    ), NSLocalizedRecoverySuggestion=Delete this copy of the application, and go to the Purchases page of the Mac App Store to download a new copy., NSRecoveryAttempter=<IARecoveryAttempter: 0x7f93aab1e1d0>, NSLocalizedDescription=This copy of the Install OS X Mountain Lion application can't be verified. It may have been corrupted or tampered with during downloading.}
    ...and a bit later, upon re-starting the download:
    11/30/12 12:29:40.515 PM com.apple.SecurityServer: Failed to authorize right 'system.install.apple-software' by client '/System/Library/PrivateFrameworks/PackageKit.framework/Versions/A/Resources/in stalld' [817] for authorization created by '/Applications/App Store.app' [781]
    11/30/12 12:29:40.547 PM com.apple.SecurityServer: Failed to authorize right 'system.install.software' by client '/System/Library/PrivateFrameworks/PackageKit.framework/Versions/A/Resources/in stalld' [817] for authorization created by '/Applications/App Store.app' [781]
    Problem elimination:
    * I don't think this is a router-related issue: I have downloaded and installed other softwares outside App Store successfully
    * As said, I don't think this has anything to do with Firewall or Virus settings
    * Nor has this anything to do with /var/folders as far as I can tell
    What I've tried so far:
    * Repaired disk permissions several times
    * Rebooted
    * Restarted App Store
    * Following one advise found on the net, I deleted preflight.pfpkg just in case
    * All the time I have made sure my OS has the most recent Software Updates installed (most of them downloaded successfully, while with Safari and OS 10.7.5. I had to try several times before they were downloaded succesfully)
    I just reinstalled my OS X Lion, only to use it to jump on to Mountain Lion - so I am pending my migration until ML is installed. I would like to fix this soon, since I'd like to get the migration done and my real work started. I would really appreciate your help.
    I'm not very adept at using Console or Terminal to troubleshoot, so if someone could guide me through the problem identification, that would be great. Unless someone already knows exactly what's going wrong and can show me a working solution - that'd save my day!
    Thanks!

    In cases like this, if you have an Apple store near by, they will most likely install the OS free of charge for you, if you can't bring your Apple ID along to prove you've paid for it.
    Would that work out for you?

  • I have a download problem with a movie on ipad mini.

    Hi,
    I have an ipad mini for my son and bought a movie for him but it didn't download properly the first time and so I deleted it and tried to reload it from iTunes. My problem is that the blue bar for the download time is full but the movie isn't in the videos app. On the download section in iTunes it says download error tap to retry and then the movie could not be downloaded at this time try later. I've been trying for weeks! There is an edit tab but no option appears for this movie. So I can't delete the download restart it or anything!
    There is enough memory on the ipad, the movie is 1.2gb and the ipad 1.6 available. I'm not sure if rebooting to factory settings is the way to go not wanting to lose anything. The movie is just stuck and I can't budge it!
    I also have another son and his account for his ipad is linked with the other. His movie download fine. We have a good strong wifi signal, I receive emails and check out the net fine but this movie has stumped me!
    Any advice would be gratefully accepted! He's itching to watch his movie! Hope there's enough info.
    Thank you
    Jo

    Thanks for your fast reply but I've deleted more apps and now have over 3gb free but I'm getting the same message that it cannot download. There is no option to cancel the download either.
    Lol my son hasn't stopped asking to watch it! Driving me mad! :)
    Can I restore it safely to factory settings and then reload the movie afresh?

Maybe you are looking for

  • Problems with hard disk, but it won't repair

    Hi, My MacBook Pro has gradually become slow, and it crashes occasionally, especially when multitasking. I verified my hard disk with the Disk Utility, and it told me the following: Verifying volume "Macintosh HD" Checking HFS Plus volume. Checking E

  • Spotlight does not find files with "_" (underscores), but only for certain file types

    Hey Folks, this is strange, maybe someone has an idea. I already searched the internet for a while, nothing found so far. I have a file "calc_mean.m" on my desktop. When I type "calc" in spotlight, it shows the file. But when I type "calc_" it sudden

  • Runtime Analysis SE30

    Hi BW Gurus, i have my query based on a Virtual cube for BCS. I ran the query and its taking 14 minutes to give me the result. From RSRT i got the name of the program which run in the backend to generate the report. I took that program name and put i

  • Region position vs. among items buttons

    Hello, Can someone from the HTML DB team, please, explain the logic behind the different functionality between these tow types of buttons? Why can't/shouldn't I use URL Redirection – for example – with the 'among items' button? I searched the forum f

  • Default Alarm

    Can anyone tell me why the default alarm would be set for minutes only and is there a way it can be changed to days or hours in the preferences.