Run any SWF from icon + close btn - stock OS

General discussion relating to the O2 Joggler, from the default O2 setup, to alternative operating systems and applications.
Post Reply
Roderz
Posts: 16
Joined: Wed Nov 16, 2011 12:22 am

Run any SWF from icon + close btn - stock OS

Post by Roderz »

Just thought I'd share a bit of info I been using for a while (well since finding the swf launcher last year)

Found a way of running any SWF from an icon (local & remote) - without having to go into swf-launcher 1st.

This is useful if you use a particular swf regularly and more user friendly as using the swf launcher, the URL addresses can not be seen properly most of the time.

This method does rely on having swf-launcher installed via gforums PnP in the 1st place http://www.gforums.de/juggler/

Right then lets do some stuff - the app I find useful in the kitchen is the stopwatch/countdown timer swf, so I will use that as an example. (this runs the file locally from the internal memory)

1st off telnet in to the joggler as normal, then copy and paste the code below

Code: Select all

cd /media/gforums/webserver/starter
wget http://www.roderz.pwp.blueyonder.co.uk/timer.tgz
tar xvf timer.tgz
rm timer.tgz
once done change directory

Code: Select all

cd /media/appshop
and edit the file applications.xml and insert the following line

Code: Select all

<app id="timer" loc="http://localhost:80/starter/timer/" app="timer.cgi" title="timer" icon="icon.swf"/>
Restart tango and you should have a nice stopwatch icon that will launch the timer and add an exit button in the top left.
If you want to make the exit button bigger then edit the file /media/squeezingtarkan/app/flashapp.sh and change two numbers in the last line - set mine on 40 for convenience


Another example that runs a file from the interweb - Rainbow riches fruit machine

Code: Select all

cd /media/gforums/webserver/starter
wget http://www.roderz.pwp.blueyonder.co.uk/rainbow.tgz
tar xvf rainbow.tgz
rm rainbow.tgz
once done change directory

Code: Select all

cd /media/appshop
and edit the file applications.xml and insert the following line

Code: Select all

<app id="rainbow" loc="http://localhost:80/starter/rainbow/" app="rainbow.cgi" title="rainbow" icon="icon.swf"/>
Restart tango and look for the leprechaun !!

Feel free to have a look and make your own
How it works:
All this does is use the command line of the swf-launcher program by passing it the location of the swf - but saves opening the swf-launcher itself.
BUT I found that the location sent has to be a 'http' address for the exit button to work (hence why I used 'localhost' in the timer.cgi script)
timer script looks like this

Code: Select all

/media/squeezingtarkan/app/flashapp.sh http://localhost:80/starter/timer/main.swf
And fruit machine script is......

Code: Select all

/media/squeezingtarkan/app/flashapp.sh http://homepage.ntlworld.com/macker25/elvis/RR%20and%20Elvis/Rainbow_Riches.swf
Only danger with calling a file from the net is that it could vanish if its not on your own server (hint hint - use your own and save filling up the jogglers memory) oh and it can be slower to load sometimes depending to the speed of the site

Hope someone finds this useful, please post any comments or any useful swf's you find.

Have fun
gegs
Posts: 1146
Joined: Fri Mar 04, 2011 3:22 pm
Location: Edinburgh

Re: Run any SWF from icon + close btn - stock OS

Post by gegs »

This is a really useful idea. It's difficult sometimes to know what's being launched by swf launcher because of the truncated URLs.

I did have a copy of my url.txt file on 4shared.com but they seem to have removed it. I think I'll copy it to the forum so that it doesn't disappear again. It has lots of Flash games on it, but it's fairly old now so worth checking that the URLs work before trying to create buttons.
Roderz
Posts: 16
Joined: Wed Nov 16, 2011 12:22 am

Re: Run any SWF from icon + close btn - stock OS

Post by Roderz »

