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

Embedded SWF doesn't load local json

Explorer ,
Nov 24, 2016 Nov 24, 2016

Copy link to clipboard

Copied

Hi there!

I have a SWF file that reads data from a JSON file located in a child folder called 'data'.

Everything works fine when I run the SWF from within Animate IDE or when I run the exported SWF.

But when the SWF is running from the HTML created by Animate itself, the SWF isn't able to read any data from the JSON file.

Does anyone know how to fix it?

Thanks!

TOPICS
ActionScript

Views

910

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

correct answers 1 Correct answer

Community Expert , Nov 25, 2016 Nov 25, 2016

upload your files to a file server and post the url to the embedding html.

Votes

Translate

Translate
Community Expert ,
Nov 24, 2016 Nov 24, 2016

Copy link to clipboard

Copied

your path should be relative to the html file, not the swf.

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
Explorer ,
Nov 24, 2016 Nov 24, 2016

Copy link to clipboard

Copied

Thanks for the answer.

But both the SWF and the HTML files are located within the same folder.

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 ,
Nov 24, 2016 Nov 24, 2016

Copy link to clipboard

Copied

post a link to your embedding url.

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
Explorer ,
Nov 24, 2016 Nov 24, 2016

Copy link to clipboard

Copied

Hi there! I made an image so it's better to understand.

All files are offline in my hard drive. I need to send the .html for my client for approval.

And it's funny because I'm loading external MP3 files and they run normally.

json.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 ,
Nov 24, 2016 Nov 24, 2016

Copy link to clipboard

Copied

try:

"./data/quiz.json"

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
Explorer ,
Nov 24, 2016 Nov 24, 2016

Copy link to clipboard

Copied

It didn't work.

I don't understand how it can load the mp3 files but it can't load the json files.

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
Explorer ,
Nov 25, 2016 Nov 25, 2016

Copy link to clipboard

Copied

Somebody else?

I really need to solve this ASAP.

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 ,
Nov 25, 2016 Nov 25, 2016

Copy link to clipboard

Copied

what makes you think it's not loading?

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
Explorer ,
Nov 25, 2016 Nov 25, 2016

Copy link to clipboard

Copied

Because there's a quiz game that doesn't show the questions when I run the SWF embbed but when I run the SWF alone the quiz works normally.

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 ,
Nov 25, 2016 Nov 25, 2016

Copy link to clipboard

Copied

upload your files to a file server and post the url to the embedding html.

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
Explorer ,
Nov 25, 2016 Nov 25, 2016

Copy link to clipboard

Copied

That's it!

When I tried to run the .html from an online server, everything worked!

Thanks a lot!!!

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 ,
Nov 26, 2016 Nov 26, 2016

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