A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: importing javascript files

  1. #1
    Junior Member
    Join Date
    May 2005
    Posts
    3

    importing javascript files

    Hi any help here would be great. I was wondering if some one could direct me on how to import some javascript into my fla.

    This is what I would like to bring in

    <script type="text/javascript">var lwmwLinkedBy="LiknoWebModalWindows [1]",lwmwName="quickquotepopup",lwmwBN="250";</script>
    <script charset="UTF-8" src="jscripts/likno-scripts/quickquotepopup.js" type="text/javascript"></script>

    This is what I started with in the actionscript

    ExternalInterface.call("document.getElementsByTagN ame('head')[0].appendChild(document.createElement('script'))");
    ExternalInterface.call("document.getElementsByTagN ame('script')[document.getElementsByTagName('head')[0].getElementsByTagName('script').length-1].setAttribute('type', 'text/javascript')");
    ExternalInterface.call("document.getElementsByTagN ame('script')[document.getElementsByTagName('head')[0].getElementsByTagName('script').length-1].setAttribute('src', 'jscripts/likno-scripts/quickquotepopup.js')");



    button_1.addEventListener(MouseEvent.CLICK, fl_ClickToGoToWebPage_3);

    function fl_ClickToGoToWebPage_3(event:MouseEvent):void
    {
    navigateToURL(new URLRequest("#"), "quick_quote_popup");
    }



    quick_quote_popup piece is the target I have to call to run the script

    Could not wrap my head around how to bring this in

    <script type="text/javascript">var lwmwLinkedBy="LiknoWebModalWindows [1]",lwmwName="quickquotepopup",lwmwBN="250";</script>


    Thanks For Any Help
    howlinhuskie

  2. #2
    Junior Member
    Join Date
    Oct 2012
    Location
    Nintendo Land
    Posts
    15
    Ummm.... In the JavaScripting program you use there is probably a button in the top left that says "FILE" Click it and under it should say Export. So export the project as an external jar file. :-? Sorry if it did not work but that's how I do it with the eclipse JavaScript program.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center