Flex :: OnResult HTTPService - Event Possibilities Not Firing

Sep 1, 2010

I have a HTTPService:
<mx:HTTPService id="scoreService" url="http://" method="POST" result="onResult(event)">
<s:request xmlns="">
<name>{..}</name><score>{...}</score>
</s:request></mx:HTTPService>

And a script for (event):
private function onResult(e:ResultEvent):void {
if (e.result.status == true) {
currentState='...';
} else {
Alert.show("...", "...");
}}
The problem is that none of the event possibilities fires after I POST data to my php.

View 1 Replies


Similar Posts:


Flex :: OnResult HTTPService?

Aug 28, 2004

I have a HTTPService:

<mx:HTTPService id="scoreService" url="http://" method="POST" result="onResult(event)">
<s:request xmlns="">
<name>{..}</name>

[code].....

View 3 Replies

Flex :: Override Result Event (HTTPService)?

May 27, 2011

I have a global settings class, and i want to switch a var (to 1) in this class, when i call the send function and switch this var (to 0), when the result event dispatched.

I created a class, extends HTTPService..i can override the send function (override public function send(parameters:Object=null):AsyncToken), but how can i override the function, which call when the result arrived?

View 1 Replies

Flex :: Event Listeners Not Firing In Code

May 15, 2011

event listeners not firing in this code can anybody guide me what is problem with this code.[code]

View 2 Replies

Flex :: Event Listener Callback Not Firing?

Jun 17, 2011

In our app, I am periodically noticing that a particular event handler is not firing. 99% of the time, it works fine, but, every so often, it just dies. How can I find out whats happening? Is the DispatchEvent() not happening/working somehow? Is my listener still listening? Did something else catch the event, and not pass it along so that the 'right' listener can get to it ?

Here's a little bit of the code...

Thats a somewhat pruned down version of what the real code is, but I don't think I trimmed out anything important. The key, as I see it is that we fire up the params dialog, then start to listen for the closed event. Then, we show the param dialogs close function. What happens when it fails is that the trace message "caught close event.." is never generated, and, consequently, the closeHandler is not getting called at all.

View 1 Replies

Actionscript :: Flex 4 COLLECTION_CHANGE Event Not Firing?

Aug 25, 2011

I'm currently trying to achieve 2 way binding of an ArrayCollection object. However, the COLLECTION_CHANGE event is not firing.

App.mxml
<?xml version="1.0" encoding="utf-8"?>
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"

[code]....

I'm trying to achieve 2-way binding with the Booths variable.the COLLECTION_CHANGE event never fires even when I add 2 new items in the Booths variable in the App.mxml

View 3 Replies

Flex :: Programmatically Firing Event Listeners

Nov 10, 2011

I would like to programatically fire an event on a spark checkbox. I have a tab bar which has tabs enabled according to various checkboxes. I am loading data into these tabs. Sometimes tabs 1 and 2 will be enabled. Other times tabs 2 and 3. Other times tab 4 by itself (and all the other combinations). I have tried to enable the VBox (in action script) which is in my view stack but it seems to freeze the application. The VBox enables correctly upon user input on the check box. If I set the checkbox to be selected it does not fire the event and so does not enable the tab.

Is it possible to manually fire an event in Flex. I have tried to see if I can take the checkbox and get the event and fire it. Unfortunately I can only see addEventListener, hasEventLister and removeEventListener. There is no way of getting the events that are already on the checkbox

View 1 Replies

Flex :: DragDrop Event Not Firing For TextArea Control?

Feb 2, 2010

I'm working on a simple view in my app that allows a user to drag an item from a list control and drop it onto a textarea.

Seems the dragEnter event fires just fine, but the dragDrop event does not.

View 1 Replies

Flex :: Swfloader Component Not Firing Complete Event?

Mar 25, 2010

enter code hereBeen really frustrating just trying to load a swf from a swfloader in Flex and then accessing it's content. I'm sure once I figure out how to do it once then it'll be fine, but I've gone thorugh a bunch of tutorials and somethings not right. Here's my flex code:and the as code:

