Hi. Please could someone help me build a simple notepad (word processor) in flash? Step by step instructions would be very helpful as well as all code given.
Please could the notepad be able to:
-edit font format, fontsize, colour etc.
-save the typed text into a txt file
-be able to load the file again
Thanks. I would rather I don't have to mess about with PHP, but use variables instead. If its any help, I'm using Flash 8.
A1) i would do it in HTML. all the above is modifiable with HTML code.
, so you would have the text box that loads the text set at HTML.
Q2)-save the typed text into a txt file.
A2) flash cant save any text(variables) to a .txt file or any local file.
so to do this you will need to use some 3rd party software. i recommend . swf studio.
Q3)-be able to load the file again
A3)
this will only load a file that is in the same folder as the app is in.
Code:
on (release) {
import flash.net.FileReference;
var listener:Object = new Object();
listener.onSelect = function(file:FileReference):Void {
var my_lv:LoadVars = new LoadVars();
my_lv.onData = function(src:String) {
if (src == undefined) {
trace("Error loading content.");
return;
}
thetext.htmlText = src;
};
my_lv.load(file.name,my_lv,"GET");
};
listener.onCancel = function(file:FileReference):Void {
trace("User cancelled");
};
var fileRef:FileReference = new flash.net.FileReference();
fileRef.addListener(listener);
fileRef.browse();
}
make sure you have a dynamic text box with the htmlText render enabled.
Thanks - do you know how to add buttons for underlining, bold and italic?
Sorry to bother - but 1 last thing, on the buttons that change the colour of the text, the code is "_root.color" , but my text and formatting and colour changing etc. are in a movie clip inside _root . What do I change the code to, to make the colour changes work, as they do not at the moment?
i just want to know if you finished that notepad and if you think that it would work on the psp. because if it does i would thank you and please post a link so i can get it