A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: AS2 - VCard download

  1. #1
    Senior Member
    Join Date
    Nov 2003
    Posts
    385

    AS2 - VCard download

    I have a client who wants to be able to offer peope the ability to download his VCard from his Flash website. Is this possible?

    -M

  2. #2
    Member
    Join Date
    Oct 2006
    Location
    Belgium
    Posts
    36
    Hi bluedawg65,

    It is possible in 2 ways:


    Just download through a web browser:
    Code:
    getURL("http://YoursWedsite.com/client.vcf", "_blank");
    Advanced download:
    Code:
    import flash.net.FileReference;
    
    var MyObject:Object = new Object ();
    var MyFileReference:FileReference = new FileReference ();
    var MyVCard:String = "http://YoursWedsite.com/client.vcf"
    var VCardName:String = "client.vcf";
    
    
    MyObject.onComplete = function (file:FileReference) : Void 
    {
    	trace ("onComplete: " + file.name);
    };
    
    MyObject.onIOError = function (file:FileReference) : Void 
    {
    	trace ("onIOError: " + file.name);
    };
    
    
    MyFileReference.addListener (MyObject);
    MyFileReference.download (MyVCard, VCardName)

  3. #3
    Senior Member
    Join Date
    Nov 2003
    Posts
    385
    Thanks WPRS, Will give this a go!

Posting Permissions

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




Click Here to Expand Forum to Full Width

HTML5 Development Center