Flex :: Validator Gets Called Multiple Times With Beta 2

Feb 28, 2010

I created a custom validator as follows in Flex 4 beta 2[code]...

it works but if you notice I have an Alert window for testing and it gets displayed 4 times which means the validator is getting called 4 times.

View 1 Replies


Similar Posts:


Flex :: Incrementing A Global Variable In A Function Which Is Called Multiple Times?

Oct 31, 2010

I am trying to make a simple mp3 player using flash. The songs are loaded using an XML file which contains the song list. The following code is inserted into a new keyframe.

import flash.media.Sound;
import flash.media.SoundChannel;
import flash.events.*;
import flash.events.MouseEvent;

[code]...

The problem over here is in the nextSong() function. I am unable to preserve the value of currentIndex. Although I am incrementing currentIndex every time the function is called, but the value remains unchanged.

View 1 Replies

ActionScript 3 :: Anonymous Function As Click Handler Is Called Multiple Times Per Click

Aug 16, 2010

I have a button labeled 'blueButton' and I'd like to use an anonymous function to handle the click, like so:

blueButton.addEventListener(MouseEvent.CLICK, function(event:MouseEvent):void {
trace( "-----click detected-----" );
// now do other stuff
});

Problem is, the click handler is called multiple times per click. The number of times called seems to be random (sometimes 2, sometimes 4, sometimes 3 etc). could I be missing something in my code, or maybe I set up the button wrong?

also I noticed that it seems to always get called once on the first click. After the first click is when it starts getting called additional times, maybe that has something to do with it?

View 3 Replies

Flex :: Datagrid - Use An Image Multiple Times?

Dec 3, 2009

i want to reuse an image multiple times within an item renderer, is it possible to embed the image and then reuse multiple times without having to go back to the server for the image? Is this the most performant solution?

View 1 Replies

Flex :: Result Event Multiple Times?

May 1, 2010

This code is for my login component. I want to get a special string for encrypting my password. This string is given by my authservice. But when i login i get a multiple times a alert with Done(line 69 in the pastebin code or line 4 in the code on the bottom of this question). But i want that it shows one single time. Does someone know what is wrong with this code?

