Axure API and javascript in Axure 10?



Hi all,
I’ve been trying to learn how to use some javascript in my prototypes, but I’m having a bit of trouble getting it to work the way I was expecting. I can get some simple expressions to execute, but I’m not having a lot of luck getting functions I could reuse or understanding how to reference all properties.

The best I could find was this post on using fonts to inject javascript, but I haven’t been very successful getting it to work…not sure if in the years since this was written things have changed? I can mostly follow it, but there are some gaps I am unable to bridge like, where /how would I define my own function. and how/when to reference it.
I’ve also read about Plug-in options in axshare, which also seem to lack good documentation on how to use it, but I was hoping to keep it local as it seems a pain to debug something if I’m always needing to make changes then upload my lastest file and also have a webpage open where I am also making edits and trying to keep them synced up when trying to get something working.

He also has this reference to API variables, which is very comprehensive, many work, but wondering if there is anything official like this for the latest Axure 10?


I’ve had pretty good luck with setting the text of a hidden text object with my script, then use the onload event to append the contents to the object itself (although you can place it anywhere). However, I use a separate editor to maintain the script because Axure will continuously try to fix your quotation marks as. you type.
EmbedScript.rp (47.5 KB)


For anyone seeing this in the future, that link is dead but here’s the archived version on wayback machine.

I came across jsbox recently, it’s a javascript editor inside of Axure itself. I think it solves that quotation mark issue. It includes a library called axlib which I believe is an implementation of the API described in that wiki link