• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Upload JavaScript File to HTML Webpage

Community Beginner ,
Jan 22, 2021 Jan 22, 2021

Copy link to clipboard

Copied

Hey guys,

I am taking a course and my instructor wants me to export my interactive Animate .fla file as an HTML5 output and upload it to my HTML website (totally coded from scratch, not a Wordpress site or anything like that). So I have published the file as JavaScript/HTML and it tells me it's a JavaScript file now (.js file extention). I have no idea how to do this and he is not helpful in the least. Could someone please explain or at least direct me to the right place where I might learn how to do this?

 

Thanks 💚

TOPICS
How to , Import and export

Views

255

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jan 22, 2021 Jan 22, 2021

Copy link to clipboard

Copied

Publishing with HTML and JS combined produces an HTML file, not a JS file.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Jan 22, 2021 Jan 22, 2021

Copy link to clipboard

Copied

Ok. I'm so confused haha 😂

This is how the published file looks: 

stcecilia_0-1611335667119.png

and if you right click and go to properties it says:

stcecilia_1-1611335689415.png

 

 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jan 22, 2021 Jan 22, 2021

Copy link to clipboard

Copied

in the animate publish settings, by default you publish a html file (something.html) and javascript file (something.js) and possibly an images folder with bitmaps.

 

you can change the publish settings to include the js file in the html file (so you have an html file that contains javascript).

 

in either case, you should create a new directory and save your fla there and then publish to the default directory (which will be that new directory).  everything in that new directory (other than the fla) would need to be uploaded to a file server for you and others to test your product in their browser.

 

 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Jan 22, 2021 Jan 22, 2021

Copy link to clipboard

Copied

Oh I didn't know that. I fixed those settings in the Publish window and got as far as publishing the file to my computer but I'm still lost on how to actually upload it. I'm using my own web hosting and I can upload files directly through my web browser. What do I upload and how do I then link it into my page? Does the .fla file need to be on the server? 

I've created a directory with a dedicated "Scripts" file in which I put my HTML and .js files and the image file as well, but I don't know how to link it into my html page. 

I'm sorry if that doesn't make sense I have absolutely no idea what's going on and this is all super confusing to me. Before last week I had not even used Adobe Animate and I have no idea how JavaScript works. I'm feeling really lost. Thank you so much for your help ❤️

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jan 22, 2021 Jan 22, 2021

Copy link to clipboard

Copied

 everything in that new directory (other than the fla) would need to be uploaded to a file server for you and others to test your product in their browser.

 

if your website's domain name is kglad.com, and you wanted this project to open in user's browsers when they visit kglad.com, you would change your animate publish settings to publish index.html.  by default, when no file is specified in a link/url, browser's look for one named index.html.  ie, if you click http://www.kglad.com you'll see the kglad.com index.html file display in your browser. 

 

likewise with everyone else's site.  you're looking at the index.html (with rare exceptions) when no file name is specified in a url/link.

 

if you wanted your project to open in a subdirectly of your domain, you would create a directory (eg, myproject  - scripts is not a good name choice for that) and upload your project files.  if they were name project1.html, you would direct your browser to:

 

http://www.kglad.com/myproject/project1.html

 

(i have no such directory or html so that look should lead to a 404 error page.)

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Jan 22, 2021 Jan 22, 2021

Copy link to clipboard

Copied

It worked!!! Thank you so so so much! Ohmygoodness!! You have no idea how long I've been stuck on this I wish I had come on the forums sooner :') Thank you. This helps me immensely. I really really appreciate it ❤️ 

I'll make sure to give my project files better names in the future haha. Thank you for pointing that out! 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jan 22, 2021 Jan 22, 2021

Copy link to clipboard

Copied

LATEST

you're welcome.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines