Spell Checker
I'm aware that google provides a spell checking service that can be used in flash documents - however, it's limited to 1000 words per day. I was wondering if it would be possible to program my own spell checker - maybe have flash access a dictionary file? Is there any feasible way to do this?
ActionScript.org Forums > ActionScript Forums Group > ActionScript 2.0
Posted on: 03-24-2006, 09:05 AM
View Complete Forum Thread with Replies
Sponsored Links:
Spell Checker In As3
How can spell checker be made in as3?Should I use a simple text document and xml parsing to check the spelling at runtime or is there any other method to implement spell checker at runtime and how?
View Replies !
View Related
Spell-Checker In Java
This is in JAVA, by the way…
This is as easy as it sounds. They give you a dictionary of words, and a few misspelled ones, and you have to find the closest spelling to the word. All words are the same length, so you can simply measure the total number of similar letters within the words (that's how the problem tells you to measure similarity, i.e. the word with the most common letters is the correct spelling).
USAGE
The first 5 represents the dictionary length, the 7 is the number of test cases. The next five words compose the dictionary, and the next seven compose the test cases.
Code:
5 7
usually
rainbow
product
science
medical
produce
scyence
radical
ideally
bawling
project
painful
And the corrected words…
Code:
product
science
medical
usually
rainbow
product
rainbow
SOURCE
Code:
import java.util.*;
import java.io.*;
public class pr92 {
public static void main (String args[]) throws IOException {
Scanner scanner = new Scanner (new FileReader("pr92.txt"));
int dictionaryLength = scanner.nextInt();
ArrayList<String> words = new ArrayList<String>();
int testCases = scanner.nextInt();
for (int i=0; i<dictionaryLength; i++) {
words.add(scanner.next());
}
for (int i=0; i<testCases; i++) {
String misspelled = scanner.next();
int correct = -1;
int mostSimilar = 0;
for (int j=0; j<dictionaryLength; j++) {
if (pr92.similarLetters(words.get(j), misspelled)>mostSimilar) {
correct = j;
mostSimilar=pr92.similarLetters(words.get(j), misspelled);
}
}
System.out.println(words.get(correct));
}
}
public static int similarLetters (String first, String second) {
int total = 0;
for (int i=0; i<first.length(); i++) {
if (first.charAt(i)==second.charAt(i))
total++;
}
return total;
}
}
Keep in mind these contests are all about speed.
This uses Java 1.5.
Hope you like it.
View Replies !
View Related
Applying StyleSheet For Input Text... Spell Checker
I have the need to add a spell checker to a Flash application I am
developing.
The user can enter text into an input TextField. Once done they click
"Spell Check" and using a LoadVars object I send the data to a page that
processes the text and returns any likely misspelled words. Then I am
using a prototype function of the String class to do a search and
replace on all instances of the likely misspelled words adding a <span
class="error"> </span> around the misspellings.
What I have found, however, is that once a stylesheet is applied to the
TextField it is no longer an input field and instead changes to a
dynamic field, where I can not change the text to make corrections,
changes, etc.
Is there any way to do this?
Thanks.
SB
View Replies !
View Related
Spell Check
Are there any 3rd party Flash Add-ons that will check spelling throughout your flash movies or even on the current frame. I have a big problem spelling and this would be a great tool.
View Replies !
View Related
Speak...spell
How hard would it be to make a 'Speak 'N Spell'(the 80's toy (like in toy story) in flash?
the best example ive found is
http://sass.retrogames.com/
but its in vb (an exe)
any ideas?????
View Replies !
View Related
Spell Check
Ihavea problum sumtymes spellin wordz korectly.
I'm using Flash MX...not MX 2004. Does MX have a Spell CHeck feature? I can't seem to find it if it does.
View Replies !
View Related
Array Spell Check
I have an array that I need spelling checked within each element.
Array looks like this
var myArray:Array = new Array("word1","word1","word2","word3","word3");
I need a function that will check the spelling of all the words in the array and display the index value of the mispelled word. for example if word2 was spelled wrd2, I need the function to be able to return the index value of 2
and if both word2 and the last word3 was misspelled the return value would need to be both 2 and 4.
any help would be apreciated.
Thanks,
Mike
View Replies !
View Related
Spell Check Algorithm
I'm working on a spell checker. I have a basic one that works alright but it is only able to find if words are misspelled. I'm trying to come up with a decent algorithm for making spelling suggestions. Any help for this? I would be grateful for it.
View Replies !
View Related
[F8] Need More Help With A Parraleax(*spell) Effect
Someone recently directed me to this tutorial ... http://www.webdesignerwall.com/tutor...allax-gallery/ It looks great. Now all I need to do is find out how to make it scroll up, down, and diagonally... The back ground image for this will be a world map If that helps anyone in understanding what I want to achieve... I always appreciate the help mucho grande
View Replies !
View Related
Spell Check Needed
I am looking for a code or example fla. showing how to add a Spell Checker to a text box in my movie.
I have saerched the web and found nothing good - can someone point me in the right direction? I do not want to pay for something!
Thanks for any help in advance - Bryan
View Replies !
View Related
Tell User If They Spell Correctly
Does anyone know of a way to give a user feedback on how many letters
they have entered correctly in a spelling type of game. I have a phrase that needs to be re-spelled correctly in text input fields, that the user clicks into and types into.
I have a basic script that evaluates whether the letter entered in an input field is correct, however I want to create it so that it can return the current number of correct letters. How might I write the AS for such a thing without creating tons of separate statements and Dynamic Text Variables.
Here is a snippet of my code, as you can see the dynamic text variable "answer" is addressing only one letter. How can I make it do double duty and be aware of how many letters are correct?
Code:
stop();
letrA = inputA
if (letrA == "A"){
_root.letterA.gotoAndPlay(2);
answer = "Letter A is Correct!" ;
} else {
answer = "Wrong" ;
}
It could return a statement like, "You have 2 of the correct letters" or "The letters A, R, and T are correct!"
View Replies !
View Related
Spell Check Of Code Ayudame
I have some code from a tutorial I am still working on form lynda.com's AS2 Classes.
I have this problem with displaying the html text in "tAddLink".
I don't think it's the class because it produces the other text field.
I must be spelling some where or the span tag or something.
If you download you'll see that the text box is there but no text
One day I will be successful at debugging myself
http://www.joshspoon.com/class.zip
problem area
Code:
function initializeTextFields():Void
{
TextUtilities.createHTMLText(this, "tDescription", 0, 185, 400, 0, true, true, false, cssStyles);
this.createEmptyMovieClip("mcAddLink", this.getNextHighestDepth());
TextUtilities.createHTMLText(mcAddLink,"tAddLink", 0, 0, 0, 0, false, false, true, cssStyles);
mcAddLink.tAddLink.html = true;
mcAddLink.tAddLink.htmlText = "<span class='link'>Add to Checkout List</span>";
}
View Replies !
View Related
Would Like To Add Spell Check To Editable Text Field
I have added an editable text field into an application using Cold Fusion and Flash and would love to make spell check available in that text field. Does anyone have a good idea or suggestions on how I can do that? I would rather not have the user copy and paste to another application (like word). Sure hope someone out there can help me out.
View Replies !
View Related
I Yi Yi Spell Check For Flash Word Game?
I have a contract to create another Flash game, but it is a word game this time and requires spellchecking to verify if the user is using a real word.
Does anyone know of anything I could use client side, within flash itself, or if I create a flash standalone, some sort of Windows/Mac compatible component? There are serverside spellcheckers out there using PHP or .NET, but going over the web to check every single play movement might take too long.
Imagine making a scrabble word game where you play the computer and the game needs to verify the word being used so it knows the user isn't cheating. That's what I need to come up with. The game is no prob but the spell checking is unknown territory for me.
I could get ahold of a massive XML of the English language but I'm afraid that checking through that with Flash would take way too long.
Any insights appreciated!
View Replies !
View Related
XSS Checker ?
Hi All,
With the obvious (and well publicised) threats that actionscript is capable of with regard to Cross Site Scripting (XSS) ... is it feasable to ask if some AS guru could create an actionscript XSS checker ??
Some cool software that automated the process of scanning an .fla file to check for XSS vulnerabilties in the actionscript ??
If its not a feasible task, how would i go about manually checking .fla files for potential XSS code threats ?? (ie: what actual code should i be on the look out for ??)
This will hopefully get the juices flowing ... a bit of a challenge to the AS gurus ...that would DEFINITLEY help everyone here at FK...and beyond
Cheers all for your help and time!! ...look forward to hearing from you all
Paul
View Replies !
View Related
Checker
hey guys does anyone know how to insert a domain checker in a flash website?? thanks........your help is very very much appreciated.
View Replies !
View Related
Form Checker
Hi
Right, in my form i have MC next to all the formfields. These MC's all consist of a 2 frames with a stop action i both. The first frame shows a unlit light the second frame shows a lit light.
I will use the example of the "username" field:
I want the MC next to the "username" field to go to the second frame (lit light) when the user has entered 5 or more characters in the username field. Otherewise i want it to stay unlit. Tried a If command but was unsuccesful.
Any ideas???
Thanks
Ash
View Replies !
View Related
CPUspeed Checker
I'm working on an actionscript to detect the speed of the user's system, so I can play movie's yes or no depending on the user's speed.
But it needs a lot of testing with as many different systems as possible, before I can create an accurate script.
So therefore I want to ask you all to go to:
http://script.desktopdesign.nl
And fill-out the form, please.
View Replies !
View Related
Flash 6.0 Checker
Hi,
I am trying to set up a flash 6.o sniffer, to check whether the user has flash 6.0 player installed on their machine...Have downloaded a deployment kit form macromedia....but the only thing is, it needs revision numbers, that relate specifically to flash6.0.....
At the moment the check only seems to look for flash 5.0...
Any ideas how to perform a solid check for flash 6.o player only?
Cheers
View Replies !
View Related
Value Checker Question
Is it possible to create a script that checks to see if the result of an operation is an integer?
What I mean is
If i is equal to say 36, I could check to see if it 18 divides evenly into it?
View Replies !
View Related
Plugin Checker ?
I've read all the tutorials here in flashkit about checking if the viewer has the flash plugin or not. None of those tutorials tell me how to proceed from there. I now know how to check it, but what happens if the user doesn't have the plugin? And how to give him/her instructions on how to get it? Or how to take him/her directly to the HTML version of the site?
And most importanly: how can I preview if this works or not? Is there a way to "turn off" or uninstall the flashplayer plugin somehow?
I shall once again thank you Gurus before hand.
- Harry S
View Replies !
View Related
Form Checker
I made a flash website that has a contact form on it. I was wondering if anyone knows how I could check the 'email' field to see if it is a valid email address (eg. me @here.com). I don't know the scripting so that it checks for 'something@something.something'. How do I define the something in actionscript?
Thanks in advance,
Felix.
View Replies !
View Related
Flash Checker
My knowelogy of flash is very basic. But i made a cd. it was very good and people liked it. But some people doesn't got flash. they call me and i have tell every time there is a flash in the cd.
Is there a simple program that can check the users computer if there is no flash installs the flash en if there is flash do nothing?
thanks
View Replies !
View Related
.txt File Checker
Hey, I'm making a function that will tell me if a file exists or not and I was wondering what I'm doing wrong
Code:
function CheckName():Boolean {
try {
var url:String = txt_Name.text + ".txt";
var loadit:URLLoader = new URLLoader();
loadit.load(new URLRequest(url));
return false;
}
catch (error:TypeError) {
return true;
}
return false;
}
View Replies !
View Related
Syntax Checker
In AS2 you do CTRL-T and not only get a syntax check but also a slew of error info such as interface method not implemented and other class errors.
In AS3 I have to compile to get those errors.
Is there a way to check for the code integrity while editing an AS file without having to compile the project?
BTW: This is using Flash CS4 Professional
Thanks.
View Replies !
View Related
Frame Checker
I've tried it everyway i know it, but it doesnt work...
can someone provide me with a frame checker?
(example)
movieclipname.ifframe=2
this.gotoandplay
(example)a simple example lol.
can someone help me pleaes?
View Replies !
View Related
Port Checker
Hello I own a gaming server, and I used Flash CS3 to design the website.
I want my players to see if the server is online/offline on the website.
Is there any way Flash CS3 could check an IP's ports and do an action if it's open, and another action if it's closed? Thanks.
View Replies !
View Related
Alpha Checker
Hi, I have a string output which comprises of 2 digits, the leading digit is either an alpha or numeric identifier.
How can I interrogate this initial character to make a decision of whether is is alpha or numeric? eg if = a do this, if =3 do that...
Additionally - how can I access the following digit on a similar issue?
Much appretiated
View Replies !
View Related
Loaded Text Checker
Hi Friends, Flashers and Flashmates,
Need your help on how to check if the text from an external text box into flash can be monitored. I have this site where i load a lot of external text onto it in ceratin parts. Problem is that the page looks blank till that text is loaded. can we make a preloader which will say 'text loading' and then disappear when it has been loaded? i've seen this on a few sites myself. havent figured out a good code for it yet
thanks a billion
View Replies !
View Related
ASP Password Checker For Flash
Hi All,
I am trying to do a login system using Flash and ASP but it is not working properly.
Well I have the usual text fields for login and password named "namelogin" and "passlogin". Then when the user presses submit, I am loading the ASp page like this:-
on (release) {
loadVariablesNum("checklogin.asp", 0, "POST");
gotoAndPlay(9);
}
On Frame 9, I have this code:-
stop();
if (success=1) {
gotoAndPlay("Ok");
} else {
gotoAndPlay("Error");
}
and my ASP file looks like this:-
<%
Dim rs
loginName = Server.URLEncode(request.form("namelogin"))
loginPass = Server.URLEncode(request.form("passlogin"))
'*** Create a recordset
Set rs=Server.CreateObject("ADODB.Recordset")
rs.ActiveConnection = cnn
sql = "SELECT * FROM login WHERE (loginUser = '" & LoginName & "') and (loginPass = '" & loginPass & "')"
rs.Open (sql)
'check if a password is submitted
if loginName <> "" and loginPass <> "" then
if NOT rs.eof then
'*** username and password found
response.write "success=1" 'Send a success response to Flash
else
response.write "success=0" 'Send a success response to Flash
end if
else
'if someone opens asp file...
response.write(String(80, "."))
end if
cnn.Close
Set cnn = Nothing
%>
Can you please tell me what is wrong?
Thanks for your help and time!
View Replies !
View Related
Text Field Checker
Hi,
I posted a question before but I think I was a bit vague!
So here goes again:
In a form a user is to enter data into a text field. When they do they are moved on to next section.
What I want to know is if they do not enter their data corrctly is there a script to ad a pop up or redirection page or something?
Thanks awfully chaps.
View Replies !
View Related
Improving This Text Checker
Hi,
I have this code in an external Actionscript file which checks text against a some other text and if the first text contains the second text then this text will be replaced with some more text, this may be a little confusing for you. Here's the code in the file:
code:
class Replace_Script extends String {
private var s:String;
private var arr:Array;
private var thisObj:Replace_Script;
// Constructor
public function Replace_Script(target) {
super(target);
s = target;
thisObj = this;
}
//****************************
// Replace particular letter/word
//with new letter/word
// ***************************
public function replace(findStr, newStr) {
super(s.split(findStr).join(newStr));
}
}
and the usage is:
var my_var:Replace_Script = new Replace_Script(str.text);
rsfunction.replace("badword", "*******");
This will replace the text in the word 'badword' with '*******' in the textbox 'str'. You can also put variables here. I would like the code in the ActionScript fiel to ignore anything appart from letters, so that if people put spaces between words it will still be able to check them properly.
I hope that makes sence.
Regards,
View Replies !
View Related
[F8] AttachMovie Animation Checker?
I have a flash piece that i'm doing where i need to check if a mc (attachMovie) on the stage is done animating in, THEN when the user clicks on another target the mc that's on the stage animates out, then attachMovie (next mc)
this is not linear, there are no references to _root, and the mc's are not loading in externally.
Any advice on how to construct this just based on what i've typed?
thanks!
View Replies !
View Related
Email Address Checker
hi! i downloaded a form from this site & edited it into a subscribe to a newsletter form. the form is working but my problem is how to make the form check whether its a legitimate email address? if its not, the submit process should not be forwarded to the receiving email inbox.
here is the code:
on (release) {
// send variables in form movieclip (the textfields)
// to email PHP page which will send the mail
form.loadVariables("email.php", "POST");
}
hope u can help me with this.
mca_2005
View Replies !
View Related
[AS] Version Checker Redux
Okay, here's the problem. We all know that there is no way to figure out what version a view has of the Flash Player from outside Flash. No script yet conceived every possible browser configuration.
So why not check the version from within Flash? If they don't have Flash, well, they get a prompt to install it. If they have an old flash plug in, that's where I want to capture them.
There are a few different ways I've been able to do this. 1 is to look at all the new features of each Flash version and use those to "crap out" older versions. Here's an example. If I were testing for Flash 5, I could use onClipEvent (load) _root. play(); and put a stop(); on the _root timeline. Only Flash players version 5 or higher will do this correctly and proceed to play to frame 2, while version 4 and below stop, or "crap out".
I get tired of doing it this way though. I want to be able to check with scripts inside Flash. Macromedia created "getVersion()".
Here's my problem. It's made for Flash 5 or prior, so Flash 4 and below will most likely return "undefined" or the natorius "NaN".
Here's my original code:
ActionScript Code:
stop();
ver = getVersion();
if ((Number(ver.substring(4, 5)) >= 6) && (ver.substring(0, 3) === "WIN")) {
play();
} else if (ver.substring(0, 3) !== "WIN") {
textvar = "This feature currently not available on non-Windows enviroments. We apologize for any inconvenience.";
} else {
textvar = "You need the Macromedia Flash 6 plugin to view this movie. Please click on the logo below.";
linktomacromedia._visible = true;
}
Here's the problem "Number(ver.substring(4, 5)) >= 6". When doing "Number("undefined") >= 6" it returns true. VERY BAD!
However, "Number("undefined") === 6" does work. But now that Flash 7 is out, obviously this promotes problems.
Anyone know the answer? I want to use ">==" but it hasn't been invented yet.
Thanks guys.
View Replies !
View Related
AttachMovie Animation Checker
OK, yarcub has been GREAT! Helped me out alot so this is for anyone but him
I have a flash piece that i'm doing where i need to check if a mc (attachMovie) on the stage is done animating in, THEN when the user clicks on another target the mc that's on the stage animates out, then attachMovie (next mc)
this is not linear, there are no references to _root, and the mc's are not loading in externally.
Any advice on how to construct this just based on what i've typed?
thanks!
View Replies !
View Related
EASY: Alternative Variable Checker?
Hi everyone... currently I'm working on a pretty big job. Unfortunately, it has to be multilingual!
At the moment, I've got a checker in all my mc's ( titles, menus, text ) checking to see whether the variable "lang" is set to "english" or "french".
I have the following script on frame 1 of each mc:
//goto english text
if (_level2.lang eq "english") {
gotoAndPlay(3);
}
I have the following script on frame 1 of each mc:
//goto french text
if (_level2.lang eq "french") {
gotoAndPlay(1);
}
On frame 2 & 4 I've just got prevFrames to form a loop checker.
I was hoping that someone might know a better way for a mc to check constantly for a variable to change without having a physical frame loop. All my mc checker's are causing flash to run slowly!
Any help would be greatly appreciated.
View Replies !
View Related
Easing Class : Progress Checker ?
hi
i have a stack of 4 clips that are faded in and then out using the easing class and this works really well - each clip fades from 0% alpha to 100% alpha
but what i'd like to be able to do is to trigger each easing call when the clip below has reached 50% alpha like this :
when clip1 reaches 50% alpha then clip2 starts fading in until it reaches 50% alpha then clip 3 starts fading in etc
so , what i need is some kind of event handler in the tween class that is triggered on each frame (like onEnterFrame) so that i can check if the alpha has reached 50%
does such a thing exist in the easing class ? - i can't find any information about this
thanks
View Replies !
View Related
Concept: AS-based CPU Speed Checker ?
Among other projects, I'm trying to come up with clever ways of developing scripts that determine the performance capabilities of the end user's local machine.
I would like to develop a script that uses a memory-intensive task to determine how much RAM a computer has, at least in terms of whether or not it possesses enough to carry out memory-intensive tasks without bogging down. Basically a stress utility.
I'm scripting in MX '04 Pro, but I don't know what sort of tasks I would need to throw at a system to get the proper result. Any suggestions, alternatives?
+Q__
View Replies !
View Related
Punctuation Balance Checker Not Working?
Have you ever managed to get the check for punctuation balance working?
Seems like a useful feature, but I can't work the fooker out?
The help file says:
To check for punctuation balance, do one of the following:
Click between braces ({}), brackets ([]), or parentheses [()] in your script.
For Windows, press Control+' (single quote), or for Macintosh, press Command+' (single quote) to highlight the text between braces, brackets, or parentheses.
The highlighting helps you check that opening punctuation has corresponding closing punctuation.
View Replies !
View Related
|