actionscript-3

Using SMTP Mailer but not successful yet

若如初见. 提交于 2020-01-07 03:17:10
问题 I am trying to send mail via Adobe AIR using smtp of gmail with the following code. But no success. Anybody can help pls ? Thanks import org.bytearray.smtp.mailer.SMTPMailer; import org.bytearray.smtp.encoding.JPEGEncoder; import org.bytearray.smtp.encoding.PNGEnc; import org.bytearray.smtp.events.SMTPEvent; import flash.utils.ByteArray; import flash.display.BitmapData; import flash.display.Bitmap; import flash.events.*; // create the socket connection to any SMTP socket // use your ISP SMTP

I Need to save xml from Flex to file on server with PHP, which PHP script?

北慕城南 提交于 2020-01-07 03:17:04
问题 I have a Flex app which is taking XML data and posting it to be saved to a file on the server, where it can be read later. Using tip found here on SO, I have the Flex part down (I think), but I am not a PHP programmer so I am unclear as to what should be in the PHP that handles the URLRequest: protected function saveBtn_clickHandler(event:MouseEvent):void { var saveData:XML = new XML(); saveData = myManager.exportFullXML(); trace(saveData); var uploader:URLLoader = new URLLoader(); var data

I Need to save xml from Flex to file on server with PHP, which PHP script?

淺唱寂寞╮ 提交于 2020-01-07 03:15:09
问题 I have a Flex app which is taking XML data and posting it to be saved to a file on the server, where it can be read later. Using tip found here on SO, I have the Flex part down (I think), but I am not a PHP programmer so I am unclear as to what should be in the PHP that handles the URLRequest: protected function saveBtn_clickHandler(event:MouseEvent):void { var saveData:XML = new XML(); saveData = myManager.exportFullXML(); trace(saveData); var uploader:URLLoader = new URLLoader(); var data

AS3 audiioencoder to convert to audio

ε祈祈猫儿з 提交于 2020-01-07 02:57:07
问题 In action script how to convert using audio encoder a recorded byte array from microphone to MP3 public var recordedData:ByteArray; recordedData.writeBytes(sample.data, 0, sample.data.bytesAvailable); How to save recordedData to mp3 using audio encoder 回答1: You find yourself an MP3 encoding library that runs in the Flash player. A simple google search finds Shine to be pretty popular. Another option is to stream the audio up to the server and encode there. Depending on your environment, you

listening to events down the display list in children components

最后都变了- 提交于 2020-01-07 02:51:26
问题 I'm creating a swf, that has a parent class and a child class. The parent class has a button, that dispatches a custom event and I want the child class to list for this event, but when I dispatch the event the child class does not hear the event has been dispatched. This is the code that dispatches the event: private function onCTAClicked(e:MouseEvent):void { trace("onCTAClicked"); dispatchEvent(new CTAClickEvent(CTAClickEvent.CTA_CLICK_EVENT,true)); } And the listener is registered like this

Unable to get a saved data in adobe air ELS

丶灬走出姿态 提交于 2020-01-07 02:46:07
问题 I am trying to save and get data from an adobe air application with the following code. buts its just keep alerting only undefined. Can someone find the error? function saveData(n, v){ var bytes = new air.ByteArray(); bytes.writeUTFBytes(v); return air.EncryptedLocalStore.setItem(n, bytes); } function getData(n){ var storedValue = air.EncryptedLocalStore.getItem(n); return air.trace(storedValue.readUTFBytes(storedValue.length)); } saveData('item1', 'value1'); alert(getData('item1')); 回答1: try

ScrollPane Component required in library even though it is not being used by Parent Movie

两盒软妹~` 提交于 2020-01-07 02:20:15
问题 note: all as3 is written in CS4 and compiled for flash 10. I have a parent movie that loads a separate standalone SWF movie. This standalone movie happens to use the ScrollPane component (fl.containers.ScrollPane), and it runs correctly when launched on it's own. When I attempt to have a Parent movie load the standalone SWF, i receive a run-time error: TypeError: Error #1009: Cannot access a property or method of a null object reference. at fl.containers::ScrollPane/drawBackground() at fl

Image load with site load

瘦欲@ 提交于 2020-01-07 02:19:09
问题 Hello I make simple site but I have a little trouble with loading images. As you can see with new category there is new image. There is a problem, beacause only then img is loading, and I want to load all images when my site is loading. sample code how I operate with those img. imgUrls.push("img/01.jpg"); imgUrls.push("img/02.jpg"); var k3:Boolean=false; btn1.addEventListener(MouseEvet.CLICK, clickFunc); function clickFunc(e:MouseEvent):void if (k3==false) { img1.myUILoader.source = imgUrls[0

Access XML nodes with integer names

最后都变了- 提交于 2020-01-07 02:18:28
问题 For my application, I make an HTTPRequest, and get back some XML served from a JSP. That XML has some (yes, I'm aware this is invalid/improper XML. If I can't find a bandaid, I will try to address that internally) nodes with integers as names, say <2> for example. When I attempt to access it, using myXMLVariable.child("2") , it returns the third (index=2) XML node instead. I understand that this behavior is "correct". Is there any way to get around this behavior? Example var myXML:String = "

Can sqlite databae be used with as3 air app for android devices running 6.0+ versions?

£可爱£侵袭症+ 提交于 2020-01-06 21:39:22
问题 My App and Sqlite connection works on simulator but does not work when publishes on android device. Below are the sample codes, I have tried, all work on simulator but not on android phone // SAMPLE-1 var conn:SQLConnection = new SQLConnection(); conn.addEventListener(SQLEvent.OPEN, openSuccess); conn.addEventListener(SQLErrorEvent.ERROR, openFailure); var fileLocation:File = File.applicationStorageDirectory.resolvePath("assets/weddingsql.sqlite"); ; conn.openAsync(fileLocation, SQLMode.READ)