Neil,

Try this:
  
  import net.liftweb.http.js._
  import net.liftweb.http.js.JE._
  import net.liftweb.http.js.JsCmds._
  
  val script = """swfobject.embedSWF('" + flashSrc + "','myContent', '300', 
'120', '9.0.0', 'expressInstall.swf', '" + flashVar + "');"""

  def whatever(xhtml: NodeSeq): NodeSeq = bind("flash", xhtml,
    "object" -> Script(Run(script))
  )

That should give you enough to work out what it is you need to do. 

Cheers, Tim


On 12 Nov 2009, at 09:04, Neil.Lv wrote:

> 
> Hi all,
> 
>  How to Embed the flash dynamic in Snippet in the Lift?
> 
>  I use the swfobject to embed my flash and want to specify the
> flashVar dynamic, but this is doesn't work!
> 
>  Here is the code in the Snippet:
> 
>  The flashSrc  can shown correctly in the index page, but the
> falshvar doesn't work!
> 
> ###
>  var flashSrc = "/flash/test.swf"
>  var flashVar = "{name1=hello&name2=world&name3=foobar}"
>  def initFlash(in: NodeSeq) : NodeSeq = {
>       bind("init", in,
>       "flash" -> Text("swfobject.embedSWF('" + {flashSrc} + "',
> 'myContent', '300', '120', '9.0.0', 'expressInstall.swf', '" +
> {flashVar} + "');")
>       )
>  }
> ###
> 
>  Any help would be much appreciated!
> 
> Cheers,
>  Neil
> > 
> 


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to