Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

JS file in flash

Status
Not open for further replies.

mike314

Programmer
Jun 24, 2003
143
US
Quick one here, is there a way to include a javascript file in actionscripts and use that function in actionscripts??

<script language="javascript" src="myjsfile.js"></script>

are their any special formats I have to add??

thanks
 
<script> is a HTML tag, you can't use it in ActionScript.

However you can use external scripts in ActionScript in pretty much the same way:
[tt]
#include "myASFile.as"
[/tt]
Having said that it's an AS1 methodology. In AS2 you should use external classes with "import".

Kenneth Kawamoto
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top