title: ActionScript + JavaScript
body: <p>I'd like to call a JavaScript function from an embedded <code>.swf</code> file. Specifically, I'd like to call a function in one of my externally linked JavaScript files from within:</p>
  <pre class="lang-js prettyprint-override"><code>function loadTrack(){
  
      //Radio Mode feature by nosferathoo, more info in: https://sourceforge.net/tracker/index.php?func=detail&amp;aid=1341940&amp;group_id=128363&amp;atid=711474
  
      if (radio_mode &amp;&amp; track_index == playlist_size - 1) {
          playlist_url=playlist_array[track_index].location;
          for (i=0;i&lt;playlist_mc.track_count;++i) {
              removeMovieClip(playlist_mc.tracks_mc[&quot;track_&quot;+i+&quot;_mc&quot;]);
          }
          playlist_mc.track_count=0;
          playlist_size=0;
          track_index=0;
          autoload=true;
          autoplay=true;
          loadPlaylist();
          return(0);
      }
      start_btn_mc.start_btn._visible = false;
      track_display_mc.display_txt.text = playlist_array[track_index].label;
      
      if (track_display_mc.display_txt._width &gt; track_display_mc.mask_mc._width) {
          track_display_mc.onEnterFrame = scrollTitle;
      }else{
          track_display_mc.onEnterFrame = null;
          track_display_mc.display_txt._x = 0;
      }
      mysound.loadSound(playlist_array[track_index].location,true);
      play_mc.gotoAndStop(2)
  
      //info button
      if(playlist_array[track_index].info!=undefined){
          info_mc._visible = true;
          info_mc.info_btn.onPress = function(){
              getURL(playlist_array[track_index].info,&quot;_blank&quot;)
          }
          info_mc.info_btn.onRollOver = function(){
              track_display_mc.display_txt.text = info_button_text;
          }
          info_mc.info_btn.onRollOut = function(){
              track_display_mc.display_txt.text = playlist_array[track_index].label;
          }
      }else{
          info_mc._visible = false;
      }
      resizeUI();
      _root.onEnterFrame=function(){
          //HACK doesnt need to set the volume at every enterframe
          mysound.setVolume(this.volume_level)
          var load_percent = (mysound.getBytesLoaded()/mysound.getBytesTotal())*100
          track_display_mc.loader_mc.load_bar_mc._xscale = load_percent;
          if(mysound.getBytesLoaded()==mysound.getBytesTotal()){
              //_root.onEnterFrame = null;
          }
      }
  }
  </code></pre>
  <p>which is in an .as file which I assume somehow becomes the swf file. How would I go about this and <code>re-compile</code> the <code>.as</code> file?</p>