Put dhtml into flash

How to put dhtml scripts into flash?

<script language=“javascript”>

var win = null;
function NewWindow(mypage,myname,w,h,scroll){
LeftPosition = (screen.width) ? (screen.width-w)/2 : 0;
TopPosition = (screen.height) ? (screen.height-h)/2 : 0;
settings =
‘height=’+h+’,width=’+w+’,top=’+TopPosition+’,left=’+LeftPosition+’,scrollbars=’+scroll+’,resizable’
win = window.open(mypage,myname,settings)
}

</script>

----This is for the <head> tags

Then,

<a href=“http://www.XXX.com/xxx.swf” onclick=“NewWindow(this.href,‘name’,‘650’,‘420’,‘yes’);return false”>Click</a>

----This is what I want to put that into the buttons, using javascripts

Is is possible?

Thank you

:pope: :pope: :pope: :pope:
:bad: :bad: :bad: :bad:

oooops…I made a mistake, sorry…
pls ignore the above message.
Just dun click the above “click” will not make me embarass =P

This is for the html head tag,
“var win = null;
function NewWindow(mypage,myname,w,h,scroll){
LeftPosition = (screen.width) ? (screen.width-w)/2 : 0;
TopPosition = (screen.height) ? (screen.height-h)/2 : 0;
settings =
‘height=’+h+’,width=’+w+’,top=’+TopPosition+’,left=’+LeftPosition+’,scrollbars=’+scroll+’,resizable’
win = window.open(mypage,myname,settings)
}”

This is what I want to put into flash buttons, using javascript??

“<a href=“http://www.???.com/???.swf” onclick=“NewWindow(this.href,‘name’,‘650’,‘420’,‘yes’);return false”>Click</a>”

The html source is :

"onclick=“NewWindow(this.href,‘name’,‘650’,‘420’,‘yes’);return false”

want to put this into the flash~~~~~ The above code was hidden
, so I put the quotes.

God…