actionscript-3

HIghlight row in red border in AdvancedDataGrid in Flex 4

我的梦境 提交于 2019-12-25 18:28:50
问题 I want to highlight the row in red border in AdvancedDataGrid without selecting the row. My selected item is different from the highlight row. Please see the following image : My selected index is where Territory is Nevada but my highlighted row is different(in Red Border) based on some condition. So please tell me how can i implement it. 回答1: You will have to extend mx.controls.advancedDataGridClasses.AdvancedDataGridGroupItemRenderer and add the condition + visuals to add the red border

What methods are there for creating FLAs with dynamically created text, that outputs swfs with only the font glyphs included that are required?

十年热恋 提交于 2019-12-25 17:48:48
问题 When I create an FLA with static text fields it only includes the glyphs that are in the text fields. This is the behaviour required, but I want to create those text fields from XML. I want to be able to create an FLA with dynamic text fields so that I can populate them using a config ( XML ) file, and then the output is like an FLA with static text fields - so that I use as few glyphs as possible. Is this possible? I suppose I could write a .jsfl script to read an XML file to make this work

What is the difference between [object main timeline], stage and root in as3?

断了今生、忘了曾经 提交于 2019-12-25 17:47:22
问题 I want to know the difference between [object main timeline] , stage and root in as3. 回答1: Here is a what seems to be a decent text covering the subject, it's linked to by several people: How stage, root, and MainTimeline Fit Together 来源: https://stackoverflow.com/questions/7295379/what-is-the-difference-between-object-main-timeline-stage-and-root-in-as3

AS3 debugger stops responding while trying to load image into sprite using Loader

六眼飞鱼酱① 提交于 2019-12-25 17:27:16
问题 I'm trying to create a simple Menu in AS3. There is a sprite called startButton , which when pressed will call the function startGame , and that's it! But, not so easy. I'm using flashdevelop IDE so I'm trying to call a loader to get a .png image file for the spite startButton . But, it doesn't work. There are no error messages, the debugger just does not respond. Any help? Here is the code for both files Main code: package { //Other Files import Menu; import flash.display.Bitmap; import

FLEX/AS3 How to open docx/odt file

时光总嘲笑我的痴心妄想 提交于 2019-12-25 17:18:19
问题 I have function that create docx or odt file. I need automaticly to open this file in microsoft/libre office, right after creation complete. How to coding this in flex/as3 ? protected function create003(docType:String, patientID:String):void { create003Result.token = nhealthReports.create003(docType, patientID); } protected function getFormModuleDataResult_resultHandler(event:ResultEvent):void { var pathToFile:String; pathToFile=create003Result.lastResult; // this is path to created file //

How to check if a number is between two other numbers in Actionscript 3?

人盡茶涼 提交于 2019-12-25 17:05:38
问题 How can i check if a number is between two other numbers like: pseudocode: var = 458; if (var is between 0 and 1000) give positive. if (var is between 1001 and 2000) give negative. if (var is between 2001 and 3000) give negative. in AS3? Thanks in advance. 回答1: If You will check it many times, simply create function : function check(min:Number , value:Number , max:Number):Boolean{ return min > value ? false : ( max < value ? false : true ); } It will return true if value is between min and

Changing text dynamically with drag / drop in Flash CS6 (AS3)

巧了我就是萌 提交于 2019-12-25 16:54:43
问题 I have some incredibly simple code that works fine in letting me drag a "slider" button horizontally. However, I also want the text that appears above the object to change depending upon what the x-coordinate is of the object I'm dragging. Here's the simple code: var rectangle:Rectangle = new Rectangle(31,944,179,0); Button.addEventListener(MouseEvent.MOUSE_DOWN, fl_ClickToDrag); function fl_ClickToDrag(event:MouseEvent):void { Button.startDrag(false, rectangle); } Button.addEventListener

Syncing Frames to Audio and channel.position Accuracy

和自甴很熟 提交于 2019-12-25 16:42:35
问题 Calling channel.position on an ENTER_FRAME event, I notice that it's not being updated every frame, but it looks more like every frame and a half. var sound:Sound = new Sound(new URLRequest('music.mp3')); var channel:SoundChannel = sound.play(); // assume the sound is completely, // totally, 100% loaded addEventListener(Event.ENTER_FRAME, function(e:Event):void{ trace( "Position : " + channel.position + " - Frame : " + int(channel.position / 30)); }); will result in something along the lines

Actionscript Arrays of Objects?

荒凉一梦 提交于 2019-12-25 16:40:53
问题 I have a class named TextLink. The text is meant to be clicked on and it should dispatch an event (which I'm not too concerned about yet)... currently it just prints out a message. The class takes an x, y, and a string to set the text. Dead simple... But it crashes the browser. Instance calls in main: package { import flash.display.Sprite; import nav.text.TextLink; public class test_array_of_objects extends Sprite { public function test_array_of_objects() { var ary:Array = new Array(5); var i

Create Windows/Macintosh Projector from Flash Builder 4

孤街浪徒 提交于 2019-12-25 16:24:32
问题 Am I able to publish a Windows/Macintosh projector from Flash Builder 4? I would like a solution that stays within the IDE, rather than having to open FlashPlayer.exe and export the EXE/App. 回答1: You can display your swf in the standalone flash player, and then create the projector from there (file -> create projector). http://download.macromedia.com/pub/flashplayer/updaters/10/flashplayer_10_sa.exe 回答2: Closing this question...doesn't seem possible. I'm sticking with Flash CS5 to publish