[flexcoders] How to mask a color on a bitmapdata object?
I have the following situation: I have n bitmapdata objects of the same width and height. Each bitmapdata object have some black pixels (0x00) and the rest of the pixels are of different colors. The position of the black pixels is different in each bitmapdata object. I want to be able to create a new bitmapdata object that contains the union of the black pixels of the other objects and ignore the other colors. I know I can loop through the bitmapdata objects and check with pixels are black and create the resulting one. However, I need to repeat that process many times with tons of images that could be as large as 1000 by 100 pixels. hence, I would like to know if there is a way to create that resulting bitmapdata object, without the need to loop. For instance, the compare method allows to compare 2 bitmapdata objects to see which ones has the same colors in the same positions as: var diff::BitmapData = bd1.compare.bd2 diff will have a value of 0x00 for the pixels that are of the same color in bd1 and bd2. In may case I want to do something like that but to create a bitmapdata object with all black pixels. Any suggestions?
[flexcoders] How to create Value Objects dynamically at run time?
I am building a visualization app in which I paste an excel table and then I need to manage the data as value objects. The user can paste different tables with different columns each time, so I don't know a priory the type of the data objects. Once the data is loaded the user is asked to identify what kind of data in each column (variable) is, such text, number, date, etc. Hence, I would like to create value objects dynamically, but I don't know how. Any suggestions?
[flexcoders] Re: PowerPoint in a swf
Convert the slides to swf. For that you can use swftools (http://www.swftools.org/) PDF2SWF commnad line program. Gilbert --- In flexcoders@yahoogroups.com, Christophe christophe_jacque...@... wrote: Hello, How to integrate a PowerPoint presentation in a SWF Flex application ? Do you know a component ? Thank you, Christophe,
[flexcoders] Re: Flex Browse File Video
In AIR loading a video works fine. In Flex (FP10) I was able to load the file as a ByteArray, but I don't know how to process it to view it on a VideoDisplay or FLVPlayback component. I asked that question in another thread, but got no answers. --- In flexcoders@yahoogroups.com, Battershall, Jeff jeff.battersh...@... wrote: I've done similar things with AIR and images but not with video. Seems to me you might be able to do it with FileReference.load(), which gives you access to the btyearray of the uploaded file. Requires FP10. -Original Message- From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of Adrian Resa Jones Sent: Tuesday, July 07, 2009 2:19 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: Flex Browse File Video Maybe I'm missing somethingCan you use the flex file browse as a source so that users can preview video before uploading it? Do I need to know where the file comes from? I saw another question about this here and did not see an answer. --- In flexcoders@yahoogroups.com, Adrian Resa Jones noregrets62@ wrote: I want to provide a preview function prior to uploading a file. Well, what's your use case ? Why do you care where the file comes from ? -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Alternative FAQ location: https://share.acrobat.com/adc/document.do?docid=942dbdc8-e469-446f-b4cf-1e62079f6847 Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo! Groups Links
[flexcoders] FileReference Load local files - how to use it to load flv or MP4 files?
I am trying to use the FileReference stuff to load flv and/ or mp4 files to Flash player. I have been able to do it with images with Flex sdk 3.3 (Flash Player 10), doing something similar to what Peter shows at http://blog.flexexamples.com/2008/08/25/previewing-an-image-before-uploading-it-using-the-filereference-class-in-flash-player-10/#comment-19806 However, I cannot figure out how to load a video. Any suggestions?
[flexcoders] Problem displaying item renderer on on TileList
I am creating an app. in which a need to display some thumbnails on a TileList, but the thumbnails are not visible on the TileList. However, if a click on a tile it does what it is suppose to do and it creates the number of tiles according to the data provider, only the tiles are not visible. My code is: mx:Panel width=100% height=100% title=Select Video mx:TileList id=videoResults dataProvider={videos} width=100% height=100% itemRenderer=components.Thumb styleName=L1 itemClick=onVideoSelected(event) / /mx:Panel the item renderer component is: ?xml version=1.0 encoding=utf-8? mx:VBox xmlns:mx=http://www.adobe.com/2006/mxml; width=200 paddingTop=0 paddingBottom=0 xmlns:controls=com.asfusion.controls.* horizontalAlign=center verticalGap=0 toolTip={data.description.text()} backgroundColor=0xcc borderColor=0x293f6f borderThickness=2 mx:NumberFormatter id=numberFormatter precision=2 useThousandsSeparator=true / mx:Text id=videoTitle width=180 height=36 text={da...@title} styleName=Label/ mx:Image id=image width=160 height=120 source={da...@thumbbnail}/ mx:HBox width=100% paddingTop=0 horizontalAlign=center controls:Rating id=vidRating liveRollOver=false itemCount=4 value={data..ratin...@average} toolTip=Average rating: +{numberFormatter.format(data..ratin...@average)}+ by +{data..ratin...@count}+ users/ mx:Text id=ratedByNum text={'('+ data..vie...@count+ ')'} / /mx:HBox /mx:VBox The data provider is an XMLList. If a replace the TileList with a list or horizontalList the item renderer is visible. Can someone tell me what I am doing wrong? Thanks, Gilbert
[flexcoders] Re: Where I can examples of how to use ByteArray
Pete, Thanks a lot. This should keep me busy learning and experimenting. Gilbert --- In flexcoders@yahoogroups.com, Peter Farland pfarl...@... wrote: Although not FLV, I wrote a sample AMF 0/AMF 3 client based on flash.utils.ByteArray and flash.net.URLLoader. See my blog entry http://blogs.adobe.com/pfarland/2008/06/using_amf_with_flashneturlload.html which mentions the ActionScript source which was submitted to BlazeDS as an attachment to BLZ-209. See amf.zip at: https://bugs.adobe.com/jira/browse/BLZ-209 For FLV, the key is to understand the Type column for each field. I took a quick look at the spec and it seems to use conventions similar to the SWF format. private function onComplete(e:Event):void { var ba:ByteArray = loader.data as ByteArray; if (ba != null ba.length 9) { // Peek at the first 3 bytes to check for 'F' 'L' 'V' if (ba.readUnsignedByte() == 0x46 ba.readUnsignedByte() == 0x4C ba.readUnsignedByte() == 0x56) { ba.position = 0; decodeFLV(ba); } } } i.e. For UI8, use readUnsignedByte() to get a uint For UB[n], use readUnsignedByte() and then shift to find the relevant bit(s) for each flag. For UI32, use readUnsignedInt() to get a uint For UI24, use 3 successive readUnsignedBytes() and shift values appropriately to form a uint from the 24bits. etc... Pete -Original Message- From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of gilbert_mizrahi Sent: Wednesday, March 18, 2009 6:44 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: Where I can examples of how to use ByteArray Alex, Thanks. Yes I have seen that, but there is noting similar for what I want, that is to read the flv content to get its tags according to FLV spec from http://www.adobe.com/devnet/flv/. Pete, that is a good starting point, thank you. However, I need more help to be able to read the data from the FLV. readByte() returns an int and readBytes expects at least one parameter of type ByteArray which I have no clue what to put in there. And readObject(0 throws an ouf of bounds error. Gilbert --- In flexcoders@yahoogroups.com, Peter Farland pfarland@ wrote: You may want to have loader as a member variable so that you can access it in other contexts or make subsequent requests without using init() private var loader:URLLoader; Also, you should set the loader.dataFormat to URLLoaderDataFormat.BINARY before loading binary data. See: http://livedocs.adobe.com/flex/3/langref/flash/net/URLLoader.html#dataFormat Finally, in the complete event, you can cast loader.data to a ByteArray: private function onComplete(e:Event):void { var byteArr:ByteArray = loader.data as ByteArray; // ... } Pete -Original Message- From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of gilbert_mizrahi Sent: Wednesday, March 18, 2009 11:22 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Where I can examples of how to use ByteArray I have searched everywhere and I can't find useful examples of how to use the ByteArray class and the Flex 3 documentation does not include much. I want to read and FLV file with ByteArray, but I don't know how. I tried: private function init():void { var request:URLRequest = new URLRequest(assets/street.flv); var loader:URLLoader = new URLLoader(); try { loader.load(request); } catch (error:ArgumentError) { trace(An ArgumentError has occurred.); } catch (error:SecurityError) { trace(A SecurityError has occurred.); } loader.addEventListener(Event.COMPLETE, onComplete); } private function onComplete(e:Event):void { var byteArr:ByteArray = new ByteArray (); byteArr.readByte(); // trace(byteArr +byteArr); } the ByteArray readByte method accept 0 parameters, so what should I do? -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Alternative FAQ location: https://share.acrobat.com/adc/document.do?docid=942dbdc8-e469-446f-b4cf-1e62079f6847 Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo! Groups Links -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Alternative FAQ location: https://share.acrobat.com/adc/document.do?docid=942dbdc8-e469-446f-b4cf-1e62079f6847 Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo! Groups Links
[flexcoders] Where I can examples of how to use ByteArray
I have searched everywhere and I can't find useful examples of how to use the ByteArray class and the Flex 3 documentation does not include much. I want to read and FLV file with ByteArray, but I don't know how. I tried: private function init():void { var request:URLRequest = new URLRequest(assets/street.flv); var loader:URLLoader = new URLLoader(); try { loader.load(request); } catch (error:ArgumentError) { trace(An ArgumentError has occurred.); } catch (error:SecurityError) { trace(A SecurityError has occurred.); } loader.addEventListener(Event.COMPLETE, onComplete); } private function onComplete(e:Event):void { var byteArr:ByteArray = new ByteArray (); byteArr.readByte(); // trace(byteArr +byteArr); } the ByteArray readByte method accept 0 parameters, so what should I do?
[flexcoders] Re: Where I can examples of how to use ByteArray
Alex, Thanks. Yes I have seen that, but there is noting similar for what I want, that is to read the flv content to get its tags according to FLV spec from http://www.adobe.com/devnet/flv/. Pete, that is a good starting point, thank you. However, I need more help to be able to read the data from the FLV. readByte() returns an int and readBytes expects at least one parameter of type ByteArray which I have no clue what to put in there. And readObject(0 throws an ouf of bounds error. Gilbert --- In flexcoders@yahoogroups.com, Peter Farland pfarl...@... wrote: You may want to have loader as a member variable so that you can access it in other contexts or make subsequent requests without using init() private var loader:URLLoader; Also, you should set the loader.dataFormat to URLLoaderDataFormat.BINARY before loading binary data. See: http://livedocs.adobe.com/flex/3/langref/flash/net/URLLoader.html#dataFormat Finally, in the complete event, you can cast loader.data to a ByteArray: private function onComplete(e:Event):void { var byteArr:ByteArray = loader.data as ByteArray; // ... } Pete -Original Message- From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of gilbert_mizrahi Sent: Wednesday, March 18, 2009 11:22 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Where I can examples of how to use ByteArray I have searched everywhere and I can't find useful examples of how to use the ByteArray class and the Flex 3 documentation does not include much. I want to read and FLV file with ByteArray, but I don't know how. I tried: private function init():void { var request:URLRequest = new URLRequest(assets/street.flv); var loader:URLLoader = new URLLoader(); try { loader.load(request); } catch (error:ArgumentError) { trace(An ArgumentError has occurred.); } catch (error:SecurityError) { trace(A SecurityError has occurred.); } loader.addEventListener(Event.COMPLETE, onComplete); } private function onComplete(e:Event):void { var byteArr:ByteArray = new ByteArray (); byteArr.readByte(); // trace(byteArr +byteArr); } the ByteArray readByte method accept 0 parameters, so what should I do? -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Alternative FAQ location: https://share.acrobat.com/adc/document.do?docid=942dbdc8-e469-446f-b4cf-1e62079f6847 Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo! Groups Links
[flexcoders] Re: How to combine various FLV files into one using Flex?
Any one? I hope at least someone can point me to documentation of how to use the ByteArray class with some examples, specifically on how to read a flv with ByteArray. I have search on the forums and googled this, but with no aval. The Flex 3 doc. has only one example which is not useful for what I want to do. Thanks. --- In flexcoders@yahoogroups.com, gilbert_mizrahi mizr...@... wrote: I would like to combine FLV files using Flex 3 (to be deployed as an AIR app.) I now it is possible because there are projects like RichFLV (http://www.richapps.de/?p=168) that do that and more. Benjamin from RicFLV told me that I needed to use the ByteArray class and implement the specs of the FLV (http://www.adobe.com/devnet/flv/pdf/video_file_format_spec_v10.pdf). However, I have not worked with the ByteArray class before and I don't really know what to do with the specs at this point. I would appreciate some guidance and some examples if possible to get me started.
[flexcoders] Re: Newbie : Video Capture and Streaming Questions
You need FMS or other Flash Media Server, like RED5 (open source) http://osflash.org/red5 or Wowsa http://www.wowzamedia.com/. --- In flexcoders@yahoogroups.com, toejamnyc jtho...@... wrote: Good Day. I hope you'll forgive my very basic questions. I've googled, read FAQ's, and built a few tutorials, and have a very basic app that displays video. But I still have a very basic question. Must I have Flash Media Server in order to capture and save video from a webcam to a server? Is there *any* way I can build a small development, recording app on my existing http://domain? I am a PHP / MySQL developer, so this is all very new to me. Like I said, I can display video, but I'm having a hard time figuring out NetStream.connect() -- unless it's indeed true I need FMS. Thank you in advance for your time and any pointers.
[flexcoders] Re: Mirror on an image
You can use the Matrix to get a mirror image like: _bmpd = new BitmapData(768, 576, false); displayImage.source = new Bitmap(_bmpd); _bmpd.draw(displayImage, new Matrix(-1, 0, 0, 1, _bmpd.width, 0)); --- In flexcoders@yahoogroups.com, christophe_jacquelin christophe_jacque...@... wrote: Hello, I want to make a vertical mirror on an image mx:image id=displayImage / by modifiyng the pixels one by one, but the code is not working. Could you send me what is wrong: Thank you, Christophe, The code - var data2:BitmapData = Bitmap( displayImage.content).bitmapData; var x:int; var y:int; var col:uint; for (x = 0; x 768; x++) { for (y = 0; y 576; y++) { col = data2.getPixel(x, y); data2.setPixel(x, 576 - 1 - y, col); } } displayImage.source = new BitmapAsset(data2); -
[flexcoders] How to combine various FLV files into one using Flex?
I would like to combine FLV files using Flex 3 (to be deployed as an AIR app.) I now it is possible because there are projects like RichFLV (http://www.richapps.de/?p=168) that do that and more. Benjamin from RicFLV told me that I needed to use the ByteArray class and implement the specs of the FLV (http://www.adobe.com/devnet/flv/pdf/video_file_format_spec_v10.pdf). However, I have not worked with the ByteArray class before and I don't really know what to do with the specs at this point. I would appreciate some guidance and some examples if possible to get me started.
[flexcoders] Re: How can I create a path animation in Flex?
Tim, That could help. I have to see how I can extend that functionality for more complex paths, but this seems to be a good start. Sefi, I am familiar with some of the tween engines. However, I believe the create tweens from point x1,y1 to x2,y2. Hence, I need to break the path in multiple line segments to use them. That is a possibility, but I would need then to look for a way to fit a function to a path. Gilbert --- In flexcoders@yahoogroups.com, Sefi Ninio [EMAIL PROTECTED] wrote: You can use a tween library ( there are many out there - tweener, tweenlite etc.). you can give it a source and origin x,y Points and duration, easing function etc and it will handle the animation. it the route is not a straight line, you can break the animation into sections, listen for the end of one and start the next one. I don't know about tweenLite, but in tweener it's done in a single line of code. HTH Sefi On Tue, Nov 25, 2008 at 3:21 AM, tim.geiges [EMAIL PROTECTED] wrote: Take a look at, it might have your answer(I hope) :-) http://keith-hair.net/blog/2008/05/30/interpolation-of-a-point-on-quadratic-curve/#more-4 --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com, gilbert_mizrahi mizrahi@ wrote: I would like to be able to draw a path and then have an object travel through that path. I know how to draw a path in AS3. But I need to get some tips on how I can make an object (i.e. car) following that path. Something like the original LineRider. A while ago I saw an example on a blog, which I did not bookmark, and I am unable to locate it again. Thanks, Gilbert
[flexcoders] Re: How can I create a path animation in Flex?
Johannes, I didn't think in the possibility to script the movement this way. Even though I want to have in AS3, so I can create paths and animations at run time, this could be a potential solution, once I understand how to create the motion XML dynamically. Thanks. I will look more into this too. Gilbert --- In flexcoders@yahoogroups.com, Johannes Nel [EMAIL PROTECTED] wrote: i fair while ago i created an animation in flash, exported it to xml (its a command in flash) import the correct action script classes and used it in flex. i cannot recall if i had t make changes. http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/motionXSD.html i am certain other people have done the same, so a google might help. On Tue, Nov 25, 2008 at 6:02 PM, gilbert_mizrahi [EMAIL PROTECTED] wrote: Tim, That could help. I have to see how I can extend that functionality for more complex paths, but this seems to be a good start. Sefi, I am familiar with some of the tween engines. However, I believe the create tweens from point x1,y1 to x2,y2. Hence, I need to break the path in multiple line segments to use them. That is a possibility, but I would need then to look for a way to fit a function to a path. Gilbert --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com, Sefi Ninio sefi.ninio@ wrote: You can use a tween library ( there are many out there - tweener, tweenlite etc.). you can give it a source and origin x,y Points and duration, easing function etc and it will handle the animation. it the route is not a straight line, you can break the animation into sections, listen for the end of one and start the next one. I don't know about tweenLite, but in tweener it's done in a single line of code. HTH Sefi On Tue, Nov 25, 2008 at 3:21 AM, tim.geiges tim.geiges@ wrote: Take a look at, it might have your answer(I hope) :-) http://keith-hair.net/blog/2008/05/30/interpolation-of-a-point-on-quadratic-curve/#more-4 --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.comflexcoders% 40yahoogroups.com, gilbert_mizrahi mizrahi@ wrote: I would like to be able to draw a path and then have an object travel through that path. I know how to draw a path in AS3. But I need to get some tips on how I can make an object (i.e. car) following that path. Something like the original LineRider. A while ago I saw an example on a blog, which I did not bookmark, and I am unable to locate it again. Thanks, Gilbert -- j:pn \\no comment
[flexcoders] How can I create a path animation in Flex?
I would like to be able to draw a path and then have an object travel through that path. I know how to draw a path in AS3. But I need to get some tips on how I can make an object (i.e. car) following that path. Something like the original LineRider. A while ago I saw an example on a blog, which I did not bookmark, and I am unable to locate it again. Thanks, Gilbert
[flexcoders] Re: Upload file to server from AIR app
I found the error is caused because var fileToUpload:File = new File(path+captureTest.flv); is expecting a File object and not a String (path+captureTest.flv). The problem I have is that I have no idea what constitutes a File Object. Using the File.browse the file selected passed an event and the upload method can take thee File object as event.target, but again I don't know how that object is made in case I want to create one without using the browse method for File. I traced the event.target, but it is giving me [Object, FileReference].Hence I am clueless. Gilbert --- In flexcoders@yahoogroups.com, Tom Chiverton [EMAIL PROTECTED] wrote: On Monday 29 Sep 2008, gilbert_mizrahi wrote: I am getting a I/O Error: Error #2038. What's the full text and stack trace ? -- Tom Chiverton Helping to adaptively brand interfaces This email is sent for and on behalf of Halliwells LLP. Halliwells LLP is a limited liability partnership registered in England and Wales under registered number OC307980 whose registered office address is at Halliwells LLP, 3 Hardman Square, Spinningfields, Manchester, M3 3EB. A list of members is available for inspection at the registered office. Any reference to a partner in relation to Halliwells LLP means a member of Halliwells LLP. Regulated by The Solicitors Regulation Authority. CONFIDENTIALITY This email is intended only for the use of the addressee named above and may be confidential or legally privileged. If you are not the addressee you must not read it and must not use any information contained in nor copy it nor inform any person other than Halliwells LLP or the addressee of its existence or contents. If you have received this email in error please delete it and notify Halliwells LLP IT Department on 0870 365 2500. For more information about Halliwells LLP visit www.halliwells.com.
[flexcoders] Re: Upload file to server from AIR app
Ok. I was able to solve the problem creating a temporary newFile:File object and copying the content of the file I wanted to upload. Then, I upload the newFile. Thanks for the help. Gilbert --- In flexcoders@yahoogroups.com, maximecowez [EMAIL PROTECTED] wrote: The File() constructor does take a String as an argument, but it has to be formatted correctly. Take a look in the docs: http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/flash/filesystem/File.html#File() Max --- In flexcoders@yahoogroups.com, gilbert_mizrahi mizrahi@ wrote: I found the error is caused because var fileToUpload:File = new File(path+captureTest.flv); is expecting a File object and not a String (path+captureTest.flv). The problem I have is that I have no idea what constitutes a File Object. Using the File.browse the file selected passed an event and the upload method can take thee File object as event.target, but again I don't know how that object is made in case I want to create one without using the browse method for File. I traced the event.target, but it is giving me [Object, FileReference].Hence I am clueless. Gilbert --- In flexcoders@yahoogroups.com, Tom Chiverton tom.chiverton@ wrote: On Monday 29 Sep 2008, gilbert_mizrahi wrote: I am getting a I/O Error: Error #2038. What's the full text and stack trace ? -- Tom Chiverton Helping to adaptively brand interfaces This email is sent for and on behalf of Halliwells LLP. Halliwells LLP is a limited liability partnership registered in England and Wales under registered number OC307980 whose registered office address is at Halliwells LLP, 3 Hardman Square, Spinningfields, Manchester, M3 3EB. A list of members is available for inspection at the registered office. Any reference to a partner in relation to Halliwells LLP means a member of Halliwells LLP. Regulated by The Solicitors Regulation Authority. CONFIDENTIALITY This email is intended only for the use of the addressee named above and may be confidential or legally privileged. If you are not the addressee you must not read it and must not use any information contained in nor copy it nor inform any person other than Halliwells LLP or the addressee of its existence or contents. If you have received this email in error please delete it and notify Halliwells LLP IT Department on 0870 365 2500. For more information about Halliwells LLP visit www.halliwells.com.
[flexcoders] What would be the equivalent asp.net script of this PHP one (to upload a file)
I have been playing around uploading files from Flex/AIR to php with this script: ?php $tempFile = $_FILES['Filedata']['tmp_name']; $fileName = $_FILES['Filedata']['name']; if(move_uploaded_file($tempFile, ./videos/ . $fileName)) { echo The file . basename( $_FILES['uploadedfile']['name']). has been uploaded successfully; } else{ echo There was an error uploading the file, please try again!; } ? What would be the equivalent for asp.net? Gilbert
[flexcoders] Re: What would be the equivalent asp.net script of this PHP one (to upload a file)
Hi Fidel, Thanks for the links. I did search before, but I don't know much about asp.net, so nothing looked like the equivalent to the php script I posted. Hence, my asking for help. Hi Derrick, Yes, I know this is a flex list. Even though it seems my question was not related to Flex, The application I am working on is in Flex (producing an AIR application), but I needed help with a server side script. Does make sense? If not, I apologize for the trouble. Gilbert --- In flexcoders@yahoogroups.com, Fidel Viegas [EMAIL PROTECTED] wrote: On Tue, Sep 30, 2008 at 6:16 PM, gilbert_mizrahi [EMAIL PROTECTED] wrote: I have been playing around uploading files from Flex/AIR to php with this script: ?php $tempFile = $_FILES['Filedata']['tmp_name']; $fileName = $_FILES['Filedata']['name']; if(move_uploaded_file($tempFile, ./videos/ . $fileName)) { echo The file . basename( $_FILES['uploadedfile']['name']). has been uploaded successfully; } else{ echo There was an error uploading the file, please try again!; } ? What would be the equivalent for asp.net? Hi Gilbert, Before posting a question to this user group, I advise you to search your answers on google. If you don't find them there, then you post your question here. Usually, people do not answer to questions such as the one you have just posted, because they can be easily found through a google search. Here are a few links I found using the words uploading with asp.net: http://www.codeproject.com/KB/aspnet/fileupload.aspx http://www.wrox.com/WileyCDA/Section/id-292158.html http://www.4guysfromrolla.com/webtech/091201-1.shtml http://www.ondotnet.com/pub/a/dotnet/2002/04/01/asp.html http://www.aspheute.com/english/2802.asp Hope that helps. All the best, Fidel.
[flexcoders] Upload file to server from AIR app
I am trying to upload a video from an AIR app to a server. All the examples I have seen use the fileReference.browse, but I don't need to browse any directory. I am using RED5 to capture a video to the local hard drive. I know that the name and path of the file. Thus, the question is how I write the upload stuff. I am trying this: private function uploadTheFile():void { var fileToUpload:File = new File(path+captureTest.flv); fileToUpload.addEventListener(DataEvent.UPLOAD_COMPLETE_DATA, onUploadComplete); var uploadRequest:URLRequest = new URLRequest(); uploadRequest.method = POST; uploadRequest.url = myURL; try{ fileToUpload.upload(uploadRequest); } catch (error:Error){ trace(error uploading the file); } } I am getting a I/O Error: Error #2038. I would appreciate if someone has an example with the corresponding PHP script (maybe I have an issue with the PHP script) Thanks, Gilbert
[flexcoders] Re: interactive chart
You can find a flex implementation with code at: http://www.stretchmedia.ca/blog/index.cfm/2007/6/15/Google-Finance-with-Flex-from-Silvafug-last-night Gilbert --- In flexcoders@yahoogroups.com, Richard Rodseth [EMAIL PROTECTED] wrote: Not built into Flex charts, but if you Google Flex Google Finance Chart you'll get some hits. On Wed, Jun 25, 2008 at 5:21 PM, coder3 [EMAIL PROTECTED] wrote: Hi, where can i find sample and source of an interactive chart, like google finance? such as there is a upper main chart, and a lower range chart, with sliding windows. thanks C. -- View this message in context: http://www.nabble.com/interactive-chart-tp18124315p18124315.html Sent from the FlexCoders mailing list archive at Nabble.com.
[flexcoders] ColumnChart Question: How to drag the columns to change values dynamically?
I am creating a Column Chart based on values that I read from an XML file. I want the user to be able to modify those values, by dragging the top of the chart (on the y axis). I see in the documentation that there are many drag-related events by I need help to figure out how to implement this. Gilbert
[flexcoders] ColumnChart Issue: How to access data properties when clicking on a Column
I have a ColumnChart for which the dataProvider is an XML file. The chart is displayed as expected, but when I click on a column on the chart i want to display some information about that column in a text area. However, I haven't been able to achieve that. My code is below: mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; layout=absolute width=780 creationComplete=init(); mx:HTTPService id=chartFeed url={chart1URL} result=dataLoaded(event) resultFormat=e4x/ mx:Script ![CDATA[ import mx.events.SliderEvent; import mx.events.DragEvent; import mx.controls.HSlider; import mx.charts.events.ChartItemEvent; import mx.controls.Spacer; import mx.charts.CandlestickChart; import mx.containers.Canvas; import mx.controls.Text; import mx.controls.CheckBox; import mx.containers.HBox; import mx.rpc.events.*; import mx.graphics.IFill; import mx.graphics.SolidColor; import mx.charts.ChartItem; import mx.charts.series.items.ColumnSeriesItem; [Bindable] private var chart1URL:String; [Bindable] private var topicInterest:XMLList; private var sliders:Array = new Array; private function init():void { chart1URL = data/star1.xml; chartFeed.send(); } private function dataLoaded(e:ResultEvent):void { topicInterest = e.result.element; var numTopics:int = topicInterest.length(); trace(numTopics +numTopics); var i:int; var topicHolder:HBox; for(i=0; inumTopics; i++){ topicHolder = new HBox; topicHolder.setStyle(horizontalGap, 10); var cBox:CheckBox = new CheckBox; var col:Canvas = new Canvas; var spacer:Spacer = new Spacer; var slider:HSlider = new HSlider; slider.id = i.toString(); slider.minimum =-0.1; slider.maximum = 1.0 //slider.allowTrackClick = true; slider.liveDragging = true; slider.tickInterval = 0.1; slider.value = Number([EMAIL PROTECTED]); sliders[i] = slider; //slider.width = 50; var theColor:Number = Number([EMAIL PROTECTED]); topicHolder.percentWidth = 100; cBox.label = [EMAIL PROTECTED]; col.setStyle(backgroundColor, theColor); col.width = 20; col.height = 20; cBox.id = i.toString(); cBox.selected = true; spacer.percentWidth= 100; topicHolder.addChild(col); topicHolder.addChild(cBox); topicHolder.addChild(spacer); topicHolder.addChild(slider); controls.addChild(topicHolder); cBox.addEventListener(MouseEvent.CLICK, onCBSelected); //currCSeries.addEventListener(MouseEvent.CLICK, onItemClick); //slider.addEventListener(SliderEvent.THUMB_RELEASE, onDragSlider); slider..addEventListener(SliderEvent.CHANGE, onDragSlider); } } private function onDragSlider(e:SliderEvent):void { var i:int = Number(e.currentTarget.id); var id:int = i+1; trace(val + topicInterest.(@id==id)[EMAIL PROTECTED]); trace(e.currentTarget.value + e.currentTarget.value); topicInterest.(@id==id)[EMAIL PROTECTED] = e.currentTarget.value; } private function onClickSlider(e:MouseEvent):void { var i:int = Number(e.currentTarget.id); var id:int = i+1; var aSlider:HSlider = e.currentTarget as HSlider; aSlider.addEventListener(SliderEvent.CHANGE, onDragSlider); trace(val + topicInterest.(@id==id)[EMAIL PROTECTED]); trace(e.currentTarget.value + sliders[i].value); //topicInterest.(@id==id)[EMAIL PROTECTED] = sliders[i].value; } private function onCBSelected(e:MouseEvent):void { var cBox:CheckBox = e.currentTarget as CheckBox; var i:int = Number(e.currentTarget.id); //cBox.selected = !cBox.selected; if(!cBox.selected) [EMAIL PROTECTED] = false; else [EMAIL PROTECTED] = true; myChart.dataProvider = topicInterest.(@display==true); //currCSeries.fillFunction trace(dp +topicInterest.(@display==true)); trace(dp +myChart.getChildAt(0)); } private function myFillFunction(element:ChartItem, index:Number):IFill { var c:SolidColor = new SolidColor(0x00CC00); var item:ColumnSeriesItem = ColumnSeriesItem(element); if(index topicInterest.(@display==true).length()){ var name:String = currCSeries.items[index].xValue; var theColor:Number =
[flexcoders] Re: Capturing and recording video with AIR
Thanks Greg and William, I now you can do that with FMS/Red 5, but on the tour Adobe people specifically mentioned that the recording could be done with AIR directly. I even asked after they showed the slides and they said yes (unfortunately they did not give more details). Greg, can I install the Flash Media Encoder (FME) on a local machine and record a FLV? Is there a way to manage the interaction from an AIR app. ? Or can I launch the FME from a Zinc 3 application made with Flex? Thanks, Gilbert --- In flexcoders@yahoogroups.com, Abyss Knight [EMAIL PROTECTED] wrote: You may be able to roll your own solution by manipulating a byte array and writing it to the disk, assuming you know the binary format of an FLV or the video type you wish to write. The other option is to stream it to an FMS/Red5 server as Greg pointed out. To out this in perspective, when I was at the onAIR Bus Tour event I saw someone demo an application that did WAV file mixing and wrote the binary to disk for playback as a WAV file. The developer had coded his own WAV file creation routines. It was amazing, and I am certain the same applies for videos. -- William --- In flexcoders@yahoogroups.com, greg h FlexAirVideoGuru@ wrote: Hi Gilbert, Yes, yes and no. -- Yes AIR/Flex/Flash can encode input from a camera object (plus microphone object for the audio :) -- Yes, this encoding actually happens in Flash Player/AIR -- No, AIR has no API supporting storing the recorded FLV to the local desktop. I WISH IT DID!!! (Anyone from Adobe listening?) But last I saw, no. (If I am wrong on this, someone please post details. Please?!!!) Anyway, Yes we can save bitmaps locally. But not FLV streams. To actually capture FLV streams to a file, you have to have a Flash Media Server. Then if you want the FLV local, you have to have the AIR app download it back down. Baffling to me why AIR fails to give us an API to just store the locally recorded FLV client side. Even weirder, for high quality live encoding Adobe provides Flash Media Encoder (FME). FME is not an AIR app, and I understand why (it needs APIs not in AIR (yet?)). Anyway, if you record with FME it stores the FLV client side! Again, I hope that an API was added to AIR for storing FLVs (perhaps late in AIR's development cycle). And again, if so, anyone who can provide details please let Gilbert and I know. hth, g
[flexcoders] Re: Capturing and recording video with AIR
William, Thanks. That's what I was looking for. Gilbert --- In flexcoders@yahoogroups.com, Abyss Knight [EMAIL PROTECTED] wrote: AIR can do it natively, check out the link I posted earlier or Google for RichFLV. Some very slick apps already doing this. -- William --- In flexcoders@yahoogroups.com, gilbert_mizrahi mizrahi@ wrote: Thanks Greg and William, I now you can do that with FMS/Red 5, but on the tour Adobe people specifically mentioned that the recording could be done with AIR directly. I even asked after they showed the slides and they said yes (unfortunately they did not give more details). Greg, can I install the Flash Media Encoder (FME) on a local machine and record a FLV? Is there a way to manage the interaction from an AIR app. ? Or can I launch the FME from a Zinc 3 application made with Flex? Thanks, Gilbert --- In flexcoders@yahoogroups.com, Abyss Knight briggins@ wrote: You may be able to roll your own solution by manipulating a byte array and writing it to the disk, assuming you know the binary format of an FLV or the video type you wish to write. The other option is to stream it to an FMS/Red5 server as Greg pointed out. To out this in perspective, when I was at the onAIR Bus Tour event I saw someone demo an application that did WAV file mixing and wrote the binary to disk for playback as a WAV file. The developer had coded his own WAV file creation routines. It was amazing, and I am certain the same applies for videos. -- William --- In flexcoders@yahoogroups.com, greg h FlexAirVideoGuru@ wrote: Hi Gilbert, Yes, yes and no. -- Yes AIR/Flex/Flash can encode input from a camera object (plus microphone object for the audio :) -- Yes, this encoding actually happens in Flash Player/AIR -- No, AIR has no API supporting storing the recorded FLV to the local desktop. I WISH IT DID!!! (Anyone from Adobe listening?) But last I saw, no. (If I am wrong on this, someone please post details. Please?!!!) Anyway, Yes we can save bitmaps locally. But not FLV streams. To actually capture FLV streams to a file, you have to have a Flash Media Server. Then if you want the FLV local, you have to have the AIR app download it back down. Baffling to me why AIR fails to give us an API to just store the locally recorded FLV client side. Even weirder, for high quality live encoding Adobe provides Flash Media Encoder (FME). FME is not an AIR app, and I understand why (it needs APIs not in AIR (yet?)). Anyway, if you record with FME it stores the FLV client side! Again, I hope that an API was added to AIR for storing FLVs (perhaps late in AIR's development cycle). And again, if so, anyone who can provide details please let Gilbert and I know. hth, g
[flexcoders] Capturing and recording video with AIR
On the Flex 3/Air pre-tour it was mentioned that it is possible to capture and recording video to the desktop using AIR. I would like to know how that can be done and how the recorded videos (in FLV format?) can be uploaded to a server by the AIR application. Thanks, Gilbert