apache-flex

How to extract specific parts of a URL and replace with different data

淺唱寂寞╮ 提交于 2019-12-11 16:52:59
问题 I have a specific type url and i need to identify some parts of it and replace with some data, url would be www.something.com@param1={{^User Name^}},param2={{^user id^}} ,.... What i need to do is, identify {{^User Name^}} and {{^user id^}} and replace with my values, Anybody have an idea to do this with flex? A friend of mine told me to use RegExp for this, but I'm clueless about how to use it. 回答1: Something like this might work, no expert on RegExp tho. var s:String = "www.something.com

Flex. pushView data Object being converted into a String

泄露秘密 提交于 2019-12-11 16:52:55
问题 After executing a navigator.pushView with data object, I'm in need of the data object to be received into the next view, but at some stage transformed into a string to use in a sql function. The code below shows what I'm working on at the moment. <s:View xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark" title="{data.toString()}" xmlns:model="model.*" creationComplete = "{data=srv.findByCategory(data.toString())}" > .toString() was my quick attempt at it, but

pass data to child swf after swf loading completed

元气小坏坏 提交于 2019-12-11 16:48:07
问题 I am loading one swf file inside a main swf by using swfloader and i want to pass the parameters to the loaded swf. How can i get the loaded child reference to pass data. My sample code is as follows TestFile1.mxml public var loader:Loader = new Loader(); loader.contentLoaderInfo.addEventListener(Event.COMPLETE, myFun); loader.load(new URLRequest("/view/flex/TestFile2.swf"), new LoaderContext(false, ApplicationDomain.currentDomain)); viewId.addChild(loader); public function myFun(event:Event)

Setting Up Flex Project with Coldfusion

本小妞迷上赌 提交于 2019-12-11 16:45:18
问题 We recently built a new dev server for flex builder and installed coldfusion 8. We currently have everything working on our old server using coldfusion 7. We copied the services-config.xml and our project over to the new server. It compiled fine, I updated all references to the new server. When I try to run the flex application I receive the following error: Warning: Failed to load policy file from http://localhost/crossdomain.xml * Security Sandbox Violation * Connection to http://localhost

Where in the framework is the Graphics object passed around to achieve drawing?

て烟熏妆下的殇ゞ 提交于 2019-12-11 16:43:58
问题 I'm trying to understand how the Flex framework draws objects (Button, Label, Image, etc.). The Button class seems to draw itself by addChild()ing its ProgrammaticSkin. However, where in the framework is the Graphics object being passed around in the hierarchy to achieve the drawing. I want to get to the level of 2D API. 回答1: There is no single global graphics object in flash/flex. Every Shape and Sprite (UIComponent is a Sprite) has a graphics object of type Graphics that can be drawn on. In

Flex DateField validate date with Editable = True

混江龙づ霸主 提交于 2019-12-11 16:41:16
问题 We have a Datefield component with Editable = true <mx:DateField id="startDate" width="120" editable="true" formatString="MM/DD/YYYY" selectableRange="{{rangeStart : new Date(2010,0,1), rangeEnd : new Date()}}" showToday="true" labelFunction="formatDate" restrict="[0-9] '\/'" change="startDate_clickHandler(event)" yearNavigationEnabled="true" text="{}" tabIndex="15" /> The Calendar has everything we want (able to choose a valid date only after 01/01/2010). Now the issue is that if the user

Bindings failing when compiled through Flash IDE

折月煮酒 提交于 2019-12-11 16:34:02
问题 I have created an API in AS3 that uses Flex bindings. The API is being used by two other developers. I am delivering the API in an SWC that includes all code, including the required Flex libraries. The two other developers are building the API into AS3-only projects. One developer is compiling using the Flex SDK through FDT. He includes the SWC in his project and he is able to bind any bindable property. When he uses ChangeWatcher.canWatch on a bindable property, it returns true. The second

Flex: getting the height of a collection of controls

自古美人都是妖i 提交于 2019-12-11 16:26:02
问题 Or putting it more accurately, I want to be able to get the distance between the top of a control to the top of one of its children (and adding the height member of all the above children yields specious results!) but the process of getting the absolute coordinates, and comparing them, looks really messed up. I use this function to calculate the height between the tops of 2 tags: private static function GetRemainingHeight(oParent:Container, oChild:Container, yParent:Number, yChild:Number)

Intercepting network calls to force Html header referer to null

前提是你 提交于 2019-12-11 16:17:13
问题 I've been using the Flex "HTML" component in my AIR 2.7 project. It's a wrapper for the HtmlLoader class. The problem is that empty referers in HTML headers are automatically set to "app://[appname].swf". This is not standard as default referer behavior should be to not set any referer at all. The consequence is I'm getting denied access on certain websites using iframes (as location changes from an iframe set an empty referer). I have no control over those requests has no event is fired when

how to embed audio in flex 3?

浪子不回头ぞ 提交于 2019-12-11 16:16:44
问题 i want to play a sound when user click on the button in flex 3. My flex application will generate the images one by one. For each image, one sound should come in background. Any ideas? thanks in advance 回答1: You should be able to write something like this: [Embed(source="myfile.mp3")] [Bindable] //Not required. Just an example of using multiple meta tags. public var soundCls:Class; This will give you the ability to reference the file via the class name 回答2: The official documentation created