protected function tryLogin():void {
encryptStringResult.addEventListener('result', function(event:ResultEvent):void {
var encryptString:String = event.result.toString();

[code].....

View 1 Replies

Flex :: Alert Is Triggered Multiple Times?

Aug 10, 2011

The following code works in the following way:

When I enter incorrect values in the txtother.textbox and focuses out, an alert will be displayed as "Please enter a valid Format Mask." . After pressing the "ok" button in the Alertbox the txtOther.focusout even is triggered again. i.e. immediately after pressing the OK of alert, the same ALERT is displayed again.

I have added the code for ur reference:

//in mxml File:
<mx:Canvas label="General" >
<mx:VBox>

[Code].....

I don't want to the alert to come again and again .. I need it in such a way that when the ok button of alert is pressed. The txtother.text should be in focus, and the alert should not come again and again as before.

View 3 Replies

ActionScript :: Custom Flex/ UIComponent Keeps Getting Painted Multiple Times During A Resize?

Nov 19, 2010

I've created a custom uicomponent and whenever the browser or its specific container is resized, a repaint occurs but the contents of the component get drawn again and again and again...So, if I move the container I'll end up with multiple circles drawn on top of each other but offset depending upon where the container is when the repaint occurs.My updateDisplayList code is below.Do I need to do some sort of clear so that it doesn't contiuously getting duplicated like this?

override protected function updateDisplayList(unscaledWidth:Number, unscaledHeight:Number):void {
super.updateDisplayList(unscaledWidth, unscaledHeight);
trace("height: " + parent.height);
trace("width: " + parent.width);

[code].....

View 1 Replies

Flex :: Working With Data In Flex By James Ward / EmpWeb Example In Flash Builder 4.0 Beta

Jul 31, 2009

From a video on AdobeTV, I tried to play with example empWeb (LiveCycle Data Services).In Flex Builder 3 (FB3) everything works fine. When I tried this on Flash Builder 4.0 Beta (FB4) it doesn't work. When I replaced original xmlns declarations (2009, spark, halo)with declarations from FB3 (2006) it works. Could you explain why?I'm using the default SDKs (Flex 3.2 for FB3 and Flex 4.0 for FB4). I investigated this (please see 3 source code examples). Source #1 works OK in FB3 and FB4, Source #2 gives a FB4 compilation error message: [code]

View 1 Replies

Flex :: Validator On RadioButtonGroup Of 2 Radios

Oct 29, 2010

I have a Validator on a RadioButtonGroup of 2 Radios. There's a checkbox above the RadioButtonGroup whereby if checkbox.Selected, then the Radios are enabled. So the Validator is required if the checkbox.Selected. So far so good. The problem is once a radio gets selected, the RadioButtonGroup selectedValue gets set. When I uncheck the checkbox I set the radios to not selected, but the selectedValue on the RadioButtonGroup doesn't get reset -- it hold the previous value. I tried setting it to null but no luck.

Therefore if I check the checkbox again and submit, the Validator see a selectedValue on the RadioButtonGroup. Even though none of the radios are selected, validation passes. How can I reset the RadioButtonGroup to its initial state when I uncheck the CheckBox? I looked at the underlying code for RadioButtonGroup.selectedValue = null, and what it does is look for a radio in the with the parameter value. If it doesn't find it nothing gets set.

View 1 Replies

Flex :: Implement IP Validator Over TextInput

Nov 28, 2011

I have followed this tutorial to implement an IP Validator over a TextInput. But, I have not been able to resolve following error for some hours.
Error: Could not resolve <flexScript:IPAddressValidator> to a component implementation. MasterTabNavigator.mxml /XflowGUI/src/view

Code:
MasterTabNavigator.mxml:
<mx:TabNavigator xmlns:fx="[URL]"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/mx"
xmlns:flexScript="flexScript.*" >
[Code] .....

View 2 Replies

Flex :: Flex 3.5 Validator Error Message Repeats?

Aug 26, 2010

why the error message repeats in Flex SDK 3.5 (but not in 3.4) and have a good way to make it stop repeating?

[url]...

To make this happen, leave the textInput field empty and hit save multiple times. Then mouseover the textInput.

View 1 Replies

Flex :: Internationalization - How To Localize Validator Messages

Jun 21, 2009

I'm working on a flex 3 application which will initially support only one language (which is not English) but may need to support English and other languages later. So I'm using the standard localization technique, with resource bundles. Now, somewhere I use the validators like EmailValidator which have some error messages displayed, these are in english and come with the flex sdk. How do I localize those messages?

View 1 Replies

Flex - Preventing Validator From Firing After Bound Value Changes?

Nov 5, 2009

I am working on a product options form whose contents should be cleared by a clearOptions() method each time the user adds an option. The option name TextInput is bound to a value object that is reinstantiated each time the the user adds a product option. The problem I am having is that the StringValidator fires each time the bound value object is reinstantiated.

[Code]...

View 1 Replies

Flex :: Flexbuilder - Password Validator Using RegExp?

May 20, 2010

I have seen several examples in Flex for passowrd validator using RegExp. But every where the validation is happend for single validation.

I have a requirement, like password validations like

- At least one Upper case letter

- At least one numeric character

- At least one special character such as @, #, $, etc.

- At least one Lower case letter

- password lenght minimum 6 digits

- password cannot be same as user name

I have the code only for checking the password is valid or not . check the below code.

MXML CODE

<mx:FormItem label="Username:" x="83" y="96" width="66">
</mx:FormItem>
<mx:FormItem label="Password:" x="88" y="123" width="61">

[Code]....

View 1 Replies

Flex :: Custom Validator Against Remote Object?

Oct 20, 2010

I have a need to validate a field against our database to verify unique-ness. The problem I seem to be having is that the validators doValidation() exits before we've heard back from database.

How can I have the validator wait to return its payload until after we've heard from the DB?

Or perhaps a better question might be (since I think the first question is impossible), how can I set this up differently, so that I don't need to wait, or so that the wait doesn't cause the validation to automaticallly return valid?

View 3 Replies

Actionscript :: Flex Validator - Remove The Red Marker?

Jan 13, 2011

I'm working with flex 3.5 and I have a problem with a validator. I have a field that dynamically has o has not an asigned validator, the problem is that in a specific moment the field haven't the validator assigned but the textInput had a red border.I dont know what do I have to remove the red marker?Here is an example of my validator: This is the validator:

<mx:CreditCardValidator id="ccV"
cardTypeSource="{cardTypeCbx.selectedItem}"
cardTypeProperty="data"[code].........

And I have a button that been enable or disable because it has a binding with a boolean var isFormValid.The most weird thing is that when remove the validator the button becomes enables but the red border is still in the textInput.

View 1 Replies

Flex - Set An Error Message For Custom Validator?

Jun 7, 2011

I have custom validator apllied to many comboboxes in different tabs of application. Its is performing the same validation for all the comboboxes. The only difference is for ecah combobox the custom validator should return a different error messagae. How can error message be specified...?...like some error property in mxml or by somehow passing the error message as parameters to custom validator class.

View 1 Replies

Flex :: Dispatching Custom Events From A Validator?

Aug 2, 2011

Basically I am trying to create a string Validator which requests a new language from its controller by dispatching an event upon its creation.

The example below is a straight copy from the Flex3 component explorer - the only diffrence being that I have created the validator as a custom component which dispatches an event upon its creation.

The problem is that my main Application cannot hear the event being dispatched and I don't know why.

Here is the example

MyValidator.as

package components
{
import flash.events.Event;

[Code]...

View 1 Replies

Actionscript 3 :: Flex Email Validator - £ Symbol Allowed In Domain Name?

Apr 20, 2011

I have a bug to fix in work where the UK Pound symbol, £, is allowed in the domain name. I checked the EmailValidator source and can see that it is not a disallowed symbol, whereas things like the dollar sign are:

public class EmailValidator extends Validator
{
include "../core/Version.as";

[code].....

As you can see DISALLOWED_DOMAIN_CHARS string does not include the £ sign. Was thinking of monkey patching (basically copying the entire class, editing it, and adding it to my src - for those not in the know), but we use RSL's, so that would be problematic.

View 2 Replies

Professional :: Use The "same" Button Multiple Times For Multiple Galleries?

Feb 14, 2011

I am extremely untrained in CS4 and Actionscript. However I have managed to get along fairly well until I started to dynamically upload images as a gallery. This works great if I have one gallery, but for my site I have 9 galleries!!! I have a back and next button, but I want to be able to use those same buttons for all of the galleries so they look the same. I have split them up and renamed them, but I am clueless on how to script the buttons to work.This is what I have now because I do not know where to put the other button names without getting errors.

stop();
next_btn .addEventListener(MouseEvent.CLICK, nextImage);
var imageNumber: Number=1;

[code]......

View 3 Replies

Load An Image Multiple Times?

Jun 27, 2011

I have a image of a person that I would like to load a certain number of times in a row to show a total of how many people took part in this particular event.  In total I need 166 replications of this image, is there any actionscript I can use to do this without having to create a key frame for every separate image?

View 7 Replies

Bug : Using The Same Movie Clip Multiple Times?

Jan 10, 2012

I have this animated block that I want to use multiple times in a scene. Everything looks fine until I move the background(separate layer) with a tween. The second it moves it shows only one animating block instead of 4. Also, if I click on "show this layer only" it only shows the one block.So how can I use this movie clip multiple times?

View 4 Replies

ActionScript 3.0 :: Using One Loader Multiple Times?

Sep 9, 2011

I have an array of suffixes that I'm using to load images, some of which are used multiple times:

Code:
for(i = 0; i < imageSuffixARR.length; i++){
var tempLoader:Loader = new Loader();
var loaderOBJ:Object = new Object();

[Code].....

I'm running into is that whatever loader calls the multiple used SWF last gets it. How do I fix this so that the same loader can be used multiple times?

View 2 Replies

ActionScript 2.0 :: Multiple Tweens At Different Times

Mar 11, 2007

What I want is to do this [URL] in actionscript rather than with tweens...as u can see, it takes EONS too long to load (on some PCs at least) (and I know, it DOES need a preloader (which I have), but I'm going to add that later. I want to get this going first). Now, I read a decent bit about onEnterFrame, and did some tutes, but I'm not quite sure how to use it to do what I want.

View 2 Replies

ActionScript 3.0 :: Any Way To Use PNGEncoder Multiple Times?

Jun 7, 2009

I have a large image that exceeds the bitmapdata limits, so I am trying to break it up into 4 separate images and encode them separately using the PNGEncoder. The first 1 comes out great. The remaining 3 all contain the same bytearray data and result in a blank image.

Code:
public function encodeUsersDrawing():void{
pngImageQuadrant1 = new BitmapData(1875, 2400, true);
pngImageQuadrant2 = new BitmapData(1875, 2400, true);
pngImageQuadrant3 = new BitmapData(1875, 2400, true);
pngImageQuadrant4 = new BitmapData(1875, 2400, true);
[Code] .....

View 2 Replies

ActionScript 3.0 :: SWF Loading Multiple Times?

Oct 20, 2009

when I click a button it loads an SWF, then when I click another button it loads another SWF into the same loader. However it appears to be loading multiple SWF's in conjuction with the amount of times I clicked a button. So say if I clicked a button 3 times it would load 4 of the same SWF's on the forth time and load them at the same time.

[Code]...

View 6 Replies

ActionScript 3.0 :: HitTestObject - Multiple Times?

May 10, 2010

I have the following code to pick up collision detection between two objects:

[Code]...

View 2 Replies

ActionScript 2.0 :: Running Through Xml Multiple Times?

Jun 22, 2010

Im sure there is a simple way to do this, but it's been driving me nuts for days now.I am trying to loop through all the data in my xml file, thats no problem, however I need to read the data three times for the menu I am building. Is there a simple way to do this? Basically I want to take the first set of results, then add on the second then the third. So I will end up with a list of data three times what is actually contained in the xml doc.

View 2 Replies

ActionScript 2.0 :: IE Loads Same Image Multiple Times, FF OK?

Dec 4, 2009

I'm creating a movie where I need to have several copies of the same external image.It seems that when viewing the movie in Firefox the external image is downloaded only once regardless of the number of copies I make, which seems correct.In IE the external image is downloaded once each time I copy it within the movie.And that just doesn't seem right.(I've upgraded both IE and FF to Flash Player 10.)For testing purposes I've written the following code

Code:
var pages = new Array();
pages[0] = "images/Page_01.jpg";

[code].....

View 1 Replies

ActionScript 3.0 :: Same Tween Multiple Times On Stage?

Jun 24, 2009

i want to have multiple blocks moving over my stage, but i want use just the one mc in the libary and my function, what adds a new block with random color, alpha and speed.I think, that i have to use addChild();, but i have no idea how to use it properly.

Attachments:
block.zip (7.1 K)

View 3 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved