actionscript

MovieClipLoader.loadMovie() loads a blank image with proper dimensions

大兔子大兔子 提交于 2019-12-13 04:40:55
问题 So after adding support for dynamic images, a la MovieClipLoader, to a project that I'm working on, I came across some strange behavior. In local tests, the requested images load fine and I am able to use them as I like. However, when the .swf is hosted online, the images are not visible, even though I don't get an onLoadError event. This behavior seems rather odd and is obviously not desirable. Through some testing, I found that the dimensions of the images loaded with the MovieClipLoader

Flex 4.5 JSON check for existence of key before exception?

对着背影说爱祢 提交于 2019-12-13 04:34:25
问题 Is it possible to check for the existence of a key before Flex 4.5 JSON throws an exception for key not found? I have some json data where some keys are not always present. I am using CallResponder... The issue is that when you try accessing callResponder.lastResponse.key - and, say, key is not always present in your json, Flex won't be able to parse it. This happens even if you check if (callResponder.lastResponse.key) - the error occurs on the if line, in that case (See old error dump here)

Flex/AIR/Actionscript/Mobile File.writeObject/readObject always generates null w/no errors generated

China☆狼群 提交于 2019-12-13 04:27:12
问题 I've been trying for several days just to get a simple writeObject/readObject functionality in my project. No matter what I do, the result is, a) a file is created and b) when I try to read that file back in, it is null . My project targets iOS on an iPad device, but this stripped down version targets the AIR simulator for an iPad. I've previously had every single available event registered and traced, but they never accomplished anything so I removed them for the sake of keeping the problem

Flash Animations Skipping, Uncalled Audio Playing

ε祈祈猫儿з 提交于 2019-12-13 03:37:47
问题 I am totally baffled at the moment. I have a Flash CS5/AS3 project, a large Flash game, that uses a LOT of animations. I've divided these up into a MovieClip on a Scene, with corresponding actionscripts and events, for the "exploring screens", and another MovieClip on a Scene for one of the challenges, and another such set for another challenge. This method allows me to put only the animations that section needs into the corresponding MovieClip, and link the events of the scene to its

Getting next record in SQLite database for mobile application

China☆狼群 提交于 2019-12-13 03:11:58
问题 I have a mobile application that uses an sqlite database. I cannot seem to figure out how to access the next record when the user presses the 'next' button. My database is using 'id' as primary key with autoincrement as integer. private function nextMoveRPart(event:EffectEvent):void { var cardNumber:int = parseInt(cardNumberLabel.text); stmt.sqlConnection = conn; conn.open(File.applicationStorageDirectory.resolvePath("FlashCards.db")); stmt.text = "SELECT * FROM cardItems WHERE id = ?" + "AND

add Loader to stage from class

喜夏-厌秋 提交于 2019-12-13 03:08:37
问题 Stage seems to be unaccessible from my class.. almost like it doesn't want to be reached. I do not know what keeps going wrong. This is the class as I have it right now: package { import flash.events.*; import flash.display.*; import flash.net.*; public class gallery extends Sprite{ private var imgPath:String = 'images/'; private var imgCurrent:int = 0; private var images:Array = new Array(); private var iLoader:Loader; function gallery() { this.addEventListener(Event.ADDED_TO_STAGE,

flex actionscript not uploading file to PHP page HELP!

南楼画角 提交于 2019-12-13 02:54:58
问题 please help! I am using actionscript 3 with flex sdk 3.5 and PHP to allow a user to upload a file -that is my goal. However, when I check my server directory for the file... NOTHING is there! For some reason SOMETHING is going wrong, even though the actionscript alerts a successful upload (and I have even tried all the event listeners for uploading errors and none are triggered). I have also tested the PHP script and it uploads SUCCESSFULLY when receiving a file from another PHP page (so i'm

Possible to request gsessionid without a 302 response

我与影子孤独终老i 提交于 2019-12-13 02:48:59
问题 I'm writing a google gdata API client in Flash/AS2 (sadly, moving to AS3 is not an option at this time). Logging in via ClientLogin works fine but subquent requests will return a 302 redirect that includes a gsessionid I am supposed to include with future requests to avoid the 302s. Flash/AS2, AFAIK, does not allow me to actually query an http error response body in any way, so there's no way for me to actually see this gsessionid after the 302 is returned. Is there a gdata api call which

Link to a specific slide from Flash file embeded in PowerPoint

和自甴很熟 提交于 2019-12-13 02:06:18
问题 I am creating an interactive map in Flash that will be embedded in PowerPoint. I would like to have some hot spots on the Flash map that will link to specific PowerPoint slides within the presentation. Does anyone know how this would be coded? I found a video that uses VB inside PowerPoint to link to the next slide, but it does not show how to pick a single slide: http://youtu.be/9YLqd8dKhcg Thanks in advance. 回答1: From the link you provided: Private Sub ShockwaveFlash1_FSCommand(ByVa­l

Command Line Calls in Adobe Flash

安稳与你 提交于 2019-12-13 01:25:09
问题 Is there a way to make a call to the command line, (On Debian) from ActionScript in Adobe Flash? For example, execute files: python update.py Steps for this on Windows would also be appreciated! 回答1: If you are using Adobe Air version 2.0.x on Linux, you can use the NativeProcess() class (assuming your update.py is flagged as executable (a+x): var nativeProcessStartupInfo:NativeProcessStartupInfo = new NativeProcessStartupInfo(); var file:File = File.applicationDirectory.resolvePath("update