Re: [flexcoders] Re: navigateToURL

2010-07-06 Thread Oleg Sivokon
FileReference.save availability depends on the player version, the version
of the SDK or Flex Builder doesn't affect that.
Regarding JavaScript, I'd go for an iframe, which would load try to navigate
to the URL to the file you want to load and then a script in the parent
document that would check on an interval what happened to the iframe. I
think that the solutions is tricky / complex to post the code, and I'm not
sure which options are exactly available across different browsers.


[flexcoders] Re: navigateToURL

2010-07-06 Thread Goutham
Hi,

thanks for your reply.
I am using flex 3, so filereference.save is not available
It would be great if you can provide any example using the script to 
communicate with flex

thanks,
Goutham

--- In flexcoders@yahoogroups.com, Oleg Sivokon  wrote:
>
> Use FileReference instead? Or call some JavaScript so it could call back to
> Flash?
>




RE: [SPAM] [flexcoders] Re: navigateToURL error

2010-02-12 Thread Tracy Spratt
".creating a custom component and repeating that" yes, yes, yes.   Pass in
the entire currentItem and store it in a public variable, and then you will
be able to code the repeated item cleanly and clearly.  I'd suggest having
the component dispatch an event on click, then listen for that in the
repeater's parent.  Use event.target.itemData(or whatever you named the
public var) to get the text of the link and then build the full argument to
navigateToeURL.

 

Tracy Spratt,

Lariat Services, development services available

  _  

From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
Behalf Of valdhor
Sent: Friday, February 12, 2010 11:43 AM
To: flexcoders@yahoogroups.com
Subject: [SPAM] [flexcoders] Re: navigateToURL error

 

  

Try this...



Although I would recommend creating a custom component and repeating that.

--- In flexcod...@yahoogro <mailto:flexcoders%40yahoogroups.com> ups.com,
Darrin Kay  wrote:
>
> I am tring to get some text become a link in a Flex3 app, but getting an
> error I know the data is getting pulled in, in this case I hard coded the
> xml with http://www.espn. <http://www.espn.com> com for testing so it is
not the link.
> 
> 
> 
> 
> 
> http://www.adobe.
<http://www.adobe.com/2006/mxml> com/2006/mxml" layout="
> absolute" title="{imageRepeater.currentItem.title}" width="450"
height="253"
> themeColor="#C4BA88" borderColor="#C4BA88" headerColors="#C4BA88"
> roundedBottomCorners="true"
> 
> backgroundImage="@Embed(source='images/backgroungLeftLogo.jpg')"
> cornerRadius="15">
> 
>  fontFamily="Gunplay" htmlText="{imageRepeater.currentItem.sub}"
fontSize="22
> "/>
> 
>  fontFamily="Gunplay" htmlText="{imageRepeater.currentItem.body}"
fontSize="
> 16" textAlign="center" themeColor="#C4BA88"/>
> 
>  
> 
> 
> 
> 
> 
> 
> 
> the above code will not compile:
> 
> 1084 : Syntax error: expection colon before dot.
> 
> 1084 : Syntax error: expection identifier before rightbrace.
> 
> 
> 
> 
> 
> thanks for the help,
> 
> D
>





[flexcoders] Re: navigateToURL error

2010-02-12 Thread valdhor
Try this...



Although I would recommend creating a custom component and repeating that.

--- In flexcoders@yahoogroups.com, Darrin Kay  wrote:
>
> I am tring to get some text become a link in a Flex3 app, but getting an
> error I know the data is getting pulled in, in this case I hard coded the
> xml with http://www.espn.com for testing so it is not the link.
> 
> 
> 
> 
> 
> http://www.adobe.com/2006/mxml"; layout="
> absolute" title="{imageRepeater.currentItem.title}" width="450" height="253"
> themeColor="#C4BA88" borderColor="#C4BA88" headerColors="#C4BA88"
> roundedBottomCorners="true"
> 
> backgroundImage="@Embed(source='images/backgroungLeftLogo.jpg')"
> cornerRadius="15">
> 
>  fontFamily="Gunplay" htmlText="{imageRepeater.currentItem.sub}" fontSize="22
> "/>
> 
>  fontFamily="Gunplay" htmlText="{imageRepeater.currentItem.body}" fontSize="
> 16" textAlign="center" themeColor="#C4BA88"/>
> 
> 
> 
> 
> 
> 
> 
> 
> 
> the above code will not compile:
> 
>  1084 : Syntax error: expection colon before dot.
> 
>  1084 : Syntax error: expection identifier before rightbrace.
> 
> 
> 
> 
> 
> thanks for the help,
> 
>  D
>




[flexcoders] Re: navigateToURL to new TAB rather than new WINDOW

2009-05-08 Thread valdhor
Unfortunately, that is a user preference for the browser. There is no way, 
AFAIK, that a developer can control this.

In my case, with Firefox 3.0.10, I have turned on the preference to open new 
pages in a tab (Tools->Options->Tabs) so my navigateToURL opens in a new tab.


--- In flexcoders@yahoogroups.com, "itdanny2002"  wrote:
>
> I use navigateToURL(new URLRequest(URL),"_blank") to open a new window
> How can I open in in a new tab instead ? I try to hold CTRL and then click. 
> it works in other web page but not flash.
>




[flexcoders] Re: navigateToURL and "_self" - Works locally, not when swf is on remote server

2009-02-09 Thread uclamerrick
Thank you that actually helps, I will look through all of the
crossdomain stuff in the books.


