AXMA: Launch an HTML file locally?

I know nobody really uses AXMA, but it has a lot in common with Twine.

I’m trying to launch a local HTML file that resides in the files/Release folder, but I can’t seem to make it work. I can launch an actual website with an http:// link, but that’s not working.

What I have is this, and it doesn’t work.
[[Click Here|File: /files/Release/index.html]]

When I do an actual website, it looks like this:
[[Link Text|]]

These seem to be the relevant documentation references:
Screenshot 2020-03-01 19.14.21 Screenshot 2020-03-01 19.24.48

I’m checking to see if I can even do this at all, but just wanted to check if there’s something obvious I’m missing since it often takes a while to get a response on the dev forum.

1 Like

I’d try removing the slash from the beginning of /files/Release.... That usually signals an absolute path rather than a relative one.

1 Like

Tried that, and I’m getting that the file isn’t found. I am thinking perhaps it doesn’t recognize .html as a “file” type. If I put http:// in front of it, it can’t find it because it’s looking online.

Worst case scenario I’ll host the file online somewhere, but I was hoping to avoid that. Thanks!

And the story file is in the base directory, where the files directory is?

Dunno. I think I have a copy of AXMA, so I’ll take a look in the morning if you haven’t gotten another answer…need to get some sleep now. This is the old AXMA, right? Not the new JavaScript editition?

I know next to nothing about AXMA, so this may be a stupid question, but… Do you have the link in the correct order? Comparing the documentation to your example code, the order is reversed.

Yes, 6.1.

AXMA is closest to original Twine, so it’s [[Click on this.|passage name]], but I will give that a try. Thanks!

Looking at the documentation on the site, it looks like it treats files differently than normal links. Whether embedding or direct linking to them, it wraps them in the square brackets.

Like this: [[ [[File: path/to/image.jpg]] | Link Name]]

As a side note, I’d like to mention the docs for this are incredibly obnoxious to navigate on a phone. Copying text to paste here is literally impossible because of their pop up menu.

I believe that’s the format if you want an image to be clickable, so that’s why it’s reversed.

The documentation is actually done in the game engine which doesn’t allow highlighting. So yeah…obnoxious but sort of makes sense? That’s why I did screen-grabs.

The devs are also Russian but pretty English-fluent. I’m still waiting for the JS manual in English! It’d probably help if I’d just learn javascript…

Oh, that’s interesting. That does make a lot more sense that it acts like that then. I thought they were just being overzealous with the UI. Haha.

What JS manual did you mean? I didn’t see one on the site. Or is it only on the russion site?

I actually like Javascript a lot. It’s not a very popular opinion, but I find it fun to code in. It’s just so mutable and you can do so many crazy things with it that would be really difficult in other languages. :slight_smile:

They have not done an English manual, but the Russian one actually Google translates pretty well…except for the images in the examples!
The EN editor actually does a good job comprehensively inserting templates to do specific things sort of like Inform 7’s IDE, but since I stubbornly refuse to learn JS, I don’t know how to sort out what’s needed and what’s not from what appears in them.

Oh, I see. That’s really interesting. AXMA appears to be the inverse of Twine. Every line is javascript except the ones starting with a \. So yeah, you’re definitely at a disadvantage without knowing JS.

FWIW, it is straight JS and not some weird wannabe syntax, so looking up info will be easy when you’re stuck. I applaud them for attempting to write a tutorial on it when they could have just pointed everyone to w3schools or something. I’m not impressed with them suggesting that you should clog up the window namespace with variables, but that’s beside the point. :stuck_out_tongue:


I know nothing about AXMA, but reading this post it seems kind of similar to things I’ve encountered before while working with other web technology, maybe this will be a lead:
What you’re trying to do might fall under CORS. What this means is that your .html is getting blocked from being loaded by your main page, because the browser thinks it’s coming from a different website. To test this, try putting the .html you want to link in the same folder as whatever your main file is. There would also be an error in the console, if there’s a way to open a console in AXMA.
It really depends on how this is all implemented under the hood. Your best bet is probably to host the file, unfortunately. Other than that, this is the w3schools describing how to open a .html page with Javascript. If this is called without user input, it might cause popup-blockers to fire, though.

(sidenote: I extremely agree about Javascript @tayruh!)


Well, the actual error that I get is Passage "File: files/Release/index.html" not found. So it’s not treating it as a URL, it’s treating it as a passage name. And the documentation (which you copied in your original post) says “The URL should start with http:// or ftp:// accordingly.” So I don’t think there’s any way to do this. :frowning:


Is it possible to just add a normal HTML link to your text instead of using the markup?

This should open the file in a new tab. (Remove the target part if you want it in the same tab).

<a href="files/Release/index.html" target="_blank">Click Here</a>
1 Like