We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I have a SWF that tries loading something from the server but needs a param with a relative path to load from, something I'd pass as:
<param name="base" value="/my/relative/path/data.txt" />
Without this parameter it will always try loading from the browser URL, eg: https://www.example.com/play-game/my-game-name,
https://www.example.com/play-game/my-game-name
... despite the SWF being at /my/relative/path/.
/my/relative/path/
My code:
<script src="/awayfl/loader.js"></script> <script> const config = { width: 800, height: 600, splash: '/awayfl/splash.png', progress: { // optional back: 'cover url(/awayfl/progressBack.png)', line: #cc0022, // or image, it will passed to progressLine background, rect: [0, 0.9, 1, 0.1] // x, y, width, height of preogress line relative contianer }, baseUrl: '/awayfl/', runtime: ['/awayfl/runtime.js'], binary: [{ path: '/my/relative/path/example.swf', resourceType: 'GAME', name: 'Game', // not used atm meta: {} // not used atm }], }; //window.addEventListener("load", () => { AWAYFL.LegacyLoader.init(config); AWAYFL.LegacyLoader.runGame((fill) => { window.dispatchEvent(new CustomEvent('awayfl-player-progress', {detail: fill})); }, (config, hideLoader) => { const player = new AWAYFL.Player(document, config); window.dispatchEvent(new CustomEvent('awayfl-player-init', {detail: player})); player .loadAndPlay() .then((_, hide) => { window.dispatchEvent(new CustomEvent('awayfl-player-load')); hide && hide(); }); }); //}); </script>
Now this is just an example of a parameter, I understand there are redirects we can use for this particular situation.
How about other parameters that configure the asset?
How do I pass parameters to SWF files?
The text was updated successfully, but these errors were encountered:
No branches or pull requests
I have a SWF that tries loading something from the server but needs a param with a relative path to load from, something I'd pass as:
<param name="base" value="/my/relative/path/data.txt" />
Without this parameter it will always try loading from the browser URL, eg:
https://www.example.com/play-game/my-game-name
,... despite the SWF being at
/my/relative/path/
.My code:
Now this is just an example of a parameter, I understand there are redirects we can use for this particular situation.
How about other parameters that configure the asset?
How do I pass parameters to SWF files?
The text was updated successfully, but these errors were encountered: