Boolean Boolean value in the returned java action script implementation

Hi all

I have a called checkLogin() actionscript function that calls a remote java method called login()). Login supports two channels, user name and password and returns true if the combination is found in the database, and false if not.

CheckLogin function either displays an alert if the connection function returns true or it'll run an animation sequence if it is false.

The problem is that, although my java connection method returns true I can't define her revealing Boolean in the true action script. The Boolean remains "authenticated" as false. I know because I used a breakpoint after that that he has created and used the debugger to check the value of the variable.

I know that my remote object is configured correctly because using network monitor I see the answer as true.

It is the button that triggers the function:

< s:Button = "8" x = "83" label = "Login" click = "checkLogin ()" / >

Here is my function checkLogin() actionscript:

private function checkLogin (): void {}
authenticated = mainentry.login (username.text, password.text) as Boolean;
{if (Authenticated)}
Alert.Show ("connected!");
} else {}
Shake.Play ();
}
}

Here is my statement of the remote object:

< mx:RemoteObject id = "Mainentrance' destination = 'hand '.

source = 'infrastructure. Hand '.

/ >

Here's my exit Network Monitor: (Please note the right login and password for this application example is "admin" "admin"

Request:

Flex Message (flex.messaging.messages.RemotingMessage) operation = connection clientId = null destination = hand messageId = B1FF60B2-40E8-2580-209D-13CF5BCB9547 timestamp = timeToLive = 0 body 0 = [ admin, admin ] hdr (Iddm) = 2B5D49D7-A10B-DEA0-4A20-1D57FB576314 hdr (DSEndpoint) = my - amf

Answer:

Flex Message (flex.messaging.messages.AcknowledgeMessageExt) clientId = 2B5D53DD-8C0E-F45F-B5B1-19CF70CA88F6 correlationId = B1FF60B2-40E8-2580-209D-13CF5BCB9547 destination = null messageId = 2B5D53E2-6E0F-74FC-F37C-2170EAB2DEAD = 1284527580238 = 0 = true body timeToLive timestamp

Any help would be greatly appreciated.

-Felix

Remote service calls are asynchronous in flex. You need listen to the EEG of result the result to the server event.

private void mainentry_resultHandler(event:ResultEvent):void
{
authenticated = event.result;
}

Tags: Flex