gegs wrote: so worth checking that the URLs work before trying to create buttons.
I have a 'test' directory set up for this - all that's needed to try something out is to change the last part of the command in the script (in red below) - very quick and easy,
/media/squeezingtarkan/app/flashapp.sh http://homepage.ntlworld.com/macker25/e ... Riches.swf
gegs
Posts: 1146
Joined: Fri Mar 04, 2011 3:22 pm
Location: Edinburgh

Re: Run any SWF from icon + close btn - stock OS

Post by gegs »

Sorry it's taken me so long but here is my url.txt file with lots of games, and one or two apps, that you can try out. Don't blame me for what it contains. They're mostly chosen by my kids.
It's quite old now and you can probably omit the BBC channels; when I created the file they were the smoothest feeds, but spoyser's excellent iPlayer app has made their SWF Manager listing redundant.

Code: Select all

http://www.bbc.co.uk/emp/10player.swf?playlist=http://www.bbc.co.uk/emp/simulcast/bbc_one_london.xml&config_settings_autoPlay=true
http://www.bbc.co.uk/emp/10player.swf?playlist=http://www.bbc.co.uk/emp/simulcast/bbc_two_england.xml&config_settings_autoPlay=true
http://www.bbc.co.uk/emp/10player.swf?playlist=http://www.bbc.co.uk/emp/simulcast/bbc_three.xml&config_settings_autoPlay=true
http://www.bbc.co.uk/emp/10player.swf?playlist=http://www.bbc.co.uk/emp/simulcast/bbc_four.xml&config_settings_autoPlay=true
http://www.bbc.co.uk/emp/10player.swf?playlist=http://www.bbc.co.uk/emp/simulcast/bbc_news24.xml&config_settings_autoPlay=true
http://www.bbc.co.uk/emp/10player.swf?playlist=http://www.bbc.co.uk/emp/simulcast/cbbc.xml&config_settings_autoPlay=true&height=460
http://www.bbc.co.uk/emp/10player.swf?playlist=http://www.bbc.co.uk/emp/simulcast/cbeebies.xml&config_settings_autoPlay=true&height=460
http://www.newflashgames.net/flash/games/angry-birds/Angry-Birds-last-finish_do.swf
http://clock.lookatjack.com/colourClock.swf
http://www.online-stopwatch.com/online-stopwatch.swf
http://www.poodwaddle.com/worldclock.swf
http://www.flashearth.com/flashearth.swf
http://www.minigameroom.com/games/files/crush-the-castle-2.swf
http://a.gamedoss.net/x/animalshelter/animalshelter.swf
http://a.gamedoss.net/x/experimentsontheloose/experimentsontheloose.swf
http://a.gamedoss.net/x/anikasodyssey/anikasodyssey.swf
http://a.gamedoss.net/x/paperventure/paperventure.swf
http://a.gamedoss.net/x/constructionfall/constructionfall.swf
http://a.gamedoss.net/x/magnettowers/magnettowers.swf
http://a.gamedoss.net/x/chocolateshopfrenzy/chocolateshopfrenzy.swf
http://a.gamedoss.net/x/hoshisaga/hoshisaga/game.swf
http://a.gamedoss.net/x/thegreathouseescape/thegreathouseescape.swf
http://a.gamedoss.net/x/davincicannon/davincicannon.swf
http://a.gamedoss.net/x/personalshopper/personalshopper.swf
http://a.gamedoss.net/x/girlfashion/girlfashion.swf
http://a.gamedoss.net/x/petgroomingstudio/petgroomingstudio.swf
http://a.gamedoss.net/x/sashashealthspa/sashashealthspa.swf
http://a.gamedoss.net/x/sling/sling.swf
http://a.gamedoss.net/x/penguindiner/penguindiner.swf
http://a.gamedoss.net/x/fashionstar/fashionstar.swf
http://a.gamedoss.net/x/rollercoastercreator/rollercoastercreator.swf
http://a.gamedoss.net/x/woobies/woobies.swf
http://a.gamedoss.net/x/elevatorrush/elevatorrush.swf
http://a.gamedoss.net/x/moviestar/moviestar.swf
http://a.gamedoss.net/x/meeblings/meeblingsx.shockwave.com.swf
http://a.gamedoss.net/x/ecoego/ecoego.swf
http://a.gamedoss.net/x/momentummaster/momentummaster.swf
http://a.gamedoss.net/x/waketheroyalty/waketheroyalty.swf
http://a.gamedoss.net/x/ragdollcannonremake/ragdollcannonremake.swf
http://a.gamedoss.net/x/burgertycoon/burgertycoon.swf
http://a.gamedoss.net/x/avatarfortressfight/avatarfortressfight.swf
http://a.gamedoss.net/x/baseball/baseball.swf
http://a.gamedoss.net/x/earlgrey/earlgrey.swf
http://a.gamedoss.net/x/demolitioncity/demolitioncity.swf
http://a.gamedoss.net/x/medievalgunpowder/medievalgunpowder.swf
http://a.gamedoss.net/x/samispetcare/samispetcare.swf
http://a.gamedoss.net/x/superbabysitter/superbabysitter.swf
http://a.gamedoss.net/x/swapjob/swapjob.swf
http://a.gamedoss.net/x/crazypool/crazypool.swf
http://a.gamedoss.net/x/ancientjewels/ancientjewels.swf
http://a.gamedoss.net/x/mysticemporium/mysticemporium.swf
http://a.gamedoss.net/x/dreampetlink/dreampetlink.swf
http://a.gamedoss.net/x/warfare1917/warfare1917.armorgames.comquick.swf
http://a.gamedoss.net/x/amateursurgeon/amateursurgeon.swf
http://a.gamedoss.net/x/crushthecastle/crushthecastle.swf
http://www.gamesfeast.com/content/games/Katy-Perry.swf
http://www.addictinggames.com/D78AQSAKQLQWI9/5913.swf
http://widro.com/throwpaper.swf
http://armorgames.com/files/games/crush-the-castle-2-6137.swf
http://www.365flashgame.com/swf/Sports/airhockey.swf
http://games.mochiads.com/c/g/bloons/bloons.swf
http://www.binballwizard.com/shell.swf
http://edmullen.net/flash/clock1.swf
http://edmullen.net/flash/flip_clock_black_12.swf
http://edmullen.net/flash/clock11.swf
http://flash-clocks.com/free-flash-clocks-blog-topics/free-flash-clock-175.swf
http://flash-clocks.com/free-flash-clocks-blog-topics/free-flash-clock-35.swf
http://www.nikolaus-baumgarten.de/zoomquilt/zoomquilt.swf
http://uploads.ungrounded.net/525000/525347_scale_of_universe_ng.swf
http://www.games1.org/games/linerider.swf
http://games.racing-games.com/gameslist/files/1/Ball-Gown-2-Dress-Up.swf
http://www.gamehopper.net/content/games/Barbie-Night-Gowns.swf
http://milkshakecdn.five.tv/assets/flash/000/000/057/dressup.swf
http://acecardgames.com/Solitaire.swf
http://www.avnoy.com/alarm/flash.swf
http://www.lilgames.com/games/strategy/sd.swf
http://www.proprofs.com/games/swf/puzzles/rubik-s-cube.swf
http://www.swf-games.co.uk/files/file/YetiSports1PinguThrow_v32.swf
http://arcadengine.com/swf/game_3397.swf
http://www.300.ge/swf/YetiSports5FlamingoDrive.swf
http://player.youku.com/player.php/sid/XMTkzNDg1ODcy/v.swf
http://player.youku.com/player.php/sid/XMTM2MjM2Mzcy/v.swf
http://player.youku.com/player.php/sid/XMTkzNjE2Mzg0/v.swf
http://player.youku.com/player.php/sid/XMTU0MzM5NDAw/v.swf
http://player.youku.com/player.php/sid/XMTUxMzA1NzA4/v.swf
http://player.youku.com/player.php/sid/XMTg2MDgyNjQ0/v.swf
User avatar
offbeatdave
Posts: 1050
Joined: Wed Mar 09, 2011 10:43 pm

