You will need: A web browser, Site-hosting (or notepad :P), A Brain, some HTML knowledge(optional) and a variable scanner for as2.
Example of trainer: http://dezladstrainers.webs.com/NinjasVsPirates.htm (It will probably look better than that i have done nothing to the site and made it just under a year ago.)

Step 1) Variables
Scan your flash game/document for variables you want to change or get, Pick out any you want example: 'score' 'level' 'money' 'time' etc...
Note down any you want and note down what they are too (if they have strange names like "fo" or "ge")

Step 2) Introduction to Javascript
If you know most javascript commands you can move on otherwise you will probably need this!
Set Variable:"javascript:document.embeds[0].SetVariable('money', 'Value')"
Get Variable:"javascript:alert(document.embeds[0].GetVariable('money'))"
Alert:"javascript:alert('I like hacking ')


Step 3) Making buttons
As this is a quick tutorial the buttons will be simple (If you have lots of html knowledge you can put it to use making it look fancy if you wish)
so the code we will need is a button: <button></button>
we then add some text to it: <button>Money 1000000</button>
then we can add the javascript code's to an onclick event: <button onclick="javascript:document.embeds[0].SetVariable('money', 1000000)">Money 1000000</button>
now we've done our button/s we can move on.

Step 4) Embedding the game/document
To embed the game/document you need to find the address(URL) of the swf file (use the search for tutorial ^-^) such as: http://randomsite.com/game.swf
then input embed tags: <embed src="http://randomsite.com/game.swf"></embed>
to change height/width add elements into the embed tag: <embed height="520" width="270" src="http://randomsite.com/game.swf"></embed>
you can find more tags/elements using a site called: http://google.co.uk

Step 5) Finishing touches
Test that everything works as planned.
Think about the layout and other things in the site
You can add many more things such as text boxes for custom values, advanced custom variables etc.
You could make the website look nice to fit the trainer
Add anything you like and you can even give me some credit if you wish

I hope this helped!
If you have any questions about it feel free to ask me about it.