Re: [flexcoders] URLLoader + Binary != URLStream

2009-05-27 Thread Manish Jethani
On Wed, May 27, 2009 at 2:14 AM, Stephen More stephen.m...@gmail.com wrote:
 I would think that I could load a swf using either URLLoader or
 URLStream. As it turns out only my URLStream is returning the correct
 data.
 Can anyone provide a fix to the following code that makes URLLoader
 work correctly ?

[...]

Why are you calling writeObject() in the case of the URLLoader? You
should call writeBytes() instead. writeObject() is for objects, not
raw bytes

Manish


Re: [flexcoders] URLLoader, FileReference and file download from server - Open or Save options

2009-03-20 Thread Charles Galpin
Vijay, this works for me for png files. I don't expect pdf to behave  
differently


// Flex
navigateToURL(new URLRequest(url), _self);

//Java servlet
response.setContentType(image/png);
response.addHeader(Content-Disposition, attachment; filename=\ +  
name + .png\);

response.setContentLength(bytes.length);
response.getOutputStream().write(bytes);

hth
charles

On Mar 19, 2009, at 4:49 PM, Vijay Ganesan wrote:


Anyone know how I could give the user the Open or Save choice on  
download of a file using URLLoader or FileReference or something else?




RE: [flexcoders] URLLoader goes off on invalid URLRequest

2007-10-04 Thread Alex Harui
Doesn't URLLoader require a URLRequest?



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of richmcgillicuddy
Sent: Thursday, October 04, 2007 2:56 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] URLLoader goes off on invalid URLRequest



Why does this occur

Basic Logic:
-- Create URLLoader (MyLoader)
-- Setup Events for IOError and COMPLETE

MyLoader.load(badURL);

this floats off to nowhere



 


RE: [flexcoders] URLLoader().

2006-06-06 Thread Tracy Spratt










No, URLLoader is 2.0 only. What is the
difference between it an HTTPService? That is a very good question, I hope
someone will answer it.

Tracy











From: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] On Behalf Of Ravindra Suthar
Sent: Tuesday, June 06, 2006 3:10
PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] URLLoader().













Hi,



Can I use URLLoader in flex 1.5. and what is the diff frm
httpReqest. How can I use this









From: flexcoders@yahoogroups.com
[mailto:flexcoders@yahoogroups.com] On Behalf Of Jeremy Rottman
Sent: Wednesday, June 07, 2006
12:36 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] having
trouble with menu bar f2b3













I am
working on migrating an app to f2b3, and I have run into a issue
that I cant figure out. I have also tested this with the example code
provided on the adobe flexapps site.

When I run the code below, it displays only the children of the Contacts
xml, and doesnt display anything else. Anyone have an idea why it is
doing this.

Here is my code.

menuBar.mxml

?xml version=1.0 encoding=utf-8?
mx:Canvas xmlns:mx=http://www.adobe.com/2006/mxml
creationComplete=initCollections() width=100%
height=100%
mx:Script source=as/asMenuBar.as /
mx:MenuBar labelField=@label showRoot=false
dataProvider={menuBarCollection} width=100%
height=22 /

/mx:Canvas

asMenuBar.as

// IMPORTS

import mx.events.MenuEvent;
import mx.collections.*;

[Bindable]
public var menuBarCollection:XMLListCollection;

private var menubarXML:XMLList =

menuitem label=Contacts
menuitem label=Outside Agent data="">
menuitem label=Vendor data="">
menuitem label=Clients data="">
/menuitem
menuitem label=Search
menuitem label=Listings data="">
menuitem label=Sales data="">
menuitem label=Rentals data="">
menuitem label=Referrals data="">
/menuitem
/;

private function initCollections() : void
{
menuBarCollection = new XMLListCollection(menubarXML);
}














__._,_.___





--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com








   






  
  
SPONSORED LINKS
  
  
  

Web site design development
  
  
Computer software development
  
  
Software design and development
  
  


Macromedia flex
  
  
Software development best practice
  

   
  







  
  
  YAHOO! GROUPS LINKS



  Visit your group "flexcoders" on the web.
  To unsubscribe from this group, send an email to:[EMAIL PROTECTED]
  Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.



  






__,_._,___