Re: Run any SWF from icon + close btn - stock OS

Post by offbeatdave »

Cool! Looking forward to trying this when I get a chance. Up to now I edited the swf of a timer to add a close button but this looks like being a much more straightforward way of doing it!
"EVERY DAY I'M JOGGLERING!"
Jogglering since Dec '09;
Tinkering with Jogglers since Feb '10 thanks to PMJ, Jogtools, PnP & sqpOS;
Gave something back Feb '12 to Apr '14 with PnP Mk II & PnP III;
Finally 'completed' PnP III Apr '15!
User avatar
offbeatdave
Posts: 1050
Joined: Wed Mar 09, 2011 10:43 pm

Re: Run any SWF from icon + close btn - stock OS

Post by offbeatdave »

Well, only 2 months after my last post in this thread and I've finally got round to trying this out.

When I arrived home just now the boy was playing Crush the Castle on the PC so I thought I'd have a go at getting it on the Joggler nearby. No problems at all!

Downloaded the swf from www.physicsgames.net/swf/crushthecastle.swf, set it up in a directory, added the line in applications.xml and away we went! Icon is now made and the job's a good 'un. Ta for the info!
"EVERY DAY I'M JOGGLERING!"
Jogglering since Dec '09;
Tinkering with Jogglers since Feb '10 thanks to PMJ, Jogtools, PnP & sqpOS;
Gave something back Feb '12 to Apr '14 with PnP Mk II & PnP III;
Finally 'completed' PnP III Apr '15!
User avatar
hawsey
Posts: 2077
Joined: Sun May 22, 2011 11:23 pm
Location: Northumberland

