flash

AS3 Save & Load multiple text boxs data to local file(s)

故事扮演 提交于 2019-12-25 01:59:44
问题 I am trying to create a form in flash (AS3) that can save data / text from multiple dynamic text box's into a user specified path & local file & also load any saved forms back into appropriate text box's. I have found some great examples on how to do this with a single text box. I know it should be simple however I cannot seem to figure it out or successfully mod existing examples to work with multiple text boxs?. any ideas? Here's the code i'm currently using / trying to mod. package {

as3 mouse wheel reverse

断了今生、忘了曾经 提交于 2019-12-25 01:58:04
问题 Hey i built custom scroll box. When i scroll up on this box scrolling element is going down and when i scroll down - scrolling element is going up ;). I whant to reverse that mechanism. how can i do it ? Below my code for mouse import flash.events.MouseEvent; function handleMouseWheel(event:MouseEvent):void { if ((event.delta > 0 && box_mc.y < 171) || (event.delta < 0 && box_mc.y > 135)) { box_mc.y = box_mc.y + (event.delta * 3); sb.thumb.y = sb.thumb.y + (event.delta * 13); trace(box_mc.y);

Action Script 3. Timer starts count when I'm in menu, but game not started

对着背影说爱祢 提交于 2019-12-25 01:53:35
问题 I'm creating flash game and I get strange problem. Timer starts count when I'm in menu, but game not started. In menu I have button "Play", after It is clicked It add timer, but It shows how long program is running (start count from current time). This is main function which starts public function MemoryGame() { startMemoryGame.addEventListener(MouseEvent.CLICK, startPlay); } This is button to start game: function startPlay(e:MouseEvent):void { startMemoryGame(); } And here Is my function

Get Full Exception Error with Flex

一世执手 提交于 2019-12-25 01:49:50
问题 I can't use trace because I'm not using an Adobe IDE and when I try to view my exception errors, I can't seem to get the full error message, I only seem to get the "errorID". For example, if I had a 1069 error, I should see something like: Error #1069: Property data not found on X and there is no default value. But instead I see this... ReferenceError: Error #1069 This is my code... try { //error gets thrown here } catch(e:Error) { extTrace('Error: '+e.toString());//I also tried e.message, e

AS3: How to Deep Copy an Object

爷,独闯天下 提交于 2019-12-25 01:45:48
问题 i have an object that i need to copy to my SharedObject data. The problem is that the data property of shared object is read-only, so i can't clone my 'source' object and assign it to the shared object data, i have to make a copy of them in this way: var so: SharedObject = SharedObject.getLocal("appData"); copyObject(sourceObj, so.data); so.flush(); and the copy method: public static function copyObject(sourceObject:Object, destinationObject:Object):void{ // this would be the code that i need

DisplayObject snapshot in flex 3

此生再无相见时 提交于 2019-12-25 01:45:45
问题 i'm creating a visual editor in flex and need to let users export thier projects into Image format. But i have one problem: size of the canvas is fixed and when user add element which is out of these sizes some scroll bars added. And user continue working on the project. but when he want to take snapshot of the canvas he just get the visible part ot the canvas with scrollbars. how to get image of the fullsize canvas? The only solution i found is to check the positions and sizes of canvas

Get sound's total time and current time?

谁都会走 提交于 2019-12-25 01:44:16
问题 I have a player in flash ActionScript 3. I need to take a the total time of the sound file and current time of the sound file. My code: function onPlayProgress(evt:Event):void { var sndLength:int = Math.ceil(snd.length /(snd.bytesLoaded / snd.bytesTotal)); var seekbar = 100 * (channel.position / sndLength); playBar.seekbar.x = seekbar*5.8; var _totalTime:Number = (((snd.length /(snd.bytesLoaded / snd.bytesTotal))*0.001/60)); What is current time? 回答1: I'm not entirely clear on what the code

Is it possible to remove actionScript from inside of SWF file using PHP?

半腔热情 提交于 2019-12-25 01:37:41
问题 The result should be clean SWF file. 回答1: Of course its possible, but you would have to read the file data and understand the structure of the file to know where the actionscript's are stored. you can use PHP native functions such as fopen fseak fread flcose Along with other binary tools such as bin dec pack <<, |, >>, & and other binary manipulation tools To manipulate binary data, I suggest you start with the link below to understand the complexity of this: http://wwwimages.adobe.com/www

Making a Movieclip which is set as mask clickable and respond to MouseEvents

别等时光非礼了梦想. 提交于 2019-12-25 01:36:59
问题 I am trying to do panning of a movieclip I have two movieclips on stage. canvasPanel_mc and mask_mc. The former is the maskee for the mask (mask_mc). Inside mask_mc there is a movieclip dragCanvas_mc. The alpha of dragCanvas_mc is set to zero. This is code that I am using: mask_mc.dragCanvas_mc.addEventListener(MouseEvent.MOUSE_DOWN,onStartDrag); mask_mc.dragCanvas_mc.addEventListener(MouseEvent.MOUSE_OUT,onStopDrag); mask_mc.dragCanvas_mc.addEventListener(MouseEvent.MOUSE_UP,onStopDrag);

(Rails, Flash) Why would my updated Flash chart not be refreshing in Internet Explorer?

倾然丶 夕夏残阳落幕 提交于 2019-12-25 01:34:55
问题 I've got a bit of an odd issue here. Basically it only occurs in IE. Safari, Firefox, and Opera work just fine. FYI, I am using XMLCharts (http://www.maani.us/xml_charts/) to display chart data. Basically I have a library that generates up-to-the-minute data on the fly based on selected date ranges. Well, for whatever reason, IE refuses to show the updated chart after changing the date range. I've confirmed that the server is actually generating the renewed data in the background (as I can