public function initHeaderSwf():void
{
trace("INITIATIED");[code]........

Here's the problem: The swf loads, there is no problem there.i see it in my compiled swf. but the complete event doesn't fire. CreationComplete will fire, and then I try, after that, to make a event listener for loading the actual swf, that doesn't fire.I've tried it a variety of different ways with no luck.All I am trying to do is change a text field in the loaded swf.I imagine this might be a problem with the sequence of things loading or something like that, but not sure.

View 1 Replies

Flex :: DataGrid Editing Cells In Same Row Not Firing Collection Change Event

Mar 20, 2010

I am using the flex datagrid to allow the user to edit some data. My update process relies on a CollectionEvent of type update. Basically I catch this event package the values and update the database. However, if the user edits a cell then moves to edit a cell in the same row the value is updated but a collection event is not fired. Only when clicking out of the row the event is fired. Has anyone had experience with this. I have heard the datagrid is a little quirky is this one of those quirks or am I doing this all wrong?

View 1 Replies

Flex :: Loader Object Not Firing Complete Event After An External Css / Swf File Got Loaded

Jan 18, 2011

I am a bit stuck here for the past few days. I have a SWF running in Security.LOCAL_TRUSTED sandbox. I can load my JPEGs and simple SWFs without any problems

[Code]....

View 2 Replies

Actionscript 3 :: Dispatch A Custom Event Inside Httpservice Result Event?

Dec 8, 2011

In my AIR application, I try to dispatch a custom event from a class to main window.This class is use to call httpservice. My goal is to send a custom window when the httpservice result is send.[code]...

View 1 Replies

Xml :: Flex - HTTPService Event Listener So It Triggers Something When ".send" Method Gets Data From XML?

Sep 23, 2009

I've doing a bit of "training" at working with Flex and Remote Data from XML files.This is my HTTPService

<mx:HTTPService id="loginData" url="com-handler/basic.xml" showBusyCursor="true">
</mx:HTTPService>

I have a button and when its clicked its call a function, that calls loginData.send and does a little IF condition, that IF condition relies on the data returned by loginData.The condition doesn't work because its called right next to the loginData.send, and .send method still didn't returned the values from the XML file. But if you click it a second time a second after the first click the IF condition works.So to deal with i wanted to do a eventListener so that when loginData.send returned the data from the XML it fires up the IF condition. But i don't know how to do it.

View 1 Replies

ActionScript 3.0 :: Event.ID3 Firing Twice Instead Of Once?

Jan 19, 2010

I have some code where an event handler listening to Event.ID3 fires twice for an MP3 file. From searching the web, I found a few others asking a similar question, but I haven't seen any response.

Does anybody know what would cause the ID3 Event to fire twice for a single file? My only guess is that the MP3 file contains two versions of ID3 format.

The code looks like this:

Code:

var mySound:Sound;
function setup()
{

[Code]...

View 2 Replies

ActionScript 3.0 :: Timer Event Not Firing?

Jul 13, 2010

I have a little flash app that I have running constantly on my server (I made it an exe). It runs great for a few days, but then eventually it just stops.

Code:
trace("test1");
var myTimer:Timer = new Timer(5000, 1);
myTimer.addEventListener(TimerEvent.TIMER, getData,false,0,true);

[Code].....

The code above should call the function getData once after 5 seconds have passed. This works 99.99% of the time, but for some reason (usually after a few days of it running) it doesn't call the getData function.

I have verified this through trace statements. When it eventually fails, it traces out test1, test2..... then nothing else. No test3.

I'm assuming I need to add an event listener for the timer object to check if it fails for whatever reason. How do I do this?

View 4 Replies

ActionScript 3.0 :: Event.COMPLETE Isn't Firing

Sep 21, 2009

Can anyone see why my event.Complete isn't firing

[Code]...

View 4 Replies

ActionScript 3.0 :: Event.COMPLETE Not Firing On PNG?

Dec 5, 2009

I'm sure some users on this forum will be aware that AddThis are dropping the Clearspring Launchpad, so I'm writing a new API to get ready for the changeover. Part of that is a base UI that will create buttons for social network sharing destinations. At the moment, AddThis contain all the icons in a single long strip that is 16x3520 pixels in size [URL]...
 
What I'm trying to do is load this into a utility class, but the Event.COMPLETE event never fires, and if the Loader class that loads it is added to the stage, the bitmap is never shown. I thought it was maybe a dimensions issue, but what is curious is that if I place the PNG on a Flash stage and export as a SWF, it loads no problem. If I dump it out as a JPEG, no problem. Its ONLY when the file is a PNG that there are problems trying to load it. I even tried dropping it out as a 24-bit PNG (the original is 8) but that had no effect.

View 2 Replies

Flash :: Why Are Event Listeners Firing More Than Once

Jun 14, 2010

In my Flash project I have a movieclip that has 2 keyframes. Both frames contain 1 movieclip each.

frame 1 - Landing
frame 2 - Game

The flow of the application is simple:

User arrives on landing page (frame 1) User clicks "start game" button User is brought to the game page (frame 2) When the game is over, the user can press a "play again" button which brings them back to step 1

Both Landing and Game movieclips are linked to separate classes that define event listeners. The problem is that when I end up back at step 1 after playing the game, the Game event listeners fire twice for their respective event. And if I go through the process a third time, the event listeners fire three times for every event. This keeps happening, so if I loop through the application flow 7 times, the event listeners fire seven times. I don't understand why this is happening because on frame 1, the Game movieclip (and I would assume its related class instance) does not exist - but I'm clearly missing something here.

I've run into this problem in other projects too, and tried fixing it by first checking if the event listeners existed and only defining them if they didn't, but I ended up with unexpected results that didn't really solve the problem.

View 2 Replies

ActionScript 3.0 :: Complete Event Not Firing?

Oct 13, 2009

I'm dynamically creating instances of a loader in a loop, adding a complete listener to it, and loading it. For some reason the complete function is not called. Is this syntax wrong?

[Code]...

View 2 Replies

ActionScript 3.0 :: Firing Event With ComboBox Component

May 21, 2011

I have a simple ComboBox onstage, with 5 options in it. Each one has a textual label, and is assigned a numeral "data" in the Component Inspector (1,2,3,4,5). I'm trying to get the playhead to move to a specific frame, according to which option is selected, and can't make it work. The trace turns out fine, but the playhead stays in place. (The ComboBox is called my_cb).

PHP Code:
var cbListener:Object = new Object();
cbListener.change = function(evt_obj:Object) {
trace("Value changed to: "+evt_obj.target.selectedItem.label);};
my_cb.addEventListener("change", cbListener.change);
cbListener.change = function(evt_obj:Object) {
var itemName:Number = new Number();
itemName = evt_obj.target.selectedItem.data;
if(itemName == 1) { gotoAndStop(10);}

View 2 Replies

ActionScript 3.0 :: Tween Start Event Not Firing?

Apr 21, 2010

I have this code below which produces no errors

import Card;
import fl.transitions.Tween;import fl.transitions.easing.*;import fl.transitions.TweenEvent;
 var ace_clubs1:Ace_clubs = new Ace_clubs();ace_clubs1.scaleX=0.4;ace_clubs1.scaleY=0.4;[code]......
 
The only thing is the TRACE output for the MOTION_START EVENT does not fire.

View 8 Replies

ActionScript 3.0 :: Firing Off An Event At End Of Alpha Tween?

May 5, 2010

If I have a movie clip that resides and plays in one frame, and I want an second (visible=false) movie clip to play on the same single frame as soon as the first is finished...  what kind of event to I use? Do I have a frame action inside and at the end of the first movie clip that throws out some kind of event to tell the second to play?Basically, I have a menu (first movie clip) that alpha tweens up, then the buttons (second movie clip) to appear when the first is 100% alpha.

View 8 Replies

ActionScript 3.0 :: SoundComplete Event Cant Firing NextFrame?

Oct 2, 2011

soundchannel.addEventListener(Event.SOUND_COMPLETE  , onSoundComplete);
function onSoundComplete(e:Event):void{
nextFrame();

[code].....

View 3 Replies

ActionScript 3.0 :: COMPLETE Event Won't Stop Firing

Feb 2, 2009

This was working just fine, then flash crashed last night, and now the first event listener keeps firing over and over, endlessly... Even if I remove the listener right there in the function being called...

Edit: Argh, somehow, I must have added a second frame to the timeline (which I have hidden because I'm not using it) so flash was looping the 2 frames over and over...

Code:
var xmlLoader:URLLoader = new URLLoader()
xmlLoader.addEventListener(Event.COMPLETE, LoadXML_complete)
xmlLoader.load(new URLRequest("filename.xml"))

[code]....

View 1 Replies

ActionScript 3.0 :: Why Are Functions With Event Listeners Firing Themselves Again

Aug 23, 2009

I've had this glitch for a long time, and I've tried several ways to get rid of it, and now that I just recoded everything to see if it was something I did, it's back again! basically, whenever I press space (regardless of whether or not I am listening for a space press [or any key press]), the last function fired by an event listener will run itself again, with the exact same arguments supplied to it in the first time.

For example, if I make a simple button to trace("text"); and take you to another frame. Once you get to that frame you can press Space and it'll trace "text" again! I really have no idea what's causing this, and it doesn't seem to be happening to me in new files. and there's too much code to show you, but I just want to know if anyone has heard of this before or if they have any theories to what's going on.

View 7 Replies

ActionScript 3.0 :: Custom Event Not Firing When Dispatched?

Oct 18, 2009

I'm having trouble getting a custom event to fire properly.I have a main class which creates a dynamic textbox (using a custom textfield class (see below)).Another class called book (and extends sprite) , has a method called updateBox() which I want at runtime to update the textbox with some data sent by my custom event which the book class dispatches.The problem is that when the event is dispatched (and I see in the debugger that it does reach the dispatch line) the listener never fires...i.e., the updateText function is never reached, and hence the text box is created and assigned the INIT value but is never updated again..

Here is a scaled down version of my code:

Main Class:

ActionScript Code:
package {
import flash.display.Sprite;

[code]....

View 1 Replies

ActionScript 3.0 :: Mouse Click Event Not Firing?

Oct 20, 2010

I'm attempting to have a browser window come up when someone clicks on a flash animation I made(an ad). I call addEventListener(MouseEvent.CLICK, onClick); in my init routine as you can see below(the code did not import nicely into this post...) . I also tried addEventListener on my background bitmap but that didn't work any better. The mouse click event never fires. I cut out some of the non-relevent code such as the loading of bitmaps.

Code:
package
{
import flash.display.Bitmap;

[Code]......

View 0 Replies

ActionScript 3.0 :: Loader Event Not Firing In Firefox

Mar 15, 2012

I just inherited some code that produces an embedded rdio music player into a swf. It works great in firefox and safari, except the embedded player does not appear in Firefox...

Is this a common issue with the Loader class or contentLoaderInfo events?

View 4 Replies

ActionScript 3.0 :: Event Listeners Not Firing Consistently?

Oct 7, 2009

I have 9 buttons on my site which I wish to increase to 100% alpha when the users mouse rolls over each one, then have the alpha reduced to the original setting of 75% on rollout.If I set the code below for 1 button it works just fine. However, if I repeat this code just changing the numbers for each button, it stops working once duplicated more than a couple of times.Why does it stop working and how can I write this efficiently so it works for all 9 buttons?

Here is the code:-
addtocart1_btn.addEventListener(MouseEvent.MOUSE_O VER, fadeinaddtocart1);
function fadeinaddtocart1(event:Event):void

[code]......

View 3 Replies

ActionScript 3.0 :: Keyboard Event Listeners Not Firing?

Nov 17, 2009

It currently has the following listeners active. When you click a blurb, you will zoom into it. When you click it again (or anywhere on the flash object) it will zoom back out.If you let it idle it will zoom in and out at roughly 10second intervals.There are also keyboard functions that when you click on the arrow keys it will move the camera in various ways. The keys only work in the zoomed out state and are disabled on zoom inThe problem that I'm having is with these. On startup, the keys work fine. If you let it idle and have it automatically zoom in then out, the keys will work fine. However, if you manually click out of a blurb, the keyboard event listeners stop working. I'm not sure why this happens since both the auto-zoom and the manual zoom both call the same function to zoom out.

At first it seems to be that the window is losing focus, since if I click on white space I can use the keyboard again. The problem though, is that when I use an DEACTIVATE event listener to test it, it doesn't show the flash object losing focus. Because of that, I'm not really sure how I would go about fixing this problem.

Code:
package com.jonchau.twitter {
import flash.display.MovieClip;

[code]......

View 1 Replies







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