Because HTTP service is expecting to handle the response. You want the browser to handle the response so you need to use navigateToURL:
<?xml version="1.0" encoding="utf-8"?> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="vertical"> <mx:Script> <![CDATA[ private function onButtonClick():void { navigateToURL(new URLRequest("http://creativity-online.com/api/image_watermark.php?workId=\ 17593"), "_top"); } ]]> </mx:Script> <mx:Button label="Download File" click="onButtonClick()"/> </mx:Application> HTH Steve --- In flexcoders@yahoogroups.com, grimmwerks <gr...@...> wrote: > > Argh. Still can't figure this out; seems really simple to call a php > file which forces download -- why can't I then do the same thing in > httpService? > > > On Oct 29, 2009, at 4:44 PM, grimmwerks wrote: > > > > > > > Ok - an app I'm working on needs to have a watermarked image; if you > > click on this in the browser: > > > > http://creativity-online.com/api/image_watermark.php?workId=17593 > > > > It works fine. But I can't figure out how to setup the same thing > > in Flex, preferably using an HttpService..? > > > > I mean I could pop open a new browser window with the constructed ip > > in order to force downloadin -- but am I incorrect that I should be > > able to do it with httpService? > > > > > > Thanks > > > > > > >