ID:1879149
 
Applies to:Dream Seeker
Status: Open

Issue hasn't been assigned a status value.
I have recently been experimenting with trying to utilize external script files inside a '.dms' file for utilization inside the webclient. However, I have noticed they fail to load properly (both remotely and locally, even when inside the '.rsc' file). Due to that, I was unable to use any objects provided by the external script files.

Not sure if it's a bug, but I thought I would file a feature request if such a feature doesn't exist. If it is a bug though, feel free to move it to the Bug Reports category.

Reason for this feature request is because I was experimenting with an interesting library that I can't use unless I embed the code directly inside the '.dms' file.
Hmm. Loading external JavaScript shouldn't really be a problem for .dms files; I'm pretty sure I've seen it done. As I recall Doohl used external JS in one of his controls.

What may be an issue however is tracking when the external scripts have loaded. If you were counting on synchronous loading, that would fail. (I add some ability to delay control startup if a needed lib isn't ready.)
Ah, alright. I was wondering about that. Let me try putting it in a control then. I'll give a result when I have it tested in a control.

I originally had it tested in a 'head' tag. It might help to store it in a control.
It might still load from within a control, but it won't load synchronously.
I have now just figured out how to access external scripts. I just needed to establish it outside of any BYOND Class (kind of like a global script).

You're right, it doesn't load right at all when trying to do it through a class or control. Only way to load it is globally.