Hype linking to external folders

I don’t know if this is possible, but it would be great if you could add links to external folders to the Hype resources library.

This wouldn’t need to have the same file tracking functionality that linking an individual resource currently does (i.e. that Hype can detect whether a file within these folders has been edited or not). Just so that in testing and on publishing the Hype project to HTML, the relative paths between Hype and this folder’s contents could be maintained.

Basically, I’m trying to create an educational resource where I’m embedding an already built HTML/Javascript widget in my Hype project which has its own folder/file structure. I can embed it fine if I give a relative path to the embedded object within Hype, i.e create an empty rectangle on the stage and within it put the code:

<object width="1024px" height="768px" data="my_widget_folder/widget1.html"></object>

Then export to HTML and place ‘my_widget_folder’ with all its sub folders and javascript etc in the same root folder as the exported Hype html file (and hype resources folder). When I run the html file, the exported Hype Html project finds the folder and everything works fine.

Obviously, however, Hype can’t see this folder while I’m developing the app, as anything other than a file within Hype’s own hypeDocument.resourcesFolderURL(), or a static online URL won’t be seen when previewing the project in a browser.

Basically, it’d be great if, within the app, or Javascript functions within the app, you could specify extra Hype variables that represent external folders which form part of your project (but are separate) like:
which would link to a folder on your machine for testing, and on publishing your Hype project to HTML, create a copy of this folder as it stands within your Hype root directory so that the relative paths remained the same.

I don’t know how useful this might be to other users, but it would certainly save picking apart all the code for the external widget and its related CSS/Javascript, changing all the relative paths in the code so that it all works within one flattened folder structure, and then importing all those files to the Hype resources folder so that they work internally.

Does this make any sense?

Thanks in advance

1 Like

Makes complete sense, thanks for the request! There’s a little bit that is at odds with how sandboxing for macOS apps work, but I think there might be a few different solutions to the problem that could get the job done.

Thanks for the reply Jonathan.

Yeah - like all these things it’s probably not a massively important request (just something that I noticed would make my own workflow easier!)

BTW, I’ve got to say how useful I find Hype. The way I use Hype in my day-to-day work is primarily as a CSS/HTML 5 layout aid, ignoring the timeline and just getting elements to screen quickly so that I can see how browser resizes and the like affect the layout without having to sweat with too much extra CSS. Great having the integration with the iOS app, too.

Having said that, as an ex-Flash user, I’m looking forward to playing around with the timeline more to see how I might integrate this more in my workflow.

So glad to hear that :slight_smile:. I’d of course appreciate if you could help spread the word!