Re: Run any SWF from icon + close btn - stock OS

Post by hawsey »

http://gprime.net/game/
Found this SWF site by accident!!
How would you go about adding a game to the PNP mk2 tool? Any ideas, or how would you use pnp mk2 to add a game?
I know the launcher is there but am a bit clueless here lol
Thx
Happy Joggling
User avatar
offbeatdave
Posts: 1050
Joined: Wed Mar 09, 2011 10:43 pm

Re: Run any SWF from icon + close btn - stock OS

Post by offbeatdave »

hawsey wrote:http://gprime.net/game/
Found this SWF site by accident!!
How would you go about adding a game to the PNP mk2 tool? Any ideas, or how would you use pnp mk2 to add a game?
I know the launcher is there but am a bit clueless here lol
Thx
Not by a Joggler at the moment, but PnP Mk II installs the extra games to their own folder in /media/gforums/webserver/starter. In the directory is:
-swf file
-icon (I use the png format)
-language.xml file which has the game name in it such as

Code: Select all

<copy>
     <mm  en="Baseball"/>
</copy>
-.cgi script like this

Code: Select all

#!/bin/sh
/media/squeezingtarkan/app/flashapp.sh http://localhost:80/starter/baseball/baseball.swf
In the media/appshop/applications.xml file there is a line like

Code: Select all

<app id="baseball" loc="http://localhost:80/starter/baseball/" app="baseball.cgi" title="baseball" icon="baseball.png"/>
to add the icon to the Joggler screen.

Something like that anyway!

Big thanks to Roderz for highlighting this. Ages ago I spent hours figuring out how to add a close button to the online-stopwatch timers so I could use them from an icon. This system however, makes it soooo easy to add compatible swf stuff to the stock OS.
"EVERY DAY I'M JOGGLERING!"
Jogglering since Dec '09;
Tinkering with Jogglers since Feb '10 thanks to PMJ, Jogtools, PnP & sqpOS;
Gave something back Feb '12 to Apr '14 with PnP Mk II & PnP III;
Finally 'completed' PnP III Apr '15!
Post Reply