actionscript

existing swf mp4 player? [closed]

主宰稳场 提交于 2019-12-02 21:30:31
I have a mp4 file put in my website, say http://example.com/a.mp4 , I want a swf player that can be embedded into my html, and play the mp4 file. I don't know how to write actionscript so I just want to have an existing swf file. Requirement: small, fancy, full function, ad free. Thanks. There are plenty of players available, for example http://www.longtailvideo.com/players/jw-flv-player/ or http://flowplayer.org/ . I was recently looking for a simple, robust, usable, non-branded swf video player to use as a flash fallback when using the HTML5 <video> element, and I found the Strobe Media

Best Practice for Transitioning From Nested State to Nested State (see diagram)

房东的猫 提交于 2019-12-02 19:48:06
I am trying to wrap my mind around the best way to implement nested state transitions in a single threaded programming language (Actionscript). Say I have a structure like this behavior tree: Now imagine that each leaf node is a destination point on a website, like an image in a gallery, or a comment nested in a post view nested in a page view... And the goal is to be able to run animated transitions from leaf node to leaf node, by animating out the previous tree (from bottom to top), and animating in the current tree (from top to bottom). So, if we were at the bottom-left-most leaf node, and

How to dynamically fill a progress bar in Flex/Actionscript?

断了今生、忘了曾经 提交于 2019-12-02 19:20:53
问题 I want to create a progress bar of which a % of it is filled in with a different color based on some variable. For example 33 % would fill 33 % of the progress bar with a different color and then 40 % would likewise, fill 40 % of it. What is the best way to do this in Actionscript and Flex 3? 回答1: The way I've done this in the past is to create a custom progress bar skin, then set the fill to be a gradient that goes the entire length of the bar (even though a smaller portion of the bar

Endless repeating scrolling background

▼魔方 西西 提交于 2019-12-02 19:06:15
问题 I got a problem with AS3 and AIR. I'm working on a side-scrolling game for smartphones with a plane and I use different backgrounds as layers. Before all other: I use GPU and only bitmaps, quality is set to low. So Performance settings are all set for smartphone use. I putted them into a rectangle using the drawing API and move the background with a matrix: protected var scrollingBitmap:BitmapData; protected var canvas:Graphics; protected var matrix:Matrix; public function move(dx:Number, dy

How do I get from an instance of a class to a Class object in ActionScript 3?

淺唱寂寞╮ 提交于 2019-12-02 16:43:22
How do you get an instance of the actionscript class Class from an instance of that class? In Python, this would be x.__class__ ; in Java, x.getClass(); . I'm aware that certain terrible hacks exist to do this, but I'm looking for a built-in language facility, or at least a library routine built on something reliable. You can get it through the 'constructor' property of the base Object class. i.e.: var myClass:Class = Object(myObj).constructor; Any reason you couldn't do this? var s:Sprite = new flash.display.Sprite(); var className:String = flash.utils.getQualifiedClassName( s ); var myClass

Open PDF or Folder

混江龙づ霸主 提交于 2019-12-02 16:41:25
问题 I try to open PDFs or folders (in finder/explorer) triggered by a mouse click in a swf application running in flash player. Opening a PDF via urlRequest and navigateToUrl() always opens the browser. I read about this solution with fscommand and it seems that we have to write shell scripts for mac and PC. Doesn't sound perfect. The swf is executed on cd ROM. So I think we can't use an air application and the classes of the air framework (File... etc.). Is there a better way? 回答1: As far as I

Actionscript 3 saving currentframe location to local hard drive?

淺唱寂寞╮ 提交于 2019-12-02 16:38:20
问题 I asked similar question sometime ago, but I am making new one to be much more specific with my question with some example! I´ve found this code snippet/tutorial from googling, but I cant seem to figure out how to modify it for my needs: // open a local shared object called "myStuff", if there is no such object - create a new one var savedstuff:SharedObject = SharedObject.getLocal("myStuff"); // manage buttons btnSave.addEventListener(MouseEvent.CLICK, SaveData); btnLoad.addEventListener

AS3 - Call a method between classes

 ̄綄美尐妖づ 提交于 2019-12-02 14:49:36
问题 I'm almost entirely new to OOP, and I just don't understand how to call a method in one class from another. I'm trying to call a method in the Main.as from a custom class, but it always comes up as the "Call to possibly undefined method" error, and I don't know a way around it. Main.as code: package { import flash.display.MovieClip; public class Main extends MovieClip { public var titleScreen:TitleScreen = new TitleScreen(); public var feedMeShibe:FeedMeShibe = new FeedMeShibe; //These are

Actionscript 3 - List error when loading another a swf in my swf

你说的曾经没有我的故事 提交于 2019-12-02 14:32:40
问题 I am working on a AS3/Flash game and we are running into an issue when we load our home page swf into our login swf after someone successfully logs in. TypeError: Error #2007: Parameter child must be non-null. at flash.display::DisplayObjectContainer/addChildAt() at fl.controls::BaseButton/drawBackground() at fl.controls::LabelButton/draw() at fl.controls::Button/draw() at fl.core::UIComponent/drawNow() at fl.controls::List/drawList() at fl.controls::List/draw() at fl.core::UIComponent

Dealing with infinite/huge worlds in actionscript 2

强颜欢笑 提交于 2019-12-02 11:06:54
How are infinite/huge procedural generated worlds achieved with minimal lag in actionscript 2? In a game like Terraria or Minecraft for example. What would the best way to go about handling huge world like this be? Obviously looping through every block and moving them that way won't work. I've tried placing blocks into 50x50 'chunks' and then moving each of the chunks, but the result isn't anywhere near as smooth as it should be. Is there any way to completely disable sections of the map if the player isn't near them? Would it be possible to simply store them in memory and load them when