Skip to main content
Participant
October 13, 2022
Question

Can I embed an HTML Combobox component's JS code into the .FLA's code?

  • October 13, 2022
  • 1 reply
  • 316 views

I may need to have a self-contained HTML file that isn't referencing external files and doesn't require the internet.

 

I have a combobox component in my scalable HTML canvas. The component references external JS files (jquery-3.4.1.min.js); (anwidget.js); and (combobox.js).
Is there any way in which I can copy all of the code from those files and past it into my Flash file's code, while keeping the combobox in working order?

 

Or would I have to edit the published HTML file and replace all references to those external JS files with their actual code? (I've done this with another file using createjs.min.js, but the file didn't have any components)

 

Thanks.

    This topic has been closed for replies.

    1 reply

    kglad
    Community Expert
    Community Expert
    October 13, 2022

    even easier, you can include files using the actions panel

     

     

    Joe_2D3DAuthor
    Participant
    October 13, 2022

    Thank you for the quick reply. I'm a JS novice and am trying to figure things out as I re-create them from AS3.

     

    I have no custom external references.
    The combobox component (widget?) references the external JS files on its own, after publishing to HTML. How would I force it to reference the JS code that I would paste into the Global Scripts panel? There are no built in component parameters available to do so.

    This is the portion of the published HTML where the component references the JS files:
    // library properties:
    lib.properties = {
    id: '',
    width: 1200,
    height: 830,
    fps: 30,
    color: "#FFFFFF",
    opacity: 1.00,
    manifest: [
    {src:"https://code.jquery.com/jquery-3.4.1.min.js?1665679098055", id:"lib/jquery-3.4.1.min.js"},
    {src:"components/sdk/anwidget.js?1665679098055", id:"sdk/anwidget.js"},
    {src:"components/ui/src/combobox.js?1665679098055", id:"an.ComboBox"}
    ],
    preloads: []
    };

     

    The published HTML also references this external JS file, which I'd like to force to use code in the global scripts panel if possible:

    <script src="https://code.createjs.com/1.0.0/createjs.min.js"></script>

    I've previously replaced this line with the actual full code, after publishing the HTML.

    kglad
    Community Expert
    Community Expert
    October 13, 2022

    the component js files are on your computer (after you publish in the relative folders indicated) and the createjs file can be downloaded and saved on your computer.  

     

    you can then include them.