Use this:

var arg:String = "myvar";
getURL("javascript:testfunc('" + arg + "')");
// Note: arg's value cannot have apostrophes in it.

Or, better yet, look into the flash.external.ExternalInterface class.
―
Mike Keesey

> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:flashcoders-
> [EMAIL PROTECTED] On Behalf Of [EMAIL PROTECTED]
> Sent: Tuesday, October 24, 2006 9:55 AM
> To: [email protected]
> Subject: [Flashcoders] Q:passing a variable as argument with
> getURL("javascript:testfunc(arg)");
> 
> Hi
> I'm having a problem using getURL to pass a variable argument to a
> javascript function
> 
> 
> this works(notice 'arg' is a string)
> 
> getURL("javascript:testfunc('arg')");
> 
> 
> this DOESN'T work:
> 
> var arg='myvar'
> getURL("javascript:testfunc(arg)");
> 
> 
> Any suggestions???
> 
> 
> 
> [e] jbach at bitstream.ca
> [c] 416.668.0034
> [w] www.bitstream.ca
> --------------------------------------------
> "...all improvisation is life in search of a style."
>              - Bruce Mau,'LifeStyle'
> _______________________________________________
> [email protected]
> To change your subscription options or search the archive:
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
> 
> Brought to you by Fig Leaf Software
> Premier Authorized Adobe Consulting and Training
> http://www.figleaf.com
> http://training.figleaf.com

_______________________________________________
[email protected]
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com

Reply via email to