Similar Questions

  • How to pin "Info button" Boolean values of the input data to acquire?

    I am a newbie to LabVIEW. I did this VI referring to this ARTICLE http://digital.ni.com/public.nsf/allkb/CA411647F224787B86256DD000669EFE
    I have problems with taking the values of these pines "Info"... As the functions of 32 buttons, 4 Directions, 8 info axis are wired to 3 Pins?...
    In fact, the goal of my project would be this...
    1 initialize the Joystick
    2. reading axis and Info button
    3 assign characters for each button (a Boolean value) and the axis (-32768 or 32767) as button 1 = Servo1, button 2 = Servo2, Y-Axis(-32768) = MF, Y - Axis (32767) = MB,
    X Axis(-32768) = ML, X-Axis (32767) = Mr... etc...
    4 send the characters to an Xbee Pro connected to the PC with a USB Dongle of Xbee.

    I know it's simple, but such things of convertion and the 'thing' entire component is really confusing... Kindly help me out to the point 3 & 4

    These are clusters.  You can simply use the Ungroup by name in order to leave the values of the components.

  • How the Boolean value off the coast in the system bell auto College after 5 seconds?

    How the Boolean value off the coast in the system bell auto College after 5 seconds?... and also the Bell has to ring only the days... Please help me

    basically take the time, times of beginning and end, including the days of the weeks...

  • I need help on the matrix of action script 3.0

    I need help on the matrix of action script 3.0

    [Ask in the correct forum allows... Left non-technical Forum Lounge for forum specific program... MOD]

    to apply a matrix for mc mat oppose:

    var mat: Matrix = new Matrix;

    mat.a = Whatever;

    mat.b =

    mat.c =

    mat.d =

    mast. TX =

    mat.Ty =

    MC. Transform.Matrix = Matt;

  • How to use a Boolean value in the log duration?

    Hi all

    In my application I want to use a Boolean to connect once on an ongoing basis. When a boolean win 1, it connect time system. When a boolean win 0, it connects time system... & the cycle continues... We can use the button to change the Boolean value...

    Please guide me,

    Thank you

    Hi vaibhav.

    I created a control switch, whenver its State is changed... this moment is connected... Check the attachment...

    Thank you and best regards,

    srikrishnaNF

  • Can not set a value by the executed dynamic action on the page element "selection list."

    I created an agenda of the page 'list of selection' and I want to when I change a value in another element of the page set only 'screen '.

    I created a dynamic action on the page element "selection list" for this.

    These are the dynamic action attribute:

    When:

    ======

    Event: change

    Selection type: point

    Article: P29_PURCHASE_ORDER

    Condition: No strings attached

    Advanced:

    ========

    Scope of the event: static

    Identification:

    ==========

    Action: Set

    The ' Action Page when the changed value "attribute of the element of 'list of selection' = 'None', and when I run form the dynamic action run and set the value for once and do not update the value according to the change in the article"list of selection. "

    Note: when I change the previous attribute of 'Redirect and set', dynamic action run and properly value, but the value was hidden soon

    I want to value when the value of change of select list according to this change successfully.

    Please, advice me,

    Best regards

    Mustafa Ezzat

    Hello

    you set the value of the 'Page elements to submit' to P29_PURCHASE_ORDER?

    Then, the SQL statement would use the current selected value.

    This is the help text says: "specify a list separated by commas of the elements of the page that will be submitted to the server and therefore available for use in your"SQL statement"," PL/SQL Expression"or"Body of the PL/SQL function".»

    Kind regards

    Erik-jan

  • Error in the phase of Action Script assigniment

    Hello guys!

    I created the following action script, named "sketch.as":

    package

    {

    import flash.display.Sprite;

    import flash.events.MouseEvent;

    import com.adobe.images.JPGEncoder;

    public class sketch extends Sprite {}

    public void sketches (): void {}

    It's your documentclass constructor

    }

    stage.addEventListener (MouseEvent.MOUSE_MOVE, moveCursor);

    Mouse.Hide ();

    function moveCursor(event:MouseEvent):void

    {

    Pencil.x = event.stageX;

    Pencil.y = event.stageY;

    }

    var canvas_mc:MovieClip = new MovieClip()

    addChildAt (canvas_mc, 0);

    canvas_mc.swapDepths

    function sketch()

    {

    canvas_mc. Graphics.beginFill (0xFFFFFF);

    canvas_mc. Graphics.drawRect (0, 0, 600, 500);

    canvas_mc. Graphics.endFill ();

    canvas_mc.addEventListener (MouseEvent.MOUSE_DOWN, startDrawing);

    canvas_mc.addEventListener (MouseEvent.MOUSE_UP, stopDrawing);

    canvas_mc.addEventListener (MouseEvent.MOUSE_MOVE, makeLine);

    }

    function startDrawing(event:MouseEvent):void {}

    canvas_mc. Graphics.LineStyle (1, 0, 1);

    canvas_mc. Graphics.MoveTo (mouseX, mouseY);

    canvas_mc.addEventListener (MouseEvent.MOUSE_MOVE, makeLine);

    }

    function stopDrawing(event:MouseEvent):void {}

    canvas_mc. RemoveEventListener (MouseEvent.MOUSE_MOVE, makeLine);

    }

    function makeLine(event:MouseEvent):void {}

    canvas_mc. Graphics.LineTo (mouseX, mouseY);

    }

    Sketch();

    var serverPath:String = "";

    function createJPG (m:MovieClip, q: number, fileName:String)

    {

    var jpgSource:BitmapData = new BitmapData (m.width, m.height);

    jpgSource.draw (m);

    var jpgEncoder:JPGEncoder = new JPGEncoder (q);

    var jpgStream:ByteArray = jpgEncoder.encode (jpgSource);

    header: var URLRequestHeader = new URLRequestHeader ("Content-type", "application/octet-stream");

    var jpgURLRequest:URLRequest = new URLRequest (serverPath + "" jpg_encoder_download.php? name = ' + name + '.jpg' ");

    jpgURLRequest.requestHeaders.push (header);

    jpgURLRequest.method = URLRequestMethod.POST;

    jpgURLRequest.data = jpgStream;

    var jpgURLLoader:URLLoader = new URLLoader();

    jpgURLLoader.load (jpgURLRequest);

    navigateToURL (jpgURLRequest, "_blank");

    }

    save_btn.addEventListener (MouseEvent.CLICK, saveBtnPress);

    save_btn.addEventListener (MouseEvent.ROLL_OVER, saveBtnOver);

    save_btn.addEventListener (MouseEvent.ROLL_OUT, saveBtnOut);

    function saveBtnPress(e:Event):void

    {

    createJPG (canvas_mc, 90, "sketches");

    }

    function saveBtnOver(e:Event):void

    {

    Mouse.Show ();

    Pencil.Visible = false;

    }

    function saveBtnOut(e:Event):void

    {

    Mouse.Hide ();

    Pencil.Visible = true;

    }

    }

    }

    Recently, I created a .fla file in the root of the .as file name 'sketch.fla '.

    When I try, in the form of Adobe Flash CS4 Professional, to assign to 'FLA' in the properties to publish my action script, the following message appears:

    «A definition for the document class is not found in the classpath, then it will be automatically generated in the tha to export SWF file»

    Of course, this does not

    Could someone help me?

    take a screenshot of the files in the directory of your fla and a screenshot of your property panel indicating the document class.  Glue the two images on this forum.

  • Fill the stage with Action Script

    Hello

    I'm new to flash and Action script. I would like to know how I could fill (instead of copy and paste) the scene with a small button e.g. 10 x 10 px. Let me explain what I'm trying to do here. It's a simple game that includes 4000 buttons, 50 lines of 80 buttons. Each button has States, not available, available and in the process. Visitors come to the page and start clicking, wins the one who has the most clicks.

    So instead of doing this with the painful copy and paste, to give the button a unique id, I was wondering if there is a way to do this with action script, generating 50 lines, 80 buttons per line, and each of them giving an id with j ++ or something.

    Thank you very much and sorry for my English.

    Of course, no problem actually. I would use two pieces of code. The first would be a
    class, which extends MovieClip and attached to your button element in the library.
    Then a little to the loop on the main timeline to attach buttons to the
    step and you're all set.

    For the class:

    class com.yourdomain.Sample extends MovieClip
    {
    var myID:Number;

    function Sample() {}

    public function set id(newID:Number):Void
    {
    myID = newID;
    this.onRelease = function() {}
    trace (this.) MyID);
    }
    }

    }

    Of course, you will need to change the com.yourdomain to your own class path.
    Then just put your clip in the library to export for ActionScript and set
    class: com.yourdomain.Sample

    In the main timeline then write a function createGrid bit as follows:

    function buildGrid (tot, sx, sy, pc, cs, rs) {}
    var startX = sx;
    var currX = startX;
    var startY = sy;
    perCol var = pc;
    var colSpace = cs;
    var rowSpace = rs;
    Use tot + 1 because we are not going to go 1-0 in the loop below
    var total = tot + 1;

    for (var i = 1; i)< total;="">
    Clip var = this.attachMovie ("btn", "btn" I, I + 10, {_x:currX,)
    _y:startY});
    clip.ID = i;
    currX += colSpace;
    If (I % perCol == 0) {}
    startY += rowSpace;
    currX = startX;
    }
    }
    }

    And call it:

    buildGrid (100, 20, 20, 10, 12, 12);

    This will make a grid of 100 occurrences of the element named "btn" (one with)
    your attached class), from 20,20 with 10 per line and 12 pixels
    between the centers... When you click on one any of them they will trace their
    appropriate index 1-100

    HTH

    --
    Dave-
    Developer leader
    http://www.blurredistinction.com
    Adobe Community Expert
    http://www.Adobe.com/communities/experts/

  • sqlplus script + the return in unix script value value not rehired.

    Suite of function but number no return value

    Any reason.

    oRACLE 11.2.0.3

    Thank you

    {get_Count()}

    sqlplus "virtue sysdba" s < <!

    set the position

    Set feedback off

    set pages 0

    Select count (*)

    of all_scheduler_job_run_details one

    where req_start_date > systimestamp - interval '30' minute

    and owner = 'OWF_MGR. '

    and job_name = "L1_TFER_CTRL_JOB."

    and status = "Success"

    !

    }

    Count = $(get_Count)

    ++ get_count

    County =

    If ["$count" - eq 0]

    then

    echo ' error!' | mailx-s 'Please check control center in OWB on IKW'-c '$CCOPY' $RECIP

    FI

    + [eq - 0]

    Add a ';' or ' / ' to your SQL query IE:

    sqlplus-s "virtue sysdba".<>

    set the position

    Set feedback off

    set pages 0

    Select count (*)

    of all_scheduler_job_run_details one

    where req_start_date > systimestamp - interval '30' minute

    and owner = 'OWF_MGR. '

    and job_name = "L1_TFER_CTRL_JOB."

    and status = "Success"

    /

    !

  • View returns a value when the return is null

    I need a view that returns the following situation:
    ID   VAL
    1    A
    2    B
    Select VAL from my_view where ID = (?)
    If the ID is different from 1 or 2, then the value must be 'C' another thing 'A' or 'B' as ID

    Some tips on how I can do this?

    Concerning

    Assuming that the id is not null:

    SQL> variable id number
    SQL> exec :id := 1;
    
    PL/SQL procedure successfully completed.
    
    SQL>  select  val
      2     from  tbl
      3     where id = :id
      4  union all
      5   select  'C'
      6     from  dual
      7     where :id not in (
      8                       select  id
      9                         from  tbl
     10                      )
     11  /
    
    V
    -
    A
    
    SQL> exec :id := 2;
    
    PL/SQL procedure successfully completed.
    
    SQL>  select  val
      2     from  tbl
      3     where id = :id
      4  union all
      5   select  'C'
      6     from  dual
      7     where :id not in (
      8                       select  id
      9                         from  tbl
     10                      )
     11  /
    
    V
    -
    B
    
    SQL> exec :id := 3;
    
    PL/SQL procedure successfully completed.
    
    SQL>  select  val
      2     from  tbl
      3     where id = :id
      4  union all
      5   select  'C'
      6     from  dual
      7     where :id not in (
      8                       select  id
      9                         from  tbl
     10                      )
     11  /
    
    V
    -
    C
    
    SQL>
    

    SY.

  • possible to have a display value and the return of LOV

    Hello

    With the help of obiee 11g, I have a variable prompt that takes column as value.
    I have the report that I use a diff column eual to this prompt value.
    I wanted to know if its possible at all to have a view and a return value
    i.e. in the lov, we show a value and when we choose we choose a different value that goes to the filter

    For example. If we have an APAC region in the table, and then in the show LOV in Asia-Pacific and it returns APAC, so that
    in the data filter gets filtered using ICCA.

    Thank you

    You can try something like this sql in the Prompt Variable:
    SELECT CASE WHEN Office.Region = "ACPA" THEN 'Asia-Pacific' WHERE Office.Region = END 'EMEA' THEN 'EUROPE' TO THE "subject domain name.

    And then in the report so you need to change the column fx filter
    CASE WHEN Office.Region = "ACPA" THEN 'Asia-Pacific' WHERE Office.Region = END 'EMEA' THEN 'EUROPE '.

    Note: This is very good for the case where you have less no.. of LOVs in the column.

    Hope it will be useful...

  • Help! Need to know how to swap the depths with Action Script 3

    So, I have several video clips on a single layer.  Its a gallery interactive where when a photo is selected it both the clip and the picture expands to fill the screne.  The problem is, given that the animations take part in video clips and all film clips exist on the same layer when they are selected and grow to fill the screne they are being hidden behind all the movieclips in front of her in this layer.  I know that there is an action to bring movieclips to the highestdepth or to the front on click/release, but I have no idea where to start. But I work in actionscript 3.0

    If it helps we can post a link to the flash file.

    Thank you!

    You can use addChild (obj); to make an object to move to the top of the heap.

  • old value of the attribute selecing in an implementation class

    Dear all,

    Use ADF 11.1.1.3 and trying to write a validation on the implementation of the entity class (in the doDml method) and I need to compare a value in attribute of old with the current value...
    How can I do?

    The EntityImpl class has a getPostedAttribute(int index) method that gets the value initially read for this attribute in the database.

    Timo

  • change the image using action script 3

    Hello

    my game is built using AS3, no time line code.

    I have an image in step (image 1) that serves as background

    However, I can't seem to figure out how to do so when level 2, it becomes the background image turns into a different image?

    I know it's a conditional statement, but I do not know how to move images if you understand what I'm saying.

    would be something like

    If (CurrentLevel == 2)

    {

    code

    }

    Are you allowed to use Movieclip symbols?  If so, you can create a Movieclip (placed in frame 1) that has the different pictures on different periods and which frame Movieclip is on with your control code.

    Otherwise, you will have to consider dealing with the Loader class for your images, where you load them dynamically.

  • How to get all the attributes of the component of action script

    Hello

    I'm new to flex. I use ActionScript 3.

    I have a component with the name template1.mxml. In this, I have 10 text boxes with the unique id

    I want to erase all the text boxes when the user clicks on the button "delete".

    For this feature, I need to wirte something like that

    "

    templateObj.name.text ="";

    templateObj.address.text ="";

    templateObj.city.text ="";

    templateObj.like.text ="";

    ".

    I have 25 models like this one, and all models have different attributes. The above code became cumbersome for me.

    Is there a way I can get the picture of the id attribute of the object then iterate over this array and write only one line

    Like that: -.

    for each (var i in templateAttrArray) {}

    templateObj.templateAttrArray [i] .text ="";

    }

    I tried the getChildren(); methods, but he's back, whatever it is.

    There may be solutions for this one?

    Any help appreciated.

    Thank you

    Tushar Gandhi

    Hi there, that should do it


    http://www.Adobe.com/2006/mxml"layout ="absolute">
       
            Import mx.controls.TextInput;
    private void clearAll (): void {}
    {for each (var ti: TextInput in {vbox.getChildren ())}
    TI. Text = "";
    }
    }
               
               
    ]]>
       

       
           
           
           
           
           
       

       

Maybe you are looking for