apache-flex

Flex 4 Custom Component - How to notify skin of property changes?

ぐ巨炮叔叔 提交于 2020-01-24 04:13:05
问题 I have a custom Flex 4+ component that I am trying to make and have the skin be aware of changes to a custom property. This property will determine the graphic on the button (and some other visual changes) but the data will change constantly as it will be updated by a timer. I've looked at untold examples and still seem unable to get the syntax correct or discover how things should be separated. I've looked at overriding commitProperties and the PropertyChangeEvent without success. So I have

Saving a bytearray with php received from Flex Air app

ε祈祈猫儿з 提交于 2020-01-23 19:27:47
问题 I have an Air application with remote service in codeigniter. I'm trying to save a bytearray that I received from the Air app but when I save the data I get empty files with the correct filename. So there must be something wrong with my bytearray or the way I save the data. Does anyone have an idea what I'm doing wrong? I've debugged the Arraycollection I sent and the bytearray is definitely in there. public function uploadImage($image) { foreach($image as $img) { $file = $img['name']; $data

communication between two flex apps

久未见 提交于 2020-01-23 06:38:45
问题 I have 2 flex apps on the same page. I want them to be able to call each other's public functions. I am thinking of using either externalInterface calls or FaBridge to do so. Is there a better way to do it? 回答1: The best way to go is to use LocalConnection. It allows you to call methods from a separate SWF without having to go through Javascript or a server. Tip: if you're going to be sending arguments that are greater than about 20KB in size, you will want to split them up in two or more

What is the best approach to moving a preexisting project from Flash 7/AS2 to Flex/AS3?

徘徊边缘 提交于 2020-01-23 06:23:48
问题 I have a large codebase that targetted Flash 7, with a lot of AS2 classes. I'm hoping that I'll be able to use Flex for any new projects, but a lot of new stuff in our roadmap is additions to the old code. The syntax for AS2 and AS3 is generally the same, so I'm starting to wonder how hard it would be to port the current codebase to Flex/AS3. I know all the UI-related stuff would be iffy (currently the UI is generated at runtime with a lot of createEmptyMovieClip() and attachMovie() stuff),

Adobe Air for Windows 64 bit?

不问归期 提交于 2020-01-23 03:44:11
问题 We are developing some memory intensive Adobe Air Desktop applications that sometimes peek above the 32 bit 1.3 Gb Limit in Windows and get purged by the OS. Unfortunately we can't find any options from Flex Builder to export to Windows 64 bit. It seems from the Adobe forum that more people are interested in this feature and Adobe seems not committed yet to implemented it. If anyone has the same issue and would like this supported please vote on the Adobe forum: https://bugbase.adobe.com

Flex Charts: Can you use a minimum/maximum point from an IAxis for Cartesian Data Canvas to draw the entire width of the chart?

情到浓时终转凉″ 提交于 2020-01-23 03:30:29
问题 I have a chart with a DateTime axis as my horizontal and a Linear Axis for my vertical inside a Adobe Flex Line Chart. I want to use a Cartesian Data Canvas as a background element and draw custom set of background graphics mostly rectangles. When I have more than a single data point, the graphics work perfectly since they are supposed to span the width of the entire chart. When I have only a single data point, however, I can't seem to get the rectangles to draw. Since I want my rectangles to

Flex/ActionScript - rotate Sprite around its center

隐身守侯 提交于 2020-01-22 10:46:12
问题 I have created a Sprite in Actionscript and rendered it to a Flex Canvas. Suppose: var fooShape:Sprite = new FooSpriteSubclass(); fooCanvas.rawChildren.addChild(myshape); //Sprite shape renders on screen fooShape.rotation = fooNumber; This will rotate my shape, but seems to rotate it around the upper-left point of its parent container(the canvas). How can I force the Sprite to rotate about is own center point? I could obviously write code to calculate the rotation, and then have it re-render,

Zoom to and from point

末鹿安然 提交于 2020-01-22 02:24:12
问题 I'm trying to zoom a DisplayObject into a certain point. I figured it would be easy, but I've spent a day now trying to figure it out. Basically, I think this should work. Emphasis on should. //newPoint is the point being centered. There is no initial scaling, so I do not need to compensate for that (yet) //scale is the zoom level //container is the parent of the obj //obj is the object being scaled/panned var p:Point = new Point( ( this.container.width - this.obj.width * scale + newPoint.x *

What is the maximum integer value in Flex?

感情迁移 提交于 2020-01-21 11:19:07
问题 I was trying to display a number: 2893604342.00. But, when i am displaying it it is displayed as: -2893604342. Following is the code snippet ... avg += int(totalData[i][col.dataField]); I have even replaced it with Number , but it's still showing the same negative number. Please let me know whether there is any problem with int or Number ! 回答1: The maximum values are accessible through each numeric type's static properties: Number.MAX_VALUE uint.MAX_VALUE int.MAX_VALUE (Just trace 'em.) 回答2:

How do I set the dataProvider for an <s:List> component to be an XML file?

♀尐吖头ヾ 提交于 2020-01-21 10:14:28
问题 I've got the latest Beta of Adobe Flash Builder 4. I want to use a <s:List> component, and specify the dataProvider as being an XML file. However, after loads of research (including looking at doc links off labs.adobe.com), I still can't figure out how to do it. The XML file will look something like this: <?xml version="1.0" encoding="ISO-8859-1"?> <imageList> <image location="path/to/file1.jpg" /> <image location="path/to/file2.jpg" /> <image location="path/to/file3.jpg" /> </imageList> 回答1: