Script Summary: A script that enables a person to add JS-flash interacting code to a GUI
Version: 0.5
FlashJS GUI by Frank Braucci is licensed under a
Creative Commons Attribution-Noncommercial 3.0 United States License.

Multi-Script Friendly
Reusable Code
If you like my script, it'd be great if you could donate, any amount will do, even just a dollar.
See a working version here
Description

This is a script i made that allows a person to add javascript-based interactions with Flash files into a nice clean GUI. With a bit of reading this is very handy tool for more than just cheats.
NOTE: I will not tell you how to get variables from games to manipulate them.
I will only provide help if you hard having trouble getting the script itself to work.
Features:
-Floating div element as Cheat Menu
-Everything is customizable.
-Integrated Find embeds script to help users find embed number of desired flash file
-Premade template for javascript-flash interaction code
-Extensible code
Usage
Youtube: Configuration Overview
As of version 0.4 there have been a number of changes you should be aware of. Please read this section.
There's a LOT of documentation in the script code itself, that's a good spot to start. But there are some things i need to point out.
Functionality
Because the user is allowed to input their own embed ID if you're using:
document.embeds[x].SetVariable method
["javascript:document.embeds[0].SetVariable('var', value);"]
This won't work.
You have to use this instead:
["javascript:document.embeds["+embedNum.value+"].SetVariable('var', value);"]
As of version 0.5 you can now, optionally, replace the "document.embeds["+EmbedNum.value+"]" method with docEmbeds
Example:
["javascript:"+docEmbeds+"SetVariable('var', value);"]Where do i add this code at?
Starting at line 65 you there's an array present:
// place to enter javascript-flash interaction...
/* Format to use document.embeds[0].SetVariable:
document.embeds["+embedNum.value+"].SetVariable('variable',value);
*/
var cheats = [
["javascript:alert('JS Hack data goes here here!');"],
["javascript:alert('JS Hack data goes here here!');"],
["javascript:alert('JS Hack data goes here here!');"],
["javascript:alert('JS Hack data goes here here!');"]
];
this currently allows 4 different cheat codes. You can add more cheats available by adding a new line:
["more code here"],
Be aware the last line of the array can not have a
, comma at the end.
You can also remove a cheat code by removing a line from the array.
However, this is not the only thing you have to do to remove or add cheats.
How do i add or remove available cheats?
You have to first goto line 53 where you'll see:
Note: this is what the end-user will see when they use the gui.
var cheatName = [ ['Cheat Name 1'], ['Cheat Name 2'], ['Cheat Name 3'], ['Cheat Name 4'] ];
Just add or remove the items from the array. Remember comma placement at the end of all entries except last.
Starting at line 138 you'll see // ---- Cheats ----. Underneath that you'll see copies of something like:
var newCheat = document.createElement("a");
newCheat.setAttribute("href", "#");
// change the 'x' in cheatName[x] to proper array number from Global Variable
newCheat.innerHTML = cheatName[x];
newCheat.addEventListener('click',function()
{
// Change the '0' in cheats[x] to proper array number from global variable
embedSet(cheats[0]);
},false);
cheatMenu.appendChild(newCheat);
cheatMenu.appendChild(document.createTextNode(' | '));
Add or remove these to create new cheats. Be sure to read the comments within this... it's very important.
Appearance
Where do i change the CheatMenu style?Starting at line 73 you'll see:
// Cheat Menu style // CSS only var cheatMenuCSS = '' +'position:fixed; top: 60px; right: 30px;' +' height: 33%; ' +' z-index: 1; ' +' border:2px solid black; ' +' width: 25%; ' +' background: white; ' +' color: black; padding:19px; -moz-border-radius:4px; -moz-appearance:none; margin-top: 50px; ' +' font-family: courier; ' +' text-align: center ';
You can remove, edit, or add anything you like. Or just leave it as is. Just remember, you must do it in CSS format.
item: value;
How do i change the Cheat menu access link style?
Goto line 83 and you'll see:
var cheatMenuLink = '' +'position:fixed; top: 90px; left: 30px; ' +' z-index: 1; ' +' font-size: 19px; ' +' background-color: red; ' +' font-color: white; ';
Just edit that as you see fit. This is, again, in CSS format.



