actionscript-3

Actionscript 3.0 - Custom Events with Parameters

99封情书 提交于 2019-12-13 05:29:08
问题 Is there any simple -- or suggested -- way in order to send a parameter along with a custom event? Or even just a way to pass variables between two classes? My program is a sort of simple Civ/Age of Empires kind of game, where you can place buildings on tiles. This would work as follows: Player clicks on the icon on the HUD, which creates an dispatches an event which is received by the PLAYER class. The PLAYER class changes a value depending on which building is held (clicked on). Player

AS3 - How do you receive parameters in a swf from a GET request?

孤者浪人 提交于 2019-12-13 05:19:27
问题 I tried using var params: Object = ((this.stage.loaderInfo) as LoaderInfo).parameters; to get the parameters, but it returns an Object with no properties. That LoaderInfo will give me the correct URL without the parameters though if I use LoaderInfo.url. I'm using the request: http://localhost/foo.swf?start=foobar. params.hasOwnProperty("start") returns nothing, and using a for loop shows that "params" has no properties. How do I receive the start/foobar pair in my code? I would much prefer

Hide a Button in a ButtonBar

只愿长相守 提交于 2019-12-13 05:15:17
问题 I was wondering if there is any way you hide a particular button in a ButtonBar. According to this answer (and the link provided in the second answer) Disable individual buttons in a buttonbar I need to use the getChildAt method of the ButtonBar, but when I do that I get the custom skin object and not the Button object. I was wondering how I could get access to the Button object. Thanks! 回答1: Under the assumption that all buttons in your button bar will be rendered at the same time and you

AS3 and Youtube API default Youtube buttons

筅森魡賤 提交于 2019-12-13 05:13:14
问题 This seems like a simple enough question, I have some straight-forward AS3 to load a video from Youtube, using the Youtube API. That's working just fine, however I expect the default Youtube player controls to show up, and they don't seem to be. I see how to toggle them on via HTML, but I need them to be toggled on via the AS3 as I can't edit the HTML Embed or IFrame tags. Here is my code so far: import flash.display.Loader; import flash.net.URLRequest; import flash.events.Event; import flash

How to get ability to start up multiple same Adobe Air applications?

丶灬走出姿态 提交于 2019-12-13 05:08:12
问题 How to be able to start up same Adobe Air applications multiple times? How to make it to my app? 回答1: Multiple instances are not supported, but you can work around it. If you want the feature to support being run multiple times, you can respond to the InvokeEvent.INVOKE event dispatched by the NativeApplication. You can then open a new window and make it appear that the application is running multiple times. Alternatively, if you are simply trying to run the application multiple times to test

how do I open a newly written file from application storage directory in as3 / flex mobile?

放肆的年华 提交于 2019-12-13 05:03:59
问题 Im working on an app (flex 4.12 sdk, using flashbuilder 4.5, creating an app for ios and android, testing on an android htc one primarily)... and am using the camera to capture a file... Im then saving that image to the application storage directory, and I want to open the image in the default web browser or trigger a native dialog (android users) to choose the web browser of their choice... how it opens isnt really important right now -- Im mainly trying to just 'access' it with the device

AS3 function call from javascript

旧巷老猫 提交于 2019-12-13 05:03:03
问题 I am trying to call a AS3 function from javascript but getting the following error in browser: Object doesnot support property or method myCreateFile . Below is the AS3 class: package { import flash.display.Sprite; import flash.external.ExternalInterface; import flash.net.FileReference; import flash.events.IOErrorEvent; import flash.events.Event; import flash.system.Security; public class CreateDoc extends Sprite { private static const DEFAULT_FILE_NAME:String = "example.txt"; //FileReference

Flex: application is confused when passing variables to custom component

£可爱£侵袭症+ 提交于 2019-12-13 05:01:29
问题 I'm new to Flex and I'm missing something very basic about architecting a Flex application -- I've implemented a custom component MyReportGrid and extended GridColumn with MyColumn . I've tried to outline the application code below. The interesting thing to notice is that class OfficeItems is used by class MyItems , and the MyColumn (which extends GridColumn ) includes a customPath variable that is used to access variables pen , pencil , and stapler inside class OfficeItems . I believe that

Record videoconference application to flv

和自甴很熟 提交于 2019-12-13 05:01:05
问题 I've spent plenty of time solving this problem, but it looks like I need some help. I have a web conference application which provides ability to stream live video, chat, share documents, draw on a whiteboard, share desktop, etc. And now I want to record everything that happens in taken separately so called webinar , including video and sound. So I'm looking for tools that can help with this goal. Here's input data: This is Adobe Flash based application Using wowza server Everything should be

How can I extract the outline of text and export it to SVG?

耗尽温柔 提交于 2019-12-13 05:00:35
问题 Is there anyway to get the outline (Vector Object) of the text of a TextField using as3 code? Or to draw the paths of the TextField characters as a graphic? I want to store them in an SVG file. 回答1: It doesn't look like there is an easy built-in way to do this. But as the famous saying goes: " we choose to extract a font outline in flash and do the other things, not because they're easy... ", you know, just to put this into a bit of perspective of how big a pain in the but this is going to be