Flex :: Why Does BindingUtils.bindProperty() Not Work Immediately
Jul 8, 2010
I have a two way binding between a loaded flash file and the main application in flex.
BindingUtils.bindProperty(this, "micGainValue", audioPublisherApp, "micVolume");
BindingUtils.bindProperty(audioPublisherApp, "micVolume", this, "micGainValue");
micGainValue=75;
[code]....
View 1 Replies
Similar Posts:
Oct 3, 2011
Most examples of BindingUtils shows how to bind a property (either a public variable or a getter/setter) of an object at runtime.
But how do I go about to bind a property, such as "top" of a component, when it's only accessible via the setStyle("top", value); at runtime?
Should I just create a custom pair of getters/setters to affect the style properties of the UIComponent in question? Seems a bit unnecessary.
View 1 Replies
Jun 15, 2010
I can bind in an AS3 project fine--just import the classes and it works as it does in Flex. Not so with a fla. The first binding works, but not after. I'm assuming this is because the compiler is not mxmlc and does not write code when it reads the bindable metadata tags, so no property change events are fired when a value changes. So, no real binding.
View 1 Replies
Jul 19, 2010
I'm having a problem similar to [url]...
Basically, bmpd.draw and/or png.encode are dog slow, so I'd like to have a nice "please hold while we prepare your png" dialog to appear. I can't use callLater() because of the FileReference.
And just for good measure, the loading screen appears at the same time the save dialog appears from the call to fr.save().
View 1 Replies
Sep 11, 2009
In an AIR application I have the following code:
theDialog = PopUpManager.createPopUp( this, TheDialogClass, true ) as TheDialogClass;
theDialog.addEventListener(FlexEvent.CREATION_COMPLETE, cpuIntensiveCalc);
At the end of cpuIntensiveCalc the dialog is removed. The dialog informs the user that "something is going on, please stand by."
The problem is that cpuIntensiveCalc starts before the dialog draws. So the user experience is that the application freezes for 10 seconds with no indicator, then the modal dialog flashes quickly (less than a second) on screen.
The Adobe docs say this about creation_complete
Dispatched when the component has finished its construction, property processing, measuring, layout, and drawing.
So this feels like the correct event. In the name of completeness, I also tried
theDialog = PopUpManager.createPopUp( this, TheDialogClass, true ) as TheDialogClass;
cpuIntensiveCalc();
View 3 Replies
Apr 29, 2011
I need to make a function that execute a java method and return his result. It is static becouse a lot of other functions will call this function. So I did this:
public static function FKDescription(dest:String):String{
var jRemote:RemoteObject = new RemoteObject();
var s:String;
[Code].....
But the function returns null, because the valresult() was not been called at the end of main function. What shoud I do to make FKDescription() return the string that came from remoteobject?
View 2 Replies
Jul 14, 2010
In flex component life cycle, after we make some change in a components property, invalidation methods schedules a call to methods like commitProperties, updateDisplayList, etc for some later time. I need to call the updateDisplayList instantaneously. Is there some direct way to do this.
Currently, both the labels are changed simultaneously after completion of the loop. Instead I need it to work like this, to first render the updated 'myButton1' label then enter the loop and then update myButton2's label. I know, it is elastic race track issue, but isn't there some way to achieve this ?[code]...
View 4 Replies
Aug 14, 2009
I have a drag-and-drop event form in a flex project. I need to run a validator right after the item is dragged into the dataGrid. In it, I fire off a function through dragDrop="verifyEventUsers()". In the validator, I compare the contents of the two arrayCollections, but it appears to be running the checks prior to completion of the drop. For instance, if I drag an element into the dataGrid and trace eventUsers.length inside the validator, I get zero. When I drag the second element, it traces as one even though two lines now appear.
How can I set up a validation script that runs after the drag-drop action has finished?
View 1 Replies
Sep 9, 2011
I am connecting to a BlazeDS server with a simple Flex component that is merely trying to subscribe to realtime dataHere are the Channels and Consumer
<mx:ChannelSet id="channelSet">
<mx:AMFChannel url="http://localhost:8080/MyApp/messagebroker/streamingamf/"/>
</mx:ChannelSet>
[code]....
View 2 Replies
Mar 18, 2010
Everytime I start Flash on Acer Laptop Windows XP SP3 it shuts down. It used to run smoothly before. It only happens since I updatet Flash Player.Do you have any idea what's wrong?
View 7 Replies
Aug 17, 2011
When I add a DisplayObject to a DisplayObjectContainer (e.g. a Sprite to a Sprite) in a function, it seems that the DisplayObject is actually added not immediately, but after finishing the function.[code]...
View 4 Replies
Jun 16, 2010
I've setup a very simple FLA, if you wanna see what I'm talking about:ample.zipIf you fire the swf and you click the red thing (button), you will go to frame 2. If you click it again, you will go to frame 1.Both frames contain a green mc with a "this.visible=false" action, so you shouldn't see it the first time.Now click fast the red button. You will see the green mc from time to time.So, seems the flash movie is executing "clicks" every ENTER_FRAME (not immediately when you click the button). The sample mc I attach has a framerate of 1fps, so you can see easily the behaviour, but it's the same with 30fps.
And the same for the green mc. The "this.visible=false" line is not executing immediately when the main timeline reaches the related frame.In the second frame, the green mc is contained inside a red mc. If you break appart this red mc, all will work as it should and you will never see the green mc (the FLA file is attached as well, so you can test).
View 0 Replies
Jul 4, 2010
Since I jumped onto AS3, there are lots of things I'm missing, so I'm now coding in super-safe mode. Ie, in order to place a new mc at z-index 1:
[Code]...
View 3 Replies
Nov 15, 2009
since my Timer runs every 5 seconds I have to initially execute the function normally. This creates a problem though since if the user has the mouse over the stage, it stops the timer.It cannot do this because it takes 5 seconds before the Timer first runs the function
View 2 Replies
Sep 24, 2004
[URL].. i am following these tuts but evrything is working fine but what i want is that my music should start playing immediately as it is loaded rather then waiting to click button to play...
[Code]...
View 2 Replies
Sep 21, 2009
I'm using actionscript 2, I've got a preloader working, but now I'm struggling to make an alpha animation play immediately after the preloader. My attempts have ended up with the animation playing during the preloader.
View 2 Replies
Jun 28, 2010
Been having an issue lately with Flash Media Encoder immediately closing down after starting the program. It will display the window for a very brief moment and then close down. I have used the program many times with no issues but this recently started to happen. When it started closing directly after startup the first time, it allowed me to use it a few times afterwards. But recently its not working at all.
View 2 Replies
Oct 8, 2010
Who'd have guessed it, my SWF plays immediately with FF, but I'm getting long delays with IE8. I've come a long way from when I started this project. I think I have everything in the right place and have the right files to work with.
I'm using SWFObject 2.2 think I'm using it properly. I used the generater (air vers.) to generate the html file. The file now plays and I have a background that displays right away (it's an image of the what first shows up).
where I can improve: [URL]..I've compressed all the images, but the file is still rather big. I expected problems with FF, but it plays immediately .
View 21 Replies
Oct 12, 2010
I've successfully attached a clip (identifier = "myPane_mc") which contains a ScrollPane (instance name = "myPane_sp") to the main Timeline from the Library. No problem.
attachMovie("myPane_mc","myPane_mc_01",getNextHighestDepth());
However, I can't immediatley load another clip (identifier = "myPic_mc") into the ScrollPane.
attachMovie("myPane_mc","myPane_mc_01",getNextHighestDepth());
myPane_mc_01.myPane_sp.contentPath = "myPic_mc";
Is this particular to the ScrollPane component? It works fine if I place the contentPath code in the next frame of the Timeline, but is there a function that I can attach to myPane_mc_01 to load myPane_sp's content without the additional frame?
View 3 Replies
Aug 18, 2011
I can stream video RTMP just fine in JW Player by LongTail Media. The Pause seems to work, however using Windows 7's Resource Monitor I can see that the player continues to download data when the video is paused, it downloads for about 60 seconds (and does not seem to be longer for longer videos). I have found the same using the examples on longtailmedia's website, so I know it is not something I have done.
I want a way to pause the video and have it stop downloading, this will save us lots of bandwidth. But also have it continue where it left off if play is pressed again.
I checked the logs on our wowza media server, which indicates that the player actually waits 60s before it sends the pause command to the server.
LongTail's support say that the pause functionality uses the built in NetStream class and its behaviour is out of their control.
I have tested flowplayer online examples, and a couple of Adobe / OSMF examples and they all continue to download for 60 seconds after the video is paused.
A way to get this working in JW player would be best, but Are there any flash players that will stop downloading while paused?
If this is not possible with RTMP are there any technologies that will do this with a flash player?
View 2 Replies
Jun 30, 2009
I have looked around the web and everything I have seen and tried doesn't work. I am trying to load an external swf (5 of them, seperately though) wait for it to completely load then play it. Whats happening is as soon as I call Loader.load("myswf.swf") it begins to play immediately before its finished downloading. Heres the code..
Code:
var loader:Loader;
var clip:MovieClip;
var isLoaded:Boolean = false;
[Code].....
In the LoadSwf function there is a variable called tut that was created in frame 1, this just happens to be frame 2. I think everything else is self-explanatory.
View 3 Replies
Aug 24, 2009
I have a curious problem with fullscreen mode in a [beta] game I designed and coded. When I launch the SWF, it works perfectly. Once I embed it in html however, it only flickers into fullscreen for a second and then back out again. It doesn't seem to be a browser issue as it happens in both Firefox and IE7 on my Vista machine.
The game is here:
Spectacle
Fullscreen is toggled by hitting the "F" key.how to get it to stop flickering?
View 3 Replies
Oct 2, 2009
anyone knows why progress in fileReference go to 100 percent immediately after I select the file to upload.
View 0 Replies
Nov 2, 2009
I currently have an AS3 swf that uses a loader to load in various other swfs, some AS3 some AS2. I load in all the swfs at the start and store them in an array for when they are need later. This works fine with the AS3 swfs, as they all have eventListeners for the ADDED_TO_STAGE event and so won't start until I need them. Unfortuantely, I haven't found a similar solution for the AS2 swfs, and they will run immediatley as I load them. Is there any way to stop this?
View 2 Replies
Dec 1, 2009
Main class code starts only when swf is loaded. So I can't activate any preloader.
"Simulate download" mode shows "Frame 0".
How force SWF to start executing immediately?
View 8 Replies
Aug 17, 2011
When I add a DisplayObject to a DisplayObjectContainer (e.g. a Sprite to a Sprite) in a function, it seems that the DisplayObject is actually added not immediately, but after finishing the function.
See this example:
Code:
package {
import flash.display.Sprite;
import flash.events.MouseEvent;
[Code].....
So we have a simple green button, and when it is clicked, there's a red Sprite constructed and added to the stage. But actually the red Sprite isn't visible until the onClick() function has been fully executed.
Why is that and what can I do for the red Sprite to be visible immediately?
Is there some (for the developer invisible) global paint() or update() function, that is not executed until some stack is fully executed or something?
View 2 Replies
Mar 19, 2006
I'm an intermediate AS2 coder starting to use better OOP practices. I have searched for the answer to this but have not found anything, perhaps because everyone else learned it a long time ago.It appears that classes which extend an MC which is contained inside a different MC do not run their constructor immediately after the containing MC is instantiated. Also this MC's methods are not immediately available. As a result I need to wait a bit, by using onLoad or another frame.Here is an illustration which I have made as slim as possible:
LIBRARY:
--Symbol with ID "ball", linked to AS2 class "Ball".
--Symbol with ID "box", linked to AS2 class "Box". This symbol contains an instance of "ball" which I dragged in there and gave an instance name "ball_0".
--Symbol with ID "launcher", linked to AS2 class "Launcher".[code].....
QUESTIONS: How can I fix this so that setB would work in the above example? I have found two workarounds but I wonder if there is another which feels less kludgy.
Solution A): As seen in the example, put into Ball an onLoad function (or maybe just its constructor) which then runs any initialization functions. As a result I need to store in the object some properties which the object can find in itself and use for initialization.
Solution B): Put the method call on a timeline frame after the frame in which the attachMovie is done.
At the heart of this question is, why can I set the ball's properties (as seen with setA) but not be able to call its methods successfully? On one hand, I can see that the thread is busy with the box's initialization and can't be expected to run ball's constructor right away, even though ball has been instanced. But on the other hand, I am actually calling a method of an instance which is obviously there, so shouldn't it have the common decency to do as I ask?
Bonus question is, is the fact that this does not work a bug in Flash AS2 or is it perfectly to be expected due to some CS common sense which I lack?Another bonus question is, is this a harebrained way to use Flash AS2 classes—linking symbols to AS2 classes which extend MovieClip (or which are subclasses of classes which themselves extend MovieClip), and using attachMovie to instance all of these MCs except the one "Launcher" which is the only thing on the .fla's stage? It's a cornerstone of my architecture so I'd like to know if this is utterly daft.
View 4 Replies
Dec 9, 2009
I am working on a presentation deck with a resolution of 2880 x 1571. I am in need of some help on two fronts for the final result. First off, I need it to go to fullscreen immediately upon opening. I am not sure if we will be using this through a browser, or stand alone flash player, but I am not having much luck getting the fullscreen functionality to work.
Also, do to the high resolution, "if" I go fullscreen, will it scale to fullscreen? Or is there a way to do this? Those things being said, I tried a full screen script, however, I lost some functionality on two swfs that I load from external files within the deck is this normal? Or something I am missing.
View 1 Replies
Sep 3, 2010
flash is not my area of expertise, but I've inherited a task that deals with AS2 Basically, I have a flash document (a loader?) with the following AS 2.0 code:
[Code]...
Basically, the idea is after the movie finishes playing, you should get redirected to a new page. The problem is that sometimes the page redirects immediately (before the movie is played). The movies are being served up from a media server and this seems to happen more consistently with newly uploaded movies. Sometimes it takes several attempts to actually play the movie all the way through, but over time, the movies generally start to play problem-free.
View 1 Replies
Oct 3, 2009
I've got a bar. Its _xscale is increasing. It starts from 0, max is 100, of course. It's my script:
[Code]...
I added an object. This object appears in the middle of the stage and goes down by script:
[Code]...
And it works - the object, which has to be an enemy, appears and fall down perfectly. But when it appears my bar immediately stops increasing!
View 0 Replies