actionscript-3

Flash Movies and ActionScript - Stop the video from working offline

北城以北 提交于 2019-12-14 03:59:17
问题 I posted a question on superuser which seems to have a code related answer, so here it goes. I have a problem; I need to share videos online, but need to find a way to either completely stop, or at least make it hard for people to download them and view them online. I'm aware that if it was possible, Hollywood would have done it already, but I have an idea... Some years ago I stumbled across a video on newgrounds.com, a site for flash animators to post their content for users to rate,

Flash vertical text alignment in middle

自闭症网瘾萝莉.ら 提交于 2019-12-14 03:56:50
问题 I've been looking for a way to programmatically and by default set a dynamic text box to vertically align in the middle of the box. I find it really hard to believe that there's no option to do this, unless I'm excessively blind. Else how can I fake it? Thanks! 回答1: var parentContainer:DisplayObjectContainer = ...; var textField:TextField = ...; textField.autoSize = TextFieldAutoSize.CENTER; // set width, height, wordWrap etc if needed //after setting the text or in the textInput event

Using your own AMS, how can you use BitmapData.draw() on an RTMP stream with no security exception?

…衆ロ難τιáo~ 提交于 2019-12-14 03:53:46
问题 I've posted a similar question about the more general case, but this question deals specifically with RTMP. We have an Adobe AIR app written in AS3 that can view live video streams from other parties. That being said, when trying to call BitmapData.draw() on one of those remote video streams (technically we're calling ImageSnapshot.captureImage() ), we're getting a 2123 error - a security sandbox exception. I've seen a lot of people refer to a real simple configuration in the AMS that will

What Flash player version is required by (simple) Flex 3 apps?

柔情痞子 提交于 2019-12-14 03:53:13
问题 What Flash player version is required by Flex 3 app ? Requirement seems to be HTML WRAPPER/ACTIONSCRIPT compiler setting inside FLEX development environment; what can I choose there to allow maximum compatibility with old flash players? Will v8 player work? 回答1: Flex is built upon ActionScript 3, and that was introduced in flash player 9 so V8 player would not work if you want to run flex 3 app on it. To run ActionScript 3 you need AVM 2 (Actionscript virtual machine), flash player v8 cotains

Security Sandbox Violation

故事扮演 提交于 2019-12-14 03:51:49
问题 while running my flash application i get the below error * Security Sandbox Violation * Connection to rtmp://system ip/live halted - not permitted from file:///F:/Flash work/RTS/RT/vlab/BIOTECH/NEO/passive-properties-of-a-simple-neuron/vi-characteristics-of- solarpanel.swf -- Untrusted local SWFs may not contact the Internet. SecurityError: Error #2028: Local-with-filesystem SWF file file:///F:/Flash work/RTS/RT/vlab/BIOTECH/NEO/passive-properties-of-a-simple-neuron/vi-characteristics-of

AS3 Filesystem Hello World

断了今生、忘了曾经 提交于 2019-12-14 03:22:17
问题 I would like to use ActionScript3 to write "Hello World" to a text file. I'd like to compile and run that code from the command line. Installed: Windows 10, Adobe AIR 18.0 SDK, flex_sdk_4.6 (TLDR: I want to do automated testing for a much larger piece of code from the command line, and of course I can't figure out this piece) I am missing some steps that I can't figure out. Here's my code: MainF.as package { import flash.display.*; import flash.text.*; import flash.filesystem.*; public class

Conditional color change <s:SolidColor>

左心房为你撑大大i 提交于 2019-12-14 03:18:47
问题 I am unable to get the DataGridItemRenderer to pass a color value to <s:SolidColor based on the function containing an if statement based on the value of data.Bld_Type. Code below. I am vey new to Flex and not sure what the problem or if this is the right way of doing it. Any help would be appreciated. I have tried passing a hex number and color name. Neither work. Thanks. <?xml version="1.0" encoding="utf-8"?> <s:MXDataGridItemRenderer xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s=

AS3: How to implement instanceOf with classes?

∥☆過路亽.° 提交于 2019-12-14 03:18:13
问题 I want to implement this method function isInstance(a:Class, b:Class):Boolean; This is how AS3 work with Classes. Note that MovieClip extends Sprite. trace(MovieClip is Sprite); // false trace(Sprite is MovieClip); // false trace(Sprite is Sprite); // false trace(Sprite is Object); // true I been trying the next code but it is not working: /** * return if instance of class 'a' can be cast to instant of class 'b' */ private function isInstance(a:Class, b:Class):Boolean{ var superclass:Class =

16 bit tiff decoder for flex

北城余情 提交于 2019-12-14 03:15:21
问题 I am trying to open a 16 bit tiff image in my AIR app. What I have found is a baseline decoder which supports only 8 bit images. Here are my options: Extend its functionality to open 16 bit images but I dont know how to do that and how trivial it is. Open my images as 8 bit but I need to do that automatically within Flex. Dont know how to do that either. i also need to support lzw compression for tiff, so please refer me some resources so I can develop that in case it doesnt exist already.

Run an AS3 function only once

…衆ロ難τιáo~ 提交于 2019-12-14 03:14:44
问题 I'm making an AIR app and I would like to know if it's possible to run a function only once ? If the user reboot his device and launch the app, the function won't be trigger again. Thank you for your answers, 回答1: Since you're using adobe AIR, you have a few options. Write a file that contains your save data. Using AIR you can write a data file to the user's machine. This is more permanent than SharedObject's, which for various reasons can not work or persist long term. You can actually