I am having trouble wiring up an event listener to a fl.transitions.Transition.
Is it possible to somehow view all the events an object fires? That way I could check I am using the correct event (and possible view better ones to use).
I have 2 buttons.There is a MOUSE_OUT event for button 1 and a MOUSE_OVER event button 2.The buttons are right next to each other.Each event leads to a different frame.When the mouse moves from button 1 to button 2, both events get fired, first MOUSE_OUT and then MOUSE_OVER - but the MOUSE_OVER event cuts off the MOUSE_OUT event and doesn't give it a chance to fully execute. To be more clear, for each event, a function is called which has "gotoAndPlay(x)"(x is some different frame number for each)The gotoAndPlay() will go to lets say frame 437 and play exactly 2 frames.But when MOUSE_OVER is fired and it calls my function, it calls the gotoAndPlay() BUT it doesn't get to play the 2 frames.It gets cut off because the MOUSE_OUT gets fired which calls a function which then calls gotoAndPlay() and plays a different 2 frames. How can I allow the first 2 frames to fully play and then the last 2 frames?
I am building a flash site in AS3 using AMFPHP. I could really use some help in the Event department...The structure of the site is as follows:
Documentclass, adds PageConveyer (which holds all Pages) - adds addEventListener( Event.COMPLETE, onPageConveyerComplete ), onPageConveyerComplete: - startAnimation (loop through pages and components in arrays to animate into screen)[code].....
The problem lies in the Event listeners.I want to make sure everything (pages/components) is loaded before I start animating. My guess was that Flash listens to the underlying objects until they are done running, then fires the Event.COMPLETE event to the parent object, which in turn fires it's own COMPLETE event. These events never seem to get fired (since i traced the onComplete functions). Im lost here. How can I best listen to this many objects within objects, to know for sure whether they are finished and ready to be animated in?
I have numerous objects, many of them are stored within other objects (and overlap in physical space). As I zoom into an object, it begins to fade away. At the moment it begins to fade, I load in the child object (or create a child object if one doesn't exist). I want to turn off the parent object's ability to respond to most events. The exception is the scroll wheel, which needs to be sent to both objects simultaneously so that the parent can continue to fade out as I zoom farther in. Try as I might, I can't find a way to tell Flex "hey, for right now dispatch these types of events ONLY to this object." I either end up with event dispatch stack overflows from trying to manually redirect the events, or I get events that don't activate at the correct time or on the correct object. What can I do?
I have a rollOver event on a pop-up button in flex. I want that the menu is opened on rollover. But if the user accidentally goes with the mouse over the component the menu should not be displayed. So on rollOver I want to start a timer (wait for half second) and than check if the user is still on the pop-up button (rollOut was not fired).
My example code so far:
private function rollOverMenu(event:Event){ rollOutNow = false; var shortDelay:Timer = new Timer(3000);
[code]...
The Alert "time is up" is never shown, any ideas why my timer event does not work?
I am working on Flex project these days and having java background. In my current task, same pop up is opened when two different types of custom events are being fired and I have to hide a button for one event type. So, how i can get event type.
I have 2 files, 1 to dispatch the event and 1 to receive it (of course in addition to the event class itself).
I've done this before with both dispatching and receiving files being mxml, but this time the dispatching file is an actionscript class, and it's not working this time. Is it different for actionscript classes?
Here's a dumbed down version
The dispatching class dispatches the event as soon as it's created.
public class ASClass extends UIComponent{ public function ASClass(){ dispatchEvent(new MyEvents(MyEvents.FIRE_EVENT)); } }
in my main mxml app, I instantiate the ASClass which automatically dispatch the event as soon as it's created and the main mxml app should receive back.
protected function appCComplete(event:FlexEvent):void{ addEventListener(MyEvents.FIRE_EVENT, gotEvent); var asClass:ASClass = new ASClass();
I'm (slowly) learning Flex 4 and working on skinning a custom component that extends SkinnableComponent. The component is all in ActionScript and essentially looks like this:
[Code]...
The issue I'm having is on NULL REFERENCES in the Constructor for the various SkinParts, because they're not created yet. I'm trying to find out when is the best time to access them to assign their .text values. I know I can override partAdded() and add the .text value as each part is added, but I'd rather just listen for some magic event that is dispatched when they're all available.I'm not sure whether or not it matters, but the accountName, accountNumber variables are assigned by using a repeater with a dataProvider on the host component. I'm not sure if that too has something to do with when the data is available to the AccountSummary component - which may also needed to be waited on. I was able to successfully use FlexEvent.CREATION_COMPLETE to assign all my .text values to the SkinParts, but is that the right event/best practice?
I am trying to send a simple HTTP message from Flex to C# server, but it seems that I am getting tow calls, first is the real one and the second is an empty one.
Why is that and how can I handle it?
This is my C# code:
TcpListener listener = new TcpListener(IPAddress.Any, 9400); listener.Start(); Console.WriteLine("Server started");
[Code].....
I been trying to send a true HTTP response a notice another thing, the second call is coming without waiting for the first call, if I am putting the response thread to short sleep(100 milliseconds in my test) then I am getting the second call before I been able to response for the first one.
I want to validate the user detail screen and infrom user ifany error when he moves out of flex screen.Basically we have submit button out of flex area and userenters detals in flex screen and submits using jsp header
Now, I know if you click on "trends" then firstView "views.TrendsView" will be shown. Now you are in that view and click again on "trends" (bottom nav bar) which event will flex dispatch?
Using flex builder with flex sdk 3.4.0 if the module is remote like url...The READY event is never fired, i don't understand why.Do you get the same behavior? Original code is from url...[code]
I want to persist the AdvancedDataGrid column order for the user if they move them around and close the window or log out. I have code (see below) that works when I place the code in a grid parent container - eg, a title window. I'd like to generalise the functionality by placing the code in an AdvancedDatagrid subclass rather than each grid container so that all my grids have access to a single location when saving/loading their choices. My approach is to store the datafield names and grid name in an array and save/read to/from the shared object. and update the column order based on that order. The invaldation fails when I use the code in the Advanced Datagrid subclass but works fine in the grid parent.
private function loadSettings(name:String = "custom"):void { var gridName:String = this.stripUIDNumbers(this.uid); var temp:Array = new Array;
LinkeSetFx has its own CollectionEvent, but I don't know how to map the LinkedSetFx event to mx.events.collectionEvent(I want use it in ComboBox). LinkedSetFx is in AS3Commons-collection framework.Here is the url, choose the as3commons-collections-1.0.0.zip, you'll find LinkedSetFx in srcorgas3commonscollectionsfx
how to make the custom class to pass the information.
My question is this: Why did Adobe not create such an event in the default API? What downside is there to using this method as the main way to pass information between MVC style components? Since they made special events for everything else, and its such a common practice, surely there must be some reason why it wasn't done.
I have problem with clearing memory in my game because of eventListeners, garbage collector not clear my objects with events, because events points them when objects are removed from scene. Is there any way to clear events connected to object and his childs? (game create a lot of objects and put diferent listeners if necessary, but because there are also libraries which are created by other programmers I cant just make list of events to clear) Even clar whole scene will be sutable for me if it will destroy all events, because its big problem and game close to beta -.- the only thing I cant do is close flash window
I'm still trying to get my head around the best way to structure event flows. Someone made a lot of sense by telling me that contained objects should be decoupled from their parent containers so they're reusable between containers. Instead of calling their parent's function, they dispatch an event. Sensible! I recently myself in the awkward-feeling situation of dispatching an event on a contained object, from its parent. It seems more intuitive for an object to be the one dispatching its own events. Maybe I'm bordering on breaking the Law of Demeter? Example of what I'm doing: child.dispatchEvent(new ChildEvent(ChildEvent.IM_BEING_A_CHILD)); Am I correct in feeling strange here, or is it a normal thing for one object to dispatch another object's events?
I have some Movieclips that play sounds on mouse over, and end the sound on mouse out. That has worked fine for me.I just implemented some tween animations on the rollover (they enlarge), but now I am having problems because the animations cause multiple mouse over/out events.
I am working on an flash application that requires that all user interaction are stored in a database. The application will have thousands of lessons and needs to keep track of how long each user views lessons and scenes with in the lessons.
I would like to come up with a good solution on how to accomplish this with out having to send a call to a serve side object every few seconds. I could store the data in an as3 object and pass it when the user finishes a scene or exits out of a scene. However this would not work when a user just closes the browser. Maybe I could tie in some JavaScript.
I am designing a physics container. Don't worry, my question is not about the physics. Here is part of my code. Noticed that I have a SetStyle statement there. I realized that if I don't have that line, the MOUSE_DOWN, MOUSE_UP events won't work. If I do have that line, then those events works fine.
Code: package components { import flash.events.MouseEvent; import spark.components.SkinnableContainer; public class Test extends SkinnableContainer { private var mouseDown:Boolean; [Code] .....
Im creating a game. When the current game has finished, I thinking to do this:
removeChild(game) game = null then game = new Game()
Doing this way, it automatically removes the games object instances? It automatically removes the games object instances events? That would be an easy way to restart the game, if yes for both questions.
Can I do like that, or I have to remove all objects and events manually?
I have created a FLV video player using the AS3 flash.media.Video object (not the FLV playback component) and I am trying to listen for meta events and Cue Points embedded in the FLV video but I am not receiving any when I trace the movie. The cue points are not being created dynamically, they are in the FLV video.
Video embed code: // Initialize net stream nc = new NetConnection(); nc.connect (null); // Not using a media server.
[Code]....
Is there anything I am missing have wrong to capture events from my net stream?