--- In flexcoders@yahoogroups.com, "valdhor"  wrote:
>
> I have no idea how to debug that. Perhaps Charles can tell if it is a
> crossdomain issue.
> 
> 
> --- In flexcoders@yahoogroups.com, "uclamerrick"  wrote:
> >
> > Thank you for helping.
> > 
> > What I meant was that when I click the image nothing happens.
> > 
> > Also, I was not clear with the local vs remote - my swf file can be
> > embedded much like youtube, vimeo etc... 
> > 
> > When the swf file is generated from the code below and still on my
> > laptop clicking the image takes me to the desired URL. 
> > 
> > But then pretend I work at Youtube, and when I export the swf to a
> > youtube server and someone else embeds the swf file on a page on
> > xyzdomain.com, clicking the image does not work.
> > 
> > I tried switching this to a button to make sure it was not an image
> > thing, I got the same result.
> > 
> > The results I describe were on Firefox and Safari on a mac, I have to
> > install windows on a virtual machine to test that.
> > 
> > 
> > --- In flexcoders@yahoogroups.com, "valdhor"  wrote:
> > >
> > > Works for me:
> > > 
> > > 
> > > http://www.adobe.com/2006/mxml";
> > > layout="absolute">
> > >  
> > >  
> > >  
> > >  
> > >  
> > >   > > click="imageClick(event);"/>
> > >  
> > >  
> > > 
> > > 
> > > SWF, HTML file etc on the remote server.
> > > 
> > > What do you mean when you say "does not work"? Do you get an error
> > > message?
> > > You click the image and nothing happens? Something else?
> > > 
> > > 
> > > --- In flexcoders@yahoogroups.com, "uclamerrick"  wrote:
> > > >
> > > > I have an Image on an ApplicationControlBar and I am trying to
> make it
> > > > such that when the image is clicked, the current browser
> window/tab is
> > > > redirected to a URL. It works when the swf file is opened
> locally, but
> > > > not if its a remote swf file. I am guessing this is some security
> > > > issue, and am wondering if anyone has found a way around this.
> > > >
> > > > This works
> > > > Opening the swf file locally, and clicking the image loads the
> new URL
> > > > as specified in the imageClick function below.
> > > >
> > > > This does not work
> > > > Opening the swf file remotely using an html page with object/embed
> > > > code and clicking the image *does not* load the URL.
> > > >
> > > >
> > > > import flash.net.navigateToURL;
> > > >
> > > > public var myURL:String;
> > > >
> > > > private function imageClick(evt:MouseEvent):void {
> > > >  myURL = "http://www.yahoo.com/";;
> > > >  navigateToURL(new URLRequest(myURL), "_self");
> > > > }
> > > >
> > > > 
> > > >  
> > > >> > >source="@Embed('logo.png')"
> > > >id="logo"
> > > >click="imageClick(event);"
> > > >   />
> > > >   ...
> > > >  
> > > > 
> > > >
> > >
> >
>




[flexcoders] Re: navigateToURL and "_self" - Works locally, not when swf is on remote server

2009-02-09 Thread valdhor
I have no idea how to debug that. Perhaps Charles can tell if it is a
crossdomain issue.


--- In flexcoders@yahoogroups.com, "uclamerrick"  wrote:
>
> Thank you for helping.
> 
> What I meant was that when I click the image nothing happens.
> 
> Also, I was not clear with the local vs remote - my swf file can be
> embedded much like youtube, vimeo etc... 
> 
> When the swf file is generated from the code below and still on my
> laptop clicking the image takes me to the desired URL. 
> 
> But then pretend I work at Youtube, and when I export the swf to a
> youtube server and someone else embeds the swf file on a page on
> xyzdomain.com, clicking the image does not work.
> 
> I tried switching this to a button to make sure it was not an image
> thing, I got the same result.
> 
> The results I describe were on Firefox and Safari on a mac, I have to
> install windows on a virtual machine to test that.
> 
> 
> --- In flexcoders@yahoogroups.com, "valdhor"  wrote:
> >
> > Works for me:
> > 
> > 
> > http://www.adobe.com/2006/mxml";
> > layout="absolute">
> >  
> >  
> >  
> >  
> >  
> >   > click="imageClick(event);"/>
> >  
> >  
> > 
> > 
> > SWF, HTML file etc on the remote server.
> > 
> > What do you mean when you say "does not work"? Do you get an error
> > message?
> > You click the image and nothing happens? Something else?
> > 
> > 
> > --- In flexcoders@yahoogroups.com, "uclamerrick"  wrote:
> > >
> > > I have an Image on an ApplicationControlBar and I am trying to
make it
> > > such that when the image is clicked, the current browser
window/tab is
> > > redirected to a URL. It works when the swf file is opened
locally, but
> > > not if its a remote swf file. I am guessing this is some security
> > > issue, and am wondering if anyone has found a way around this.
> > >
> > > This works
> > > Opening the swf file locally, and clicking the image loads the
new URL
> > > as specified in the imageClick function below.
> > >
> > > This does not work
> > > Opening the swf file remotely using an html page with object/embed
> > > code and clicking the image *does not* load the URL.
> > >
> > >
> > > import flash.net.navigateToURL;
> > >
> > > public var myURL:String;
> > >
> > > private function imageClick(evt:MouseEvent):void {
> > >  myURL = "http://www.yahoo.com/";;
> > >  navigateToURL(new URLRequest(myURL), "_self");
> > > }
> > >
> > > 
> > >  
> > >> >source="@Embed('logo.png')"
> > >id="logo"
> > >click="imageClick(event);"
> > >   />
> > >   ...
> > >  
> > > 
> > >
> >
>




