Firing Every Time A Flex Component Resizes?
Apr 5, 2010
I am having an issue with an actionscript event that I am firing every time a flex component resizes. In the event, I am altering the height of the flash object within its html wrapper via an external javascript function. This in turn causes the component to resize and the event to loop in upon itself and continually add height to the component.
[Code]...
View 1 Replies
Similar Posts:
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
Jun 24, 2011
I'm taking my first stab at writing a custom flex 4 component by extending the UIComponent class. Unfortunately, I cannot get the component to respond to any sort of mouse events.I've tried setting mouseEnabled to true is the component, as well as setting mouseChildren to true in the parent (the stage object). It seems whatever I do, my click events can be detected from the stage, but not with the component.Here is my component class:
package components {
import mx.core.UIComponent;
public class DrawCanvas extends UIComponent {
[code]......
View 1 Replies
Apr 16, 2009
No not that component my FLVPlayBack component. I'm trying to make my component resize as the stage resizes while maintaining aspect ratio like this example [URL]. What I have now [URL] does that but only haltingly. It will scale but not always when you want it to sort of like rusted machinery ya give it a whack and it works for a few seconds that's why I said it needs grease. It's not a html issue here's the link to the swf just to make that point [URL]
[Code].....
View 4 Replies
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
Sep 16, 2009
I need a time chooser for a flex app, and as far as I can tell there is no UI component to manipulate Date objects at a resolution finer than per-day (the DateChooser component).What's a good time chooser for Flex? I strongly prefer a Free as in Libre and/or Free as in Beer component.
View 5 Replies
Jun 22, 2011
In a current Flex project, i have an issue where a certain child component must be initialized and ready when the user clicks a button. the button is a mouseClick Event.
//mouseClick Event
protected function tableSearch_searchClickHandler(event:MouseEvent):void
{
[code]......
View 1 Replies
Jun 7, 2011
I have a repeater that populates a component, called 'project'. The project components are given an ID of 'wholeProject'. In all of my functions up until now, I was able to determine how many project components were made by doing the following:
wholeProject.length;
I used this in for loops, for each loops, and for changing the item settings within a project, i.e. something like this:
wholeProject[i].studentName = "Billy Bob";
However, I'm creating a new function that does not seem to like this wholeProject.length reference. I'm using it within the same level as all the others (i.e. the parent level). So far, my function is simply this:
public function getStudentYears():void
{
Alert.show(String(wholeProject.length));
}
when the application loads, the alert message simply does not appear. If I change the alert to something like this:
Alert.show("This is just a test.");
it works just fine. But for some reason, the wholeProject.length doesn't work in this function whereas it does in all my other ones.
View 1 Replies
Apr 11, 2012
im using a custom component for date time, it is 12 hours and am/pm format,Now i wat to show 24 hour format in numeric stepper and am/pm should be disabled.heres my code
<mx:Script>
<![CDATA[
[Bindable] private var _selectedDate:Date = new Date();
[code].....
View 2 Replies
Jul 17, 2009
I have a flex MXML UI that is building a set of radio buttons using the Repeater component:
<mx:Repeater id="radios"
dataProvider="{_lists.(@id == _question.single.@response_list).group.listItem}">
<mx:RadioButton groupName="responses"
[Code].....
View 3 Replies
Feb 10, 2011
I want to introduce a canvas component by zooming from a height & width of 0.0 to 1.0. I want the component to be invisible until the zoom begins and then for it to be visible when it begins zooming.
However, if I bind the zoom effect to a showEffect trigger on the component and then make the component visible, it will first show the component at its regular size for a split second before it begins the zoom effect. If I combine the zoom effect and setting the component visible together in a parallel, it will also flash the component at its regular size for a split second before the zoom. If I make the component visible when the zoom effect starts through its effectStart event, it still does it. Does anyone know how to make it visible only when the zoom effect begins so that it doesn't flash the component at its regular size for a split second before the zoom effect?
View 2 Replies
Mar 7, 2011
To create a similar page [URL] in Flex what are all the basic component involved , just high level is enough here is the template I guess looks like
<VBox>
<comp:Header/>
<HBox>
[Code]....
By Loading all the products into the tile List which takes lot of time to render the whole page , how to resolve this?
View 1 Replies
Jul 6, 2009
I've loaded a video into the FLVPlayback component and I'm looking for a way to get the total time and the time played so far and output them to two text fields so the end result would look something like "00:12/00:50".
Right now I'm defining the video by the components inspector but I'm eventually hoping to define this bit by actionscript as well.
View 6 Replies
Feb 9, 2010
Im using the FLVplayback component for a project im doing. I want to add the time elapsed and time left on the controls (just like how the player on the tutorials on this site works). I dont really want to create my own controls, as im happy with the flv playback component.
View 2 Replies
Aug 15, 2009
I have a HorizontalList that is resized at runtime. The problem is that the items are not adjusting their height to the height of the HorizontalList. I use an item renderer (vBox) which has its height set to 100%. But the items always stay at their initial size.
View 1 Replies
Mar 25, 2010
I have an application with a viewstack that contains all the components that need to be displayed. The navigation is defined in the main application. All the components are based on canvas. The main application looks like that:
[Code]....
View 1 Replies
Jun 23, 2011
I have a component "child" which has a cancel button. Now this component is placed in a state called "newChildComp" I also have another component called "parent". In the parent component, i have a button that dispatches an event. Here is the event code:
[Code].....
so, basically,i am checking to see if the cancel button component in the Child component, while i am still in the parent Compoent, was clicked, if it was clicked, call the cancelButtonHandler. The problem is by the time the addNewChild handles the event, that cancel button was still null. My question is how do i solve this without using the itemCreationPolicy on the cancel button?
View 1 Replies
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
May 15, 2011
event listeners not firing in this code can anybody guide me what is problem with this code.[code]
View 2 Replies
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
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
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
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
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
Sep 30, 2010
On creation complete my parent component executes an "init" function which simply sets public bindable variables in child components. I'd like the child components to watch these variables and upon being set use them. However, for some reason the ChangeWatcher is not firing with the change of the variable. Below is my code;
Parent Component
private function init():void
{
userInfo.user = new User("Tom");
[Code]....
View 1 Replies
Aug 7, 2010
I know there have been other questions on getting JavaScript / Flex ExternalInterface to play nicely, but I've what I think is a weird one. It works perfectly in every browser except Safari (on a Mac). Chrome, IE, Firefox - all ok, but Safari, nope it just wont fire.I've copied my code below, can anyone see why it doesn't work in Safari pls ?(the 'are you sure' dialog window appears in Safari but the method in the Flex app just doesn't get called)
Flex code :
if(ExternalInterface.available){
ExternalInterface.addCallback("flexShutdownHandler",flexShutdownHandler);
[code].....
View 1 Replies
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
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
Feb 9, 2010
Im using the FLVplayback component for a project im doing. I want to add the time elapsed and time left on the controls. I dont really want to create my own controls, as im happy with the flv playback component. The FLVs playing in the component are external and are loaded into it via as3
View 13 Replies
Mar 9, 2010
I would like to position relatively a scroller in my application like below.When I scale the image, I resize the scroller...
<s:Scroller width="50%" height="50%" >
<s:Group>
<mx:Image
[code].....
View 2 Replies