ActionScript 2.0 :: Validating A Jpeg?
Mar 14, 2004i have a little questionis there a way of making flash test if a jpeg is present when trying to load it externaly?
View 3 Repliesi have a little questionis there a way of making flash test if a jpeg is present when trying to load it externaly?
View 3 Repliesflash action script - it check for blank fields and give the error message accordingly....but its not able to check the format of email id.[code]
View 12 RepliesI have generated actionscript (AS3) beans from the Serverside(java).
Now some of the classes had (Long,long,double) which I had to convert into Number on the Actionscript side (as we dont have long ,double etc ) on AS3 side.
Now I have to validate Number on AS3 side to match type on Serverside .
Let take example I have a field
private long number ;
in java which is converted as
private number:Number ; on AS side
this will accept number as (Double Long etc) but we know that we cannot fit Double into long on java
so I am wondering is there anyway we can validate AS3 Number to be valid "Long" on Acrionscript side ?
I'm getting my head around XML E4X in Actionscript 3 and been looking at Senocular's article about filters [URL] for a better way of validating the code below?
Essentially I want to check the profile nodes exist and if theres a profile node with a matching locale attribute (passed via FlashVars), and if not it grab the text of the first node. Anyway heres the code snippet and my XML is below:
function addInfoBubble(countryName:String, countryDataXML:XML):void {
// (theres other non related code here)
if(countryDataXML.achievers.achiever[0].profile as XMLList && countryDataXML.achievers.achiever[0].profile.length() > 0){
[Code].....
I have created a button when clicked it validates A listbox checking for a value if the selected index =0. I want it to run another .swf
Here is ActionScript Code:
submit_btn.addEventListener(MouseEvent.CLICK, play);
function validate(event:MouseEvent):void{
if (question1_combo.selectedIndex ==0)
(RUN SWF here)
else
trace ("not worked");
}
I had a file flash version 4 that was working with this AS3 code, I open the file with version Flash 5 and now it is not working properly...Like in the name field if I press lowercase "r" ir shows "R"... and in the email address I can't type the @ character...this is the code...
stop();
var variables : URLVariables = new URLVariables();
var varSend : URLRequest = new URLRequest ("contact.php");
[code]....
Im a scrub when it comes to flash (but i gotta start somewhere) and started making a form.I made a validation on the orders email and the orders details.The purpose of the form is to get some information about trips.there are 10 rows with 4 fields.the 4 fields is a date, from, to and time textfield.
i wanna group up and validate these fields so that if you write something in "from" you have to write something in "date", "to" and "time".
I'm not sure how to validate a form done in flash...
View 14 RepliesI want to be able to validate a string so that it doesn't contain any numbers or special characters like '@!�%^' for instance, how would i go about doing this?
View 3 RepliesI'm still learning AS3 and am trying to set up validating user (text box) input of 2 items (name and password) by checking with an SQL Server Database on my website.I have the ASP page set up using a standard request/response.write script. It works I've tested the ASP, and it works. The ASP receives the 2 variables, hopefully each in a name-value pair, and checks with the DB, then if the name and password received from the Flash SWF match a name and password in the DB, sends back a "YES" and, if not, sends back a "NO".I'm having difficulty getting the AS3 written and working correctly. Here's what I have so far that displays errors, causes a flickering when previewed and doesn't yet work.
stop()nextBtn.addEventListener(MouseEvent.CLICK, nextBtnClick, false, 0, true);function nextBtnClick(e:MouseEvent):void {var input1:String = T1.text;var input2:String = T2.text;var variables:URLVariables = new
[code].....
I have to validate NCS color names but I just cannot figure out the right RegExp for that.
How such a name looks like is the following:
1. a 4-digit number
2. a dash (-)
then either
3. one of the letters Y,R,G or B
4. a 2-digit number
5. the letter R
or
3. just the letter N
I tried & I tried but I just cannot find it.
I am trying to validate if only alphabets are typed in a text box. The code i am using is
<mx:StringValidator id="loginValidator" source="{loginTextField}" property="text" required="true" minLength="2" />
validatorErrorArray = Validator.validateAll([loginValidator, ...])
Now the problem is, it also validates characters like */- and ;',./ etc i want to validate only numbers and or alphabets. If anyone can point out mistake and changes that should be made
I'm Using EmailValidator for Validation:
<mx:EmailValidator id="Email_Validator"
source="{txtEmail}"
property="text" required="false"/>
And My Code is:
var isValidForm:Boolean=true;
var validatorArr:Array = new Array();
validatorArr.push(Email_Validator);
var validatorErrorArray:Array = Validator.validateAll(validatorArr);
isValidForm = validatorErrorArray.length == 0;
if(isValidForm) {
//.....
}
It is working fine. But I want domain should be "gmail.com" if some other, validation should return false.. How can I achieve this? I think Regular Expressions are useful. But I don't Know to use the same in flex?...
I use the following doctype in a page that has a flash object,
[Code]....
information on how to embed a flash object[.swf] in a page with no validation errors?
Given the nearly plain-text nature of Flash, from a security standpoint, we must assume that your SWF can be decompiled into human readable format. That said, how can we ensure the validity of any online calls? For example, recording a high score might make a call similar to this:
Code:
var url:String = "http://someserver.com/tracker/scoreTable.aspx?mode=record&score=" + _userScore + "&checksum=" + MD5.hash( /* stuff */);
var loader:URLLoader = new URLLoader( );
loader.load( new URLRequest( url ) );
You can do all the MD5 hash checking to make sure the data received matches what was sent, but how can you verify the validity of the call? For instance, one could decompile the SWF and figure out how to build the query string manually, or they could reverse engineer it from monitoring the internet calls from the SWF itself. They could even use a run-time memory editor to change the figures that store the information while playing the game, so that when the recordHighScore call is made, it sends 1,000,000 instead of 1,000. How does one authoritatively validate data and protect against abuse?
I have a simple flash form, which has some required fields, ie. name, addy, etc. What I want to do, is validate that the fields have been filled before they can hit the "next" button.
View 6 RepliesI don't think this is possible, but is there a way to validate the arguments a callback accepts. For example someone passes me callback "mycallback", I want to assert it accepts an argument String.
public function addHandler(handler : Function) : void{
//pseudo code
Assert.functionAcceptsArguments(handler, String);
}
I need a regular expression pattern for validating the following path directory:
[Code]...
I have always wondered this functionality but would like to know what your approach is for this task:
Lets say a project requires three forms screens:
Screen 1 is user info
Screen 2 is product Survey
Screen 3 is Contact info
All three forms will be generated on runtime. So the application cycles starts with Screen 1 which has the usual user info fields such: First Name, Last Name, Email and until user fills in all three fields, application will now allow the user to go on the screen 2.
I have only dealth with one screen form and have never programmed a segmented form. I usually declare a BOOLEAN and set it to false and after making sure that all the fields are filled then the BOOLEAN Value is set to true and user is able to submit the form.
Now having to deal with 3 different forms, how do you handle such situation. Does one need to set Boolean value to false for each screen when the screen is initialized or loaded first?
I wanted to know, is it possible to import swf. webpages in Adobe Flash and then turn them into JPEG?
View 3 RepliesI have never used Adobe Flash before. All I need to do is convert both Jpegs and EPS logos into SWF files. How do I do this?
View 1 RepliesI have an animation about 30 frames long, the dimensions are 500x700 pixels.I want to use swf instead of gif because of better quality. So should I use png's or jpeg's to animate the swf?Which format does flash like better?
View 7 RepliesIm using Adobe Flash CS3 PRO. I don't know what's wrong..when I try to import photos into the stage the photos get resized.My photographs are 550px by 413px. I set my stage to the same size. Then I go to import to stage. I click import as a sequence. All the photos are appear smaller on the stage. They are only about 200px.I am basicaly trying to import a sequence of photographs for my stop motion animation.
View 2 RepliesI am trying to use the bone tool on a jpeg image I edited in photoshop. When I import it I have to "break-apart" the image to use the bone tool on it and all seems fine. but when the pose is set, the image vanishes during the motion.
View 3 RepliesIs there a way to have a nice start up image (.jpeg) showing instead of the 1st frame of a .flv without creating a .swf . in Flash.
Looking to create it using html code- is this possible??
I have been following this tutorial which works fine, but how do I use a jpg instead of text to do this ?I start a new project with the dimensions of the jpeg needed, but unlike Photoshop, I can't seem to merge the Stage and Jpeg to be as ONE which i think would work with the tutorial.
View 2 RepliesI have a jpeg loaded into my library, and under the file's properties, I have "export for actionscript" checked, with "one" in the Class field and "flash.display.BitmapData" in the Base Class field.[code]...
View 6 RepliesSo I want to do something very simple I load a jpeg into a bitmapdata instance somewhere in the jpeg is an embedded xmp packet with useful info like image title, caption, copyright info etc... how to read the xmp data from inside a bitmapdata instance??? I have found the xmp library for actionsscript but it is absolutely no help I create actionscript by just creating as3 files in flash and attach my main class to my (empty) .fla file I do NOT use the IDE, FLEX, Flash builder or anything fancy. These are pure custom as3 classes everything is created from code
View 3 Repliesi got a flash/PHP problem...
is it possible to convert a dynamic .swf that has an xml file into a single file, say for example a jpeg?
I am trying to take a variable sent from flash, and save it to a spot on my web server using PHP, I have NO idea how to do this, and I can't seem to find code that works anywhere on the web
View 3 Replies