actionscript

Why does delete( DictionaryInstance[ key ] ); fail?

妖精的绣舞 提交于 2019-12-21 08:15:11
问题 My app uses a Dictionary protected _categoryToValueDict:Dictionary = new Dictionary(); to map something to something else. Now, at a certain point in the application, I need to remove a certain key from the Dictionary . I implemented this simple method: public function setCategoryNoValue( cat:TAModelCategory ):void { // delete( _categoryToValueDict[ cat ] ); var old:Dictionary = _categoryToValueDict; _categoryToValueDict = new Dictionary(); for ( var key:* in old ) { if ( key != cat ) {

Difference between stage.width and stage.stageWidth

倖福魔咒の 提交于 2019-12-21 07:13:21
问题 In actionscript 3 (as3) What is the difference between calling stage.width and stage.stageWidth This was something I remember I got confused about in the past (Adobe's api docs are an artform in obfuscation :) ). Thought I should post it on stackoverflow. 回答1: stageWidth is basically width of the player window. You probably need this number if you want to know size of your scene. stage.width is calculated as any other width in actionscript. This means, it is width of bounding box around child

AS3 Components in Flash Designer

青春壹個敷衍的年華 提交于 2019-12-21 06:15:30
问题 In an ActionScript 2 project I can create a new MovieClip, right-click on it on the library and select "Component Definition" to add parameters that can be referenced inside the MovieClip. This parameters can be easily changed in the MovieClips's properties. Now, I'm working on an ActionScript 3 project but haven't been able to figure out a way to obtain the values passed in those parameters. I defined a parameter named "textToDisplay" but when I write the following in the Actions for the

Event-driven CMS - advantages and disadvantages

房东的猫 提交于 2019-12-21 03:52:35
问题 I'm trying to identify some of the pros and cons of having a CMS that is event driven. Event driven is not uncommon. You see it in many scripting languages like Actionscript, javascript, jquery that involve a client. How about in a CMS where the events and their responses happen on the server. What advantages or disadvantages might this approach have, and what other approaches are there that people may prefer more. P.S. Please note that I use Actionscript, JQ, and JS as an example only. You

FOSS tools for Flash development [closed]

房东的猫 提交于 2019-12-21 03:35:12
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 4 years ago . I'm looking into doing some development for Flash. Do I need to buy expensive commercial tools or are there some FOSS tools out there I can get started with? Clearly there are a lot of tools out there, but are they good enough to actually get work done? What would I be missing by avoiding the commercial or

What text inside Flash is indexed by Google?

只愿长相守 提交于 2019-12-21 03:00:50
问题 Does the following mean that dynamic TextFields will NOT be indexed? We currently do not attach content from external resources that are loaded by your Flash files. If your Flash file loads an HTML file, an XML file , another SWF file, etc., Google will separately index that resource, but it will not yet be considered to be part of the content in your Flash file. Does the following mean that ONLY static TextFields will be indexed? At this time, content loaded dynamically from resource files

Itemrenderer Dispatch Custom Event

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-21 02:57:09
问题 I'm trying to dispatch a custom event from a custom ItemRenderer This is my custom event package events { import customClass.Product; import flash.events.Event; public class CopyProductEvent extends Event { public static const COPY_PRODUCT:String = "COPY_PRODUCT"; public var picked:Prodotti; public function CopyProductEvent(type:String, picked:Product) { super(type); this.picked = picked; } } } In the itemRenderer I have a function that does that: private function sendEvent(o:Product):void {

Flash designer/coder collaboration best practices

梦想与她 提交于 2019-12-20 20:40:51
问题 I've done several flash projects working as the ActionScripter with a designer doing all the pretty things and animation. When starting out I found quite a lot of information about ActionScript coding and flash design. Most of the information available seems to focus on one or the other. I didn't find any information about building flash projects in a way that lets the coder do their thing AND gives the designer freedom as well. Hopefully more experienced people can share, these are some of

Test if an object is defined in ActionScript

瘦欲@ 提交于 2019-12-20 16:22:44
问题 In ActionScript, how can you test if an object is defined, that is, not null? 回答1: test if an object is defined This works in AS2 and AS3, and is the most reliable way to test if an object has a value. if (obj != null) { doSomethingWith(obj); } Its also the most reliable way to test an object's property and read it in the same expression: if (arr[0] != null && arr[0]>5) { doSomethingWith(arr[0]); } test if an object is null There's a difference between null and undefined, but if you don't

Play video from local file using Adobe AIR

别说谁变了你拦得住时间么 提交于 2019-12-20 11:33:11
问题 I'd like to play videos, as well as display images and possibly other flash content using adobe air, and reading from the local file system. I've been searching APIs and I have not yet been able to connect the dots. I know of flash.filesystem.File and flash.filesystem.FileStream and have experimented with loading and reading files. I believe I can load images this way but haven't tried. As for video: mx.controls.VideoDisplay - seems to accept a file:// URI for source, but I can't get it to