Hi,
 
I just did what you are trying to do yesterday....here is how you do it.
First imbed your movie inside a JSP page with a special _javascript_ function:
 
<%@ taglib uri="FlexTagLib" prefix="mm" %>
 
<html>
<head>
 <script>
 // ------------------------------------------------------------------------
 // Opens the download window and initiates the download process
 // ------------------------------------------------------------------------
 function showDownload( attachID ) {
  openWindow( "download.jsp?operation=DOWNLOAD&attachID=" + attachID, 400, 60, true );
 }
 
  // ------------------------------------------------------------------------
 // Opens another borwser window without toolbars
 // ------------------------------------------------------------------------
 function openWindow( filename, width, height, isLocked ) {
  var config= ( isLocked )?
     "toolbar=no,location=no,directories=no,status=no,menubar=no,resizable=no":
     "toolbar=yes,location=yes,directories=yes,status=yes,menubar=yes,resizable=yes";
 
  config = config + ",top=" + (screen.height-height)/2 + ",left=" +(screen.width-width)/2;
 
  window.open(filename,"",config + ",scrollbars=yes,width=" + width + ",height=" + height);
 }
 </script>
</head>
 
<body marginwidth="0" marginheight="0" leftmargin="0" rightmargin="0" topmargin="0">
 
<center>
<mm:mxml source="phoenix.mxml" border="0">
 <mm:param name="propFile" value="config/phoenix.properties.xml" />
</mm:mxml>
<center>
 
</body>
</html>
 
Now in your AS2 code... you would call the _javascript_ function as such (attachID is a variable):
 
mx.core.Application.getURL( "_javascript_:showDownload(" + attachID + ")", "_top" );
 
When someone hits the button and runs the AS2code above, this will call the "showDownload" JS function, and thus a secondary browser window will pop up doing some extra work for you. In my case it initiates a file download from the server.
 
Enjoy!
 
Jimmy Gianninas - Software Developer
Optimal Payments Inc.
(514) 380 - 2700 extension 3249
 


From: Matt Chotin [mailto:[EMAIL PROTECTED]
Sent: Monday, May 10, 2004 8:06 PM
To: '[email protected]'
Subject: RE: [flexcoders] getURL 3rd parameter?

If you need to specify width and height you probably need touse fscommand
to call out into _javascript_.  I'm not sure what kind of docs we have on this
right now.

Matt

-----Original Message-----
From: Jonathan Baney [mailto:[EMAIL PROTECTED]
Sent: Monday, May 10, 2004 4:58 PM
To: [email protected]
Subject: Re: [flexcoders] getURL 3rd parameter?

I was looking into this today also and saw that the 3rd param doesn't do
jack except crash everything if you try to use it.  I was using the
_blank attribute to create the app in a new browser window and couldn't
figure out how to set the size of the browser itself.  Like with
_javascript_ where you can specify the width and height of the window.
Anyone know how to do this with the getUrl() method, or should I be
using something else?

Thanks,
Jonathan

Matt Chotin wrote:

> I think this is probably a bug which I'll go ahead and file.  If you
> leave off the last parameter it will be sent as a GET.  If you need to
> send POST look into LoadVars.send().
>

>
> Matt
>

>
> -----Original Message-----
> From: sbyrne_dorado [mailto:[EMAIL PROTECTED]
> Sent: Monday, May 10, 2004 4:23 PM
> To: [email protected]
> Subject: [flexcoders] getURL 3rd parameter?
>

>
> I'm trying to understand the parameters of the Application.getURL
> method.  The first parameter is a String URL, and I get that.  The
> second is a target window (also a String I *guess* -- the
> documentation does not explicitly say so).
>
> The third parameter is a mystery.  It's described as a method, that's
> either the GET or POST method.  The parameter is called "variables".
> I believe that while the docs ambiguously call it a method, the
> context in which that term is interpreted is that of HTML Forms, and
> so it's either a string "GET" or a string "POST" value.  However,
> when I try using "GET", the compiler complains
>
>     Thereis no property with the name 'POST'
>
> and when I specify the method as "POST", the compiler complains:
>
>     There is no property with the name 'GET'
>
> As near as I can tell, there is no correct way to specify this value.
>
> Please help me understand what should be specified here.  There are no
> usage examples that I can find in the documentation, so maybe nobody
> else knows quite how to use it either ;)
>
>
>
>
>Yahoo! Groups Sponsor
> ADVERTISEMENT
> click here
>
<http://rd.yahoo.com/SIG=1291nedvt/M=295196.4901138.6071305.3001176/D=groups
/S=1705007207:HM/EXP=1084319287/A=2128215/R=0/SIG=10se96mf6/*http://companio
n.yahoo.com>
>
>
>
> ------------------------------------------------------------------------
> Yahoo! Groups Links
>
>     * To visit yourgroup on the web, go to:
>       http://groups.yahoo.com/group/flexcoders/
>       
>     * To unsubscribe from this group, send an email to:
>       [EMAIL PROTECTED]
>       <mailto:[EMAIL PROTECTED]>
>       
>     * Your use of Yahoo! Groups is subject to the Yahoo! Terms of
>       Service <http://docs.yahoo.com/info/terms/>.
>
>

--
Jonathan Baney
Enterprise Data Modeler
Thunderbird Consulting Application Engineering: A division of ITS
Mesa Community College





AVIS IMPORTANTWARNING

Les informations contenues dans le present document etses pieces jointes sont strictement confidentielles et reservees a l'usagede la (des) personne(s) a qui il est adresse. Si vous n'etes pas le destinataire, soyez avise que toute divulgation, distribution, copie, ou autre utilisation de ces informations est strictement prohibee. Si vous avez recu ce document par erreur, veuillez s'il vous plait communiquer immediatement avec l'expediteur et detruire ce document sans en faire de copie sous quelque forme.

The information contained in this document and attachments is confidential and intended only for the person(s) named above. If you are not the intended recipient you are hereby notified that any disclosure, copying, distribution, or any other use of the information isstrictly prohibited. If you have received this document by mistake, pleasenotify the sender immediately and destroy this document and attachments without making any copy of any kind.


Reply via email to