| View previous topic :: View next topic |
| Author |
Message |
npsari
Joined: 08 Mar 2007 Posts: 15 Location: England
|
Posted: Sat Mar 10, 2007 12:31 am Post subject: How do i put the javascript |
|
|
In the Flash I am doing...
It allows me to put a Javascript part
So, I typed this one :
<script language="JavaScript">
document.write('<IMG src="http://www.example.com/pic.jpg"');
</script>
Is that the right format to type in the Javascript?
Because the flash does not show the image at all |
|
| Back to top |
|
 |
|
|
doctordigital84
Joined: 06 Apr 2007 Posts: 12
|
Posted: Fri Apr 06, 2007 3:27 am Post subject: Re: How do i put the javascript |
|
|
| nope. i dont even think you can run javascript in flash. look for "actionscript" image loaders |
|
| Back to top |
|
 |
siege
Joined: 21 Apr 2007 Posts: 31
|
Posted: Tue May 01, 2007 12:41 am Post subject: Re: How do i put the javascript |
|
|
there are a few ways to communicate with external scripts. Look in the help menu for external communication/ or communicating with JS. An easy to access your JS from flash is to put the JS in a function in the
| Code: |
<head> function imgWriter(myReallyCoolHref)
{
document.write('<IMG src=myReallyCoolHref');
}</head> |
of your html. Then in flash call it from a button; passing the argument/s. For example:
| Code: |
| my_btn.onPress=function(){getURL("javascript:imgWriter('"http://www.example.com/pic.jpg"');} |
|
|
| Back to top |
|
 |
|