[flexcoders] Re: navigateToURL and "_self" - Works locally, not when swf is on remote server

2009-02-09 Thread uclamerrick
Thank you for helping.

What I meant was that when I click the image nothing happens.

Also, I was not clear with the local vs remote - my swf file can be
embedded much like youtube, vimeo etc... 

When the swf file is generated from the code below and still on my
laptop clicking the image takes me to the desired URL. 

But then pretend I work at Youtube, and when I export the swf to a
youtube server and someone else embeds the swf file on a page on
xyzdomain.com, clicking the image does not work.

I tried switching this to a button to make sure it was not an image
thing, I got the same result.

The results I describe were on Firefox and Safari on a mac, I have to
install windows on a virtual machine to test that.


--- In flexcoders@yahoogroups.com, "valdhor"  wrote:
>
> Works for me:
> 
> 
> http://www.adobe.com/2006/mxml";
> layout="absolute">
>  
>  
>  
>  
>  
>   click="imageClick(event);"/>
>  
>  
> 
> 
> SWF, HTML file etc on the remote server.
> 
> What do you mean when you say "does not work"? Do you get an error
> message?
> You click the image and nothing happens? Something else?
> 
> 
> --- In flexcoders@yahoogroups.com, "uclamerrick"  wrote:
> >
> > I have an Image on an ApplicationControlBar and I am trying to make it
> > such that when the image is clicked, the current browser window/tab is
> > redirected to a URL. It works when the swf file is opened locally, but
> > not if its a remote swf file. I am guessing this is some security
> > issue, and am wondering if anyone has found a way around this.
> >
> > This works
> > Opening the swf file locally, and clicking the image loads the new URL
> > as specified in the imageClick function below.
> >
> > This does not work
> > Opening the swf file remotely using an html page with object/embed
> > code and clicking the image *does not* load the URL.
> >
> >
> > import flash.net.navigateToURL;
> >
> > public var myURL:String;
> >
> > private function imageClick(evt:MouseEvent):void {
> >  myURL = "http://www.yahoo.com/";;
> >  navigateToURL(new URLRequest(myURL), "_self");
> > }
> >
> > 
> >  
> >>source="@Embed('logo.png')"
> >id="logo"
> >click="imageClick(event);"
> >   />
> >   ...
> >  
> > 
> >
>




[flexcoders] Re: navigateToURL and "_self" - Works locally, not when swf is on remote server

2009-02-09 Thread valdhor
Works for me:


http://www.adobe.com/2006/mxml";
layout="absolute">
 
 
 
 
 
 
 
 


SWF, HTML file etc on the remote server.

What do you mean when you say "does not work"? Do you get an error
message?
You click the image and nothing happens? Something else?


--- In flexcoders@yahoogroups.com, "uclamerrick"  wrote:
>
> I have an Image on an ApplicationControlBar and I am trying to make it
> such that when the image is clicked, the current browser window/tab is
> redirected to a URL. It works when the swf file is opened locally, but
> not if its a remote swf file. I am guessing this is some security
> issue, and am wondering if anyone has found a way around this.
>
> This works
> Opening the swf file locally, and clicking the image loads the new URL
> as specified in the imageClick function below.
>
> This does not work
> Opening the swf file remotely using an html page with object/embed
> code and clicking the image *does not* load the URL.
>
>
> import flash.net.navigateToURL;
>
> public var myURL:String;
>
> private function imageClick(evt:MouseEvent):void {
>  myURL = "http://www.yahoo.com/";;
>  navigateToURL(new URLRequest(myURL), "_self");
> }
>
> 
>  
>   source="@Embed('logo.png')"
>id="logo"
>click="imageClick(event);"
>   />
>   ...
>  
> 
>



[flexcoders] Re: navigateToURL & request.data & connection problem

2008-12-16 Thread valdhor
Yes - it worked for me.

Have you checked the actual data sent with something like
Charles(http://www.charlesproxy.com)? What is being sent?

BTW. I think Charles is the best. I use it almost every day to track
down network problems that I have. It is the only debugging proxy that
has both AMF support and works cross platform. Best $50 I ever spent.


--- In flexcoders@yahoogroups.com, "assaia"  wrote:
>
> Hi Steve,
> I checked it again without the two lines you noticed last time but
> I still did not get rid of %5F... Did it worked for you?
> 
> Thanks for the help,
> Alex.
> 
> --- In flexcoders@yahoogroups.com, "valdhor"  wrote:
> >
> > You're welcome. Glad I could shed some light on it for you.
> > 
> > --- In flexcoders@yahoogroups.com, "assaia"  wrote:
> > >
> > > Thank you a lot Steve, that's great!
> > > It still is not working, but a least now I know that the error is
> > not in the code anymore...
> > > I think the error is the domain name trying to access the Perl
script.
> > > So I'll transfer it to the correct server and then try again. Thanks
> > a lot!
> > > 
> > > --- In flexcoders@yahoogroups.com, "valdhor"  wrote:
> > > >
> > > > These two lines:
> > > > 
> > > > var array:Array = new Array(new URLRequestHeader("Content-Type",
> > > > "text/html"));
> > > > request.contentType = array.toString();
> > > > 
> > > > send a very strange request to the server:
> > > > 
> > > > 
> Second%5FPhone%5FNumber=0&Account=00&Password=password
> > > > 
> > > > Removing the two lines send a proper POST request.
> > > > 
> > > > There is nothing wrong with your Flex code. The "Internal Server
> > > > Error" response is coming from the Perl script due to the strange
> > request.
> > > > 
> > > > BTW. I figured this out using Charles
(http://www.charlesproxy.com).
> > > > 
> > > > 
> > > > --- In flexcoders@yahoogroups.com, "assaia"  wrote:
> > > > >
> > > > > Hello and thank you a lot for your time.
> > > > > The function runs when a button is clicked.
> > > > > When the new webpage loads I get a "Internal Server Error" and
> > > > > "The server encountered an internal error or
misconfiguration and
> > > > was unable to complete 
> > > > > your request."
> > > > > I've tried a lot of different configurations but none seems
to work
> > > > till now...
> > > > > 
> > > > > private function onClick():void{
> > > > > var url:String = "https://someplace/cgi/web/sth.pl";;
> > > > > var request:URLRequest = new URLRequest(url);
> > > > > var variables:URLVariables = new URLVariables();
> > > > > variables.Account = "00";
> > > > > variables.Password = "password";
> > > > > variables.Second_Phone_Number = "0";
> > > > > request.data = variables;
> > > > > request.method = URLRequestMethod.POST;
> > > > > var array:Array = new Array(new URLRequestHeader("Content-Type",
> > > > "text/html"));
> > > > > request.contentType = array.toString();
> > > > > navigateToURL(request, "_self");
> > > > > }
> > > > > 
> > > > > the previous code is a tranformation of a fla file where
there was a
> > > > layer with this code:
> > > > > 
> > > > > Account = "00";
> > > > > Password = "password";
> > > > > Second_Phone_Number = "0";
> > > > > stop();
> > > > > 
> > > > > and this code
> > > > > 
> > > > > on (release) {
> > > > > // send variables in form movieclip (the textfields)
> > > > > // to email PHP page which will send the mail
> > > > > form.loadVariables();
> > > > > 
> > > > > getURL("https://someplace/cgi/web/sth.pl";, "_self", "POST");
> > > > > gotoAndStop(2);
> > > > > }
> > > > > 
> > > > > Any help would be highly appreciated...
> > > > >
> > > >
> > >
> >
>




[flexcoders] Re: navigateToURL & request.data & connection problem

2008-12-16 Thread assaia
Hi Steve,
I checked it again without the two lines you noticed last time but
I still did not get rid of %5F... Did it worked for you?

Thanks for the help,
Alex.

--- In flexcoders@yahoogroups.com, "valdhor"  wrote:
>
> You're welcome. Glad I could shed some light on it for you.
> 
> --- In flexcoders@yahoogroups.com, "assaia"  wrote:
> >
> > Thank you a lot Steve, that's great!
> > It still is not working, but a least now I know that the error is
> not in the code anymore...
> > I think the error is the domain name trying to access the Perl script.
> > So I'll transfer it to the correct server and then try again. Thanks
> a lot!
> > 
> > --- In flexcoders@yahoogroups.com, "valdhor"  wrote:
> > >
> > > These two lines:
> > > 
> > > var array:Array = new Array(new URLRequestHeader("Content-Type",
> > > "text/html"));
> > > request.contentType = array.toString();
> > > 
> > > send a very strange request to the server:
> > > 
> > > 
Second%5FPhone%5FNumber=0&Account=00&Password=password
> > > 
> > > Removing the two lines send a proper POST request.
> > > 
> > > There is nothing wrong with your Flex code. The "Internal Server
> > > Error" response is coming from the Perl script due to the strange
> request.
> > > 
> > > BTW. I figured this out using Charles (http://www.charlesproxy.com).
> > > 
> > > 
> > > --- In flexcoders@yahoogroups.com, "assaia"  wrote:
> > > >
> > > > Hello and thank you a lot for your time.
> > > > The function runs when a button is clicked.
> > > > When the new webpage loads I get a "Internal Server Error" and
> > > > "The server encountered an internal error or misconfiguration and
> > > was unable to complete 
> > > > your request."
> > > > I've tried a lot of different configurations but none seems to work
> > > till now...
> > > > 
> > > > private function onClick():void{
> > > > var url:String = "https://someplace/cgi/web/sth.pl";;
> > > > var request:URLRequest = new URLRequest(url);
> > > > var variables:URLVariables = new URLVariables();
> > > > variables.Account = "00";
> > > > variables.Password = "password";
> > > > variables.Second_Phone_Number = "0";
> > > > request.data = variables;
> > > > request.method = URLRequestMethod.POST;
> > > > var array:Array = new Array(new URLRequestHeader("Content-Type",
> > > "text/html"));
> > > > request.contentType = array.toString();
> > > > navigateToURL(request, "_self");
> > > > }
> > > > 
> > > > the previous code is a tranformation of a fla file where there was a
> > > layer with this code:
> > > > 
> > > > Account = "00";
> > > > Password = "password";
> > > > Second_Phone_Number = "0";
> > > > stop();
> > > > 
> > > > and this code
> > > > 
> > > > on (release) {
> > > > // send variables in form movieclip (the textfields)
> > > > // to email PHP page which will send the mail
> > > > form.loadVariables();
> > > > 
> > > > getURL("https://someplace/cgi/web/sth.pl";, "_self", "POST");
> > > > gotoAndStop(2);
> > > > }
> > > > 
> > > > Any help would be highly appreciated...
> > > >
> > >
> >
>





[flexcoders] Re: navigateToURL & request.data & connection problem

2008-11-26 Thread valdhor
You're welcome. Glad I could shed some light on it for you.

--- In flexcoders@yahoogroups.com, "assaia" <[EMAIL PROTECTED]> wrote:
>
> Thank you a lot Steve, that's great!
> It still is not working, but a least now I know that the error is
not in the code anymore...
> I think the error is the domain name trying to access the Perl script.
> So I'll transfer it to the correct server and then try again. Thanks
a lot!
> 
> --- In flexcoders@yahoogroups.com, "valdhor"  wrote:
> >
> > These two lines:
> > 
> > var array:Array = new Array(new URLRequestHeader("Content-Type",
> > "text/html"));
> > request.contentType = array.toString();
> > 
> > send a very strange request to the server:
> > 
> > Second%5FPhone%5FNumber=0&Account=00&Password=password
> > 
> > Removing the two lines send a proper POST request.
> > 
> > There is nothing wrong with your Flex code. The "Internal Server
> > Error" response is coming from the Perl script due to the strange
request.
> > 
> > BTW. I figured this out using Charles (http://www.charlesproxy.com).
> > 
> > 
> > --- In flexcoders@yahoogroups.com, "assaia"  wrote:
> > >
> > > Hello and thank you a lot for your time.
> > > The function runs when a button is clicked.
> > > When the new webpage loads I get a "Internal Server Error" and
> > > "The server encountered an internal error or misconfiguration and
> > was unable to complete 
> > > your request."
> > > I've tried a lot of different configurations but none seems to work
> > till now...
> > > 
> > > private function onClick():void{
> > > var url:String = "https://someplace/cgi/web/sth.pl";;
> > > var request:URLRequest = new URLRequest(url);
> > > var variables:URLVariables = new URLVariables();
> > > variables.Account = "00";
> > > variables.Password = "password";
> > > variables.Second_Phone_Number = "0";
> > > request.data = variables;
> > > request.method = URLRequestMethod.POST;
> > > var array:Array = new Array(new URLRequestHeader("Content-Type",
> > "text/html"));
> > > request.contentType = array.toString();
> > > navigateToURL(request, "_self");
> > > }
> > > 
> > > the previous code is a tranformation of a fla file where there was a
> > layer with this code:
> > > 
> > > Account = "00";
> > > Password = "password";
> > > Second_Phone_Number = "0";
> > > stop();
> > > 
> > > and this code
> > > 
> > > on (release) {
> > > // send variables in form movieclip (the textfields)
> > > // to email PHP page which will send the mail
> > > form.loadVariables();
> > > 
> > > getURL("https://someplace/cgi/web/sth.pl";, "_self", "POST");
> > > gotoAndStop(2);
> > > }
> > > 
> > > Any help would be highly appreciated...
> > >
> >
>




[flexcoders] Re: navigateToURL & request.data & connection problem

2008-11-26 Thread assaia
Thank you a lot Steve, that's great!
It still is not working, but a least now I know that the error is not in the 
code anymore...
I think the error is the domain name trying to access the Perl script.
So I'll transfer it to the correct server and then try again. Thanks a lot!

--- In flexcoders@yahoogroups.com, "valdhor" <[EMAIL PROTECTED]> wrote:
>
> These two lines:
> 
> var array:Array = new Array(new URLRequestHeader("Content-Type",
> "text/html"));
> request.contentType = array.toString();
> 
> send a very strange request to the server:
> 
> Second%5FPhone%5FNumber=0&Account=00&Password=password
> 
> Removing the two lines send a proper POST request.
> 
> There is nothing wrong with your Flex code. The "Internal Server
> Error" response is coming from the Perl script due to the strange request.
> 
> BTW. I figured this out using Charles (http://www.charlesproxy.com).
> 
> 
> --- In flexcoders@yahoogroups.com, "assaia"  wrote:
> >
> > Hello and thank you a lot for your time.
> > The function runs when a button is clicked.
> > When the new webpage loads I get a "Internal Server Error" and
> > "The server encountered an internal error or misconfiguration and
> was unable to complete 
> > your request."
> > I've tried a lot of different configurations but none seems to work
> till now...
> > 
> > private function onClick():void{
> > var url:String = "https://someplace/cgi/web/sth.pl";;
> > var request:URLRequest = new URLRequest(url);
> > var variables:URLVariables = new URLVariables();
> > variables.Account = "00";
> > variables.Password = "password";
> > variables.Second_Phone_Number = "0";
> > request.data = variables;
> > request.method = URLRequestMethod.POST;
> > var array:Array = new Array(new URLRequestHeader("Content-Type",
> "text/html"));
> > request.contentType = array.toString();
> > navigateToURL(request, "_self");
> > }
> > 
> > the previous code is a tranformation of a fla file where there was a
> layer with this code:
> > 
> > Account = "00";
> > Password = "password";
> > Second_Phone_Number = "0";
> > stop();
> > 
> > and this code
> > 
> > on (release) {
> > // send variables in form movieclip (the textfields)
> > // to email PHP page which will send the mail
> > form.loadVariables();
> > 
> > getURL("https://someplace/cgi/web/sth.pl";, "_self", "POST");
> > gotoAndStop(2);
> > }
> > 
> > Any help would be highly appreciated...
> >
>





[flexcoders] Re: navigateToURL & request.data & connection problem

2008-11-24 Thread valdhor
These two lines:

var array:Array = new Array(new URLRequestHeader("Content-Type",
"text/html"));
request.contentType = array.toString();

send a very strange request to the server:

Second%5FPhone%5FNumber=0&Account=00&Password=password

Removing the two lines send a proper POST request.

There is nothing wrong with your Flex code. The "Internal Server
Error" response is coming from the Perl script due to the strange request.

BTW. I figured this out using Charles (http://www.charlesproxy.com).


--- In flexcoders@yahoogroups.com, "assaia" <[EMAIL PROTECTED]> wrote:
>
> Hello and thank you a lot for your time.
> The function runs when a button is clicked.
> When the new webpage loads I get a "Internal Server Error" and
> "The server encountered an internal error or misconfiguration and
was unable to complete 
> your request."
> I've tried a lot of different configurations but none seems to work
till now...
> 
> private function onClick():void{
> var url:String = "https://someplace/cgi/web/sth.pl";;
> var request:URLRequest = new URLRequest(url);
> var variables:URLVariables = new URLVariables();
> variables.Account = "00";
> variables.Password = "password";
> variables.Second_Phone_Number = "0";
> request.data = variables;
> request.method = URLRequestMethod.POST;
> var array:Array = new Array(new URLRequestHeader("Content-Type",
"text/html"));
> request.contentType = array.toString();
> navigateToURL(request, "_self");
> }
> 
> the previous code is a tranformation of a fla file where there was a
layer with this code:
> 
> Account = "00";
> Password = "password";
> Second_Phone_Number = "0";
> stop();
> 
> and this code
> 
> on (release) {
> // send variables in form movieclip (the textfields)
> // to email PHP page which will send the mail
> form.loadVariables();
> 
> getURL("https://someplace/cgi/web/sth.pl";, "_self", "POST");
> gotoAndStop(2);
> }
> 
> Any help would be highly appreciated...
>




[flexcoders] Re: navigateToURL

2007-05-01 Thread mapper2255
No issues, my development machine. Appreciate the test. Thanks. Will 
go over it again.

--- In flexcoders@yahoogroups.com, Michael Wills <[EMAIL PROTECTED]> wrote:
>
> I've used Xampp before for many different things and I've never 
had any 
> special requirements. It's odd. I even pasted your sample code in 
the 
> online flex compiler at try.flex.org and it worked fine there.
> 
> Does your bin/ directory or FlashSite2 directory have any 
permissions 
> issues?
> 
> Michael
> 
> mapper2255 wrote:
> >
> > Thanks, Gordon.
> >
> > Yes, it works and the Adobe link worked. Not sure how Flex
> > Builder/xampp/Windows wants to see the contructed URL though it
> > seems like I have tried all options.
> >
> > Forward slashes/backward\with this directory without?
> >
> > I can go to file in browser.
> >
> > --- In flexcoders@yahoogroups.com 
> > , "Gordon Smith" 
> > wrote:
> > >
> > > Whatever problem you're having isn't related to event.label or
> > probably
> > > to anything in your Flex code. When I tried this code it
> > constructed the
> > > proper URL, such as
> > >
> > > http://localhost/FlashSite2/bin/ghostb 
> > 
> > >
> > > Does that URL work when you paste it into a browser?
> > >
> > > - Gordon
> > >
> > > 
> > >
> > > From: flexcoders@yahoogroups.com 
> > [mailto:flexcoders@yahoogroups.com 
> > ] On
> > > Behalf Of mapper2255
> > > Sent: Monday, April 30, 2007 2:19 PM
> > > To: flexcoders@yahoogroups.com 
> > > Subject: [flexcoders] navigateToURL
> > >
> > >
> > >
> > > Can any one tell me why I cannot get this event.label to work,
> > keeps
> > > giving "not found"? Code is straight out of help files.
> > >
> > > http://localhost/FlashSite2/bin/ 
> > 
> > >  > > ' + String
> > > (event.label).toLowerCase()), '_blank');">
> > > 
> > >
> > > 
> > > 
> > > ghostb
> > > Director
> > > Dreamweaver
> > > ColdFusion
> > > 
> > > 
> > > 
> > >
> > > using xampp?
> > >
> >
> >
>




Re: [flexcoders] Re: navigateToURL

2007-05-01 Thread Michael Wills
I've used Xampp before for many different things and I've never had any 
special requirements. It's odd. I even pasted your sample code in the 
online flex compiler at try.flex.org and it worked fine there.


Does your bin/ directory or FlashSite2 directory have any permissions 
issues?


Michael

mapper2255 wrote:


Thanks, Gordon.

Yes, it works and the Adobe link worked. Not sure how Flex
Builder/xampp/Windows wants to see the contructed URL though it
seems like I have tried all options.

Forward slashes/backward\with this directory without?

I can go to file in browser.

--- In flexcoders@yahoogroups.com 
, "Gordon Smith" <[EMAIL PROTECTED]>

wrote:
>
> Whatever problem you're having isn't related to event.label or
probably
> to anything in your Flex code. When I tried this code it
constructed the
> proper URL, such as
>
> http://localhost/FlashSite2/bin/ghostb 


>
> Does that URL work when you paste it into a browser?
>
> - Gordon
>
> 
>
> From: flexcoders@yahoogroups.com 
[mailto:flexcoders@yahoogroups.com 
] On

> Behalf Of mapper2255
> Sent: Monday, April 30, 2007 2:19 PM
> To: flexcoders@yahoogroups.com 
> Subject: [flexcoders] navigateToURL
>
>
>
> Can any one tell me why I cannot get this event.label to work,
keeps
> giving "not found"? Code is straight out of help files.
>
> http://localhost/FlashSite2/bin/ 

> > ' + String

> (event.label).toLowerCase()), '_blank');">
> 
>
> 
> 
> ghostb
> Director
> Dreamweaver
> ColdFusion
> 
> 
> 
>
> using xampp?
>

 


[flexcoders] Re: navigateToURL

2007-04-30 Thread mapper2255
Thanks, Gordon.

Yes, it works and the Adobe link worked. Not sure how Flex 
Builder/xampp/Windows wants to see the contructed URL though it 
seems like I have tried all options.

Forward slashes/backward\with this directory without? 

I can go to file in browser.

--- In flexcoders@yahoogroups.com, "Gordon Smith" <[EMAIL PROTECTED]> 
wrote:
>
> Whatever problem you're having isn't related to event.label or 
probably
> to anything in your Flex code. When I tried this code it 
constructed the
> proper URL, such as
>  
> http://localhost/FlashSite2/bin/ghostb
>  
> Does that URL work when you paste it into a browser?
>  
> - Gordon
> 
> 
> 
> From: flexcoders@yahoogroups.com 
[mailto:[EMAIL PROTECTED] On
> Behalf Of mapper2255
> Sent: Monday, April 30, 2007 2:19 PM
> To: flexcoders@yahoogroups.com
> Subject: [flexcoders] navigateToURL
> 
> 
> 
> Can any one tell me why I cannot get this event.label to work, 
keeps 
> giving "not found"? Code is straight out of help files. 
> 
> http://localhost/FlashSite2/bin/
>  ' + String
> (event.label).toLowerCase()), '_blank');">
> 
> 
> 
> 
> ghostb
> Director
> Dreamweaver
> ColdFusion
> 
>  
> 
> 
> using xampp?
>




[flexcoders] Re: navigateToURL bind to datagrid selecteditem

2007-02-08 Thread nasawebguy
Thanks Doug! This works:

public function doNavigate( ) : void 
{
navigateToURL(new URLRequest
("http://www.acerpanam.com/synapse/data/7117/documents/"+drivergrid.se
lectedItem.uploadedfile));
}

I really appreciate the help.

Don 







--- In flexcoders@yahoogroups.com, "Doug Lowder" <[EMAIL PROTECTED]> 
wrote:
>
> 
> I would do this in a function rather than in mxml.
> 
>  function doNavigate( ) : void {
>  navigateToURL(new
> URLRequest("http://www.mydomain.com/synapse/data/7117/documents/"; +
> drivergrid.selectedItem.uploadedfile, "Download"));
>  }
> 
> ...
> 
> 
> 
> 
> --- In flexcoders@yahoogroups.com, "nasawebguy"  wrote:
> >
> >
> > I have a linkbutton called Download
> > The downloaded filename is in a datagrid column called 
uploadedfile.
> > This uploaded filename varies, but the path stays the same
> > www.mydomain.com/synapse/data/7117/documents/#uploadedfile#
> >
> > When the user selects a row in drivergrid, the driver details 
appear
> > below the grid with a Download linkbutton.
> >
> > When the user clicks the download button, I want the driver file 
to
> > begin to download.
> >
> > I don't know how to write the url below so that it binds the
> > uploadedfile to the end of the url.
> >
> > This doesn't work.
> >
> > http://www.mydomain.com/synapse/data/7117/documents/
> > {drivergrid.selectedItem.uploadedfile}'), 'Download')"/>
> >
> > Will anyone help with the correct syntax?
> > Also, how would you do a url parameter in a similar way?
> >
> > Thanks,
> > Don
> >
>




[flexcoders] Re: navigateToURL bind to datagrid selecteditem

2007-02-07 Thread Doug Lowder

I would do this in a function rather than in mxml.

 function doNavigate( ) : void {
 navigateToURL(new
URLRequest("http://www.mydomain.com/synapse/data/7117/documents/"; +
drivergrid.selectedItem.uploadedfile, "Download"));
 }

...




--- In flexcoders@yahoogroups.com, "nasawebguy" <[EMAIL PROTECTED]> wrote:
>
>
> I have a linkbutton called Download
> The downloaded filename is in a datagrid column called uploadedfile.
> This uploaded filename varies, but the path stays the same
> www.mydomain.com/synapse/data/7117/documents/#uploadedfile#
>
> When the user selects a row in drivergrid, the driver details appear
> below the grid with a Download linkbutton.
>
> When the user clicks the download button, I want the driver file to
> begin to download.
>
> I don't know how to write the url below so that it binds the
> uploadedfile to the end of the url.
>
> This doesn't work.
>
> http://www.mydomain.com/synapse/data/7117/documents/
> {drivergrid.selectedItem.uploadedfile}'), 'Download')"/>
>
> Will anyone help with the correct syntax?
> Also, how would you do a url parameter in a similar way?
>
> Thanks,
> Don
>





[flexcoders] Re: navigateToURL with multiple links

2006-07-24 Thread Doug Lowder



Weird.  I had to throw in some callLaters.  I didn't know that's how navigateToURL() works.
http://www.adobe.com/2006/mxml" layout="absolute" creationComplete="OpenListing(0)"> 
--- In flexcoders@yahoogroups.com, "Chris Waguespack" <[EMAIL PROTECTED]> wrote:>> This does not work either. In fact, having two navigateToURL requests> in the same function only triggers the last one. Anyone know of a way> around this?> > Thanks,> Chris> > > --- In flexcoders@yahoogroups.com, "Doug Lowder" douglowder@ wrote:> >> > Try iterating through the array elements:> > > > private function OpenListings():void{> > var listingData:Array=/*an array of links*/;> > for (var i = 0; i < listingData.length; i++){> > navigateToURL(new URLRequest(listingData[i]),'_blank');> > }> > }> > > > > > --- In flexcoders@yahoogroups.com, "Chris Waguespack" > >  wrote:> > >> > > I'm trying to make a link button that opens multiple links in> > > different windows/tabs.> > > Right now I have click calling this function> > > > > > private function OpenListings():void{> > > var listingData:Array=/*an array of links*/;> > > var link:String=new String();> > > for each(link in listingData){> > > navigateToURL(new URLRequest(link),'_blank');> > > }> > > }> > > > > > This only opens the last link in the array. Is there any way to > > open> > > more than one link at once?> > > > > > Thanks,> > > Chris> > >> >>

__._,_.___





--
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.



  






__,_._,___



[flexcoders] Re: navigateToURL with multiple links

2006-07-24 Thread Chris Waguespack
I don't know if this is the best way to do this, but this seems to work:

private function OpenListings():void{
 var listingData:Array=/*an array of links*/;
 ExternalInterface.call("openURLs",listingData);
}

And a function in Javascript in the wrapper:

function openURLs(urls){
for(i=0;i wrote:
>
> Try iterating through the array elements:
> 
> private function OpenListings():void{
> var listingData:Array=/*an array of links*/;
> for (var i = 0; i < listingData.length; i++){
> navigateToURL(new URLRequest(listingData[i]),'_blank');
> }
> }
> 
> 
> --- In flexcoders@yahoogroups.com, "Chris Waguespack" 
>  wrote:
> >
> > I'm trying to make a link button that opens multiple links in
> > different windows/tabs.
> > Right now I have click calling this function
> > 
> > private function OpenListings():void{
> >  var listingData:Array=/*an array of links*/;
> >  var link:String=new String();
> >  for each(link in listingData){
> >   navigateToURL(new URLRequest(link),'_blank');
> >  }
> > }
> > 
> > This only opens the last link in the array. Is there any way to 
> open
> > more than one link at once?
> > 
> > Thanks,
> > Chris
> >
>








 Yahoo! Groups Sponsor ~--> 
Something is new at Yahoo! Groups.  Check out the enhanced email design.
http://us.click.yahoo.com/SISQkA/gOaOAA/yQLSAA/nhFolB/TM
~-> 

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

<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/

<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
 





[flexcoders] Re: navigateToURL with multiple links

2006-07-24 Thread Chris Waguespack
This does not work either.  In fact, having two navigateToURL requests
in the same function only triggers the last one.  Anyone know of a way
around this?

Thanks,
Chris


--- In flexcoders@yahoogroups.com, "Doug Lowder" <[EMAIL PROTECTED]> wrote:
>
> Try iterating through the array elements:
> 
> private function OpenListings():void{
> var listingData:Array=/*an array of links*/;
> for (var i = 0; i < listingData.length; i++){
> navigateToURL(new URLRequest(listingData[i]),'_blank');
> }
> }
> 
> 
> --- In flexcoders@yahoogroups.com, "Chris Waguespack" 
>  wrote:
> >
> > I'm trying to make a link button that opens multiple links in
> > different windows/tabs.
> > Right now I have click calling this function
> > 
> > private function OpenListings():void{
> >  var listingData:Array=/*an array of links*/;
> >  var link:String=new String();
> >  for each(link in listingData){
> >   navigateToURL(new URLRequest(link),'_blank');
> >  }
> > }
> > 
> > This only opens the last link in the array. Is there any way to 
> open
> > more than one link at once?
> > 
> > Thanks,
> > Chris
> >
>










 Yahoo! Groups Sponsor ~--> 
See what's inside the new Yahoo! Groups email.
http://us.click.yahoo.com/2pRQfA/bOaOAA/yQLSAA/nhFolB/TM
~-> 

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

<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/

<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
 




[flexcoders] Re: navigateToURL with multiple links

2006-07-24 Thread Doug Lowder
Try iterating through the array elements:

private function OpenListings():void{
var listingData:Array=/*an array of links*/;
for (var i = 0; i < listingData.length; i++){
navigateToURL(new URLRequest(listingData[i]),'_blank');
}
}


--- In flexcoders@yahoogroups.com, "Chris Waguespack" 
<[EMAIL PROTECTED]> wrote:
>
> I'm trying to make a link button that opens multiple links in
> different windows/tabs.
> Right now I have click calling this function
> 
> private function OpenListings():void{
>  var listingData:Array=/*an array of links*/;
>  var link:String=new String();
>  for each(link in listingData){
>   navigateToURL(new URLRequest(link),'_blank');
>  }
> }
> 
> This only opens the last link in the array. Is there any way to 
open
> more than one link at once?
> 
> Thanks,
> Chris
>







 Yahoo! Groups Sponsor ~--> 
Great things are happening at Yahoo! Groups.  See the new email design.
http://us.click.yahoo.com/TISQkA/hOaOAA/yQLSAA/nhFolB/TM
~-> 

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

<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/

<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/