dark13 Posted November 29, 2022 Posted November 29, 2022 In HS if you try to use a fullscreen animated swf background inside a theme it will tends to stop. Here's a workaround to have an endless looping .swf background inside a theme without continously reloading it. It will scroll even when you are moving the wheel. Basically Background.swf loads C:/HyperSpin_1.5.1/dark13/Shared Components/BackgroundLoop.swf , here's the code. You can change the path of the file inside the .fla and create a new file that reads a different path. No animated .swf included, just create a 1024*768 animated background and test it. Use Background.swf inside a theme. var bk_request:URLRequest = new URLRequest('C:/HyperSpin_1.5.1/dark13/Shared Components/BackgroundLoop.swf'); var bk_loader:Loader = new Loader(); bk_loader.contentLoaderInfo.addEventListener(Event.COMPLETE, bk_Loaded); bk_loader.load(bk_request); function bk_Loaded(e:Event): void { bk_loader.removeEventListener(Event.COMPLETE, bk_Loaded) ; bk_loader.width = 1024; bk_loader.height = 768; addChild(bk_loader); } The download contains also CPUGuard.swf and CPUGuard.fla. A fullscreeen .swf is quite demanding (I tested with a 120frames 1080p .swf) and as far as I've seen with these stuff HS uses CPU time even when it's hidden and an emulator is running. This is not good. CPU guard will set the framerate of HS to 1fps when it goes off focus and will change it back to 60fps when it regain focus. If you notice problems with CPU use when running an emulator just use CPUGuard.swf as Artwork1.swf, SpecialA1.swf or whatever else inside the theme. It will prevent HS using too much CPU time when you are playing games. The code for CPUGuard stage.addEventListener( Event.DEACTIVATE, deactivateCb, false, 0, true ); stage.addEventListener( Event.ACTIVATE, activateCb, false, 0, true ); function deactivateCb(e:Event):void{ stage.frameRate = 1 } function activateCb(e:Event):void{ stage.frameRate = 60 } Just an example of the thing, this skin is running a 130mb scrolling background with a rotating earth .swf inside the theme (and some other stuff lol) . Honestly I can add portable code to the thing to get HS path and make it portable but at this point SSDs are cheap enough to contain an HyperSpin/RocketLauncher install and using less code is always better, so just use HS/RL on your C drive and put roms and video on external storage DefaultBK loop.zip Automatizing infopanels creation from .csv files for HTPCs themes (look at infopanel tutorial.zip on the ftp in dark13 folder) PNGs to SWFs automatized flash scripts Hyperspin Wheelset automatized template (photoshop's variables + batch) Aeon nox 4.13 W.I.P. hyperspin skin
md_max Posted November 29, 2022 Posted November 29, 2022 Hi dark13, Thank you for sharing your work with us. Rocket Launcher writes statistics, but we don't use it. I have an idea I want to make the system selection screen show the last running game. All this is stored in the RocketLauncher\Data\Statistics ini files. Here's how to make swf read the name of the game and display it on the screen? You can try to modify MainTimeline.as - a running line, but I don't have enough knowledge how to make a certain line read, and even in the ini? Google Drive HyperSpin
Recommended Posts
Archived
This topic is now archived and is closed to further replies.