Re: [Flashcoders] 3D engine for dynamic text
Hi, Also checkout FIVe3d http://five3d.mathieu-badimon.com/ It's been around a whileand looks like the code was last updated in 2011, but for just rendering text in vector format, I found it was really nice and simple to use. There are some examples on that page to check outand some of Mathieu's FIVe3D examples are quite cool: http://www.mathieu-badimon.com/ http://lab.mathieu-badimon.com/ Other libraries may have pulled the finger out on 3D text, but afaik, this _was_ the only one that did it nicely with vectors. I am not sure if it uses GPU at all, but it's worth looking at if you just want to do simple text - check out the Archive examples: http://five3d.mathieu-badimon.com/archives/ HTH Glen On 14/01/2013 21:50, Randall Tinfow wrote: Know little about 3D for AS3, so I'm struggling to decide where to focus my efforts. What's the recommendation for a library that will build a 3D model and animate in realtime from input text? Papervision3D Away3D Sandy3D Alternativa3D? Hopefully the learning curve will not bury me. Thanks, Randy Tinfow IMAGE PLANT ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Exhibition type kiosks
Hi, In my previous role, I built kiosk PC's to control an animated robot- http://www.robothespian.co.uk/ The kiosk computer for this ran an AIR 2.5 application on Ubuntu Linux Oneiric usinga Gigabyte H55N-USB3 mini-itx board: http://www.anandtech.com/show/3769/reviewed-gigabyte-h55nusb3-miniitx-done-the-gigabyte-way We ran an Intel Core i3 Clarkdale with integrated graphics (sorry, can't remember the CPU model, but think it was a 530) and 2GB of Ram with a 250GB 2.5 HDD. This was the case we used: http://www.anandtech.com/show/6167/silverstone-sugo-sg05-the-miniitx-standard-bearer This was more than capable of running the Flash appall day long. The Intel boards don't playnice with dual-head GFX though. We had lots of fun trying to do the Flash App on a touchscreen and play video on a huge display - we used separate NVidia GFX card for that and iirc, that had a different motherboard, but can't remember the type. We also ran the Kinect with software and some Python AI stuff on a core i5 which gave us a lot of grunt -think it was a Clarkdale processor too. We had previously run Shuttle XPC's with AMD Athlons (3200?), NVidia GFX cards 1-2MB of RAM which were also capable of supporting the Flash App, but running to end-of-life and with very unreliable PSU's. The touchscreens were a bit difficult to get hold of - we had a big problem getting 3M ones toto run under Linux for a long time, but eventually we got the OS drivers working under Ubuntu. The main thing is to make the case fairly bomb-proof. I reckon anything with moveable parts on will get trashed if the kiosk is unsupervised and ideally you want the kids to be able to play unsupervised. CPU Usage would spike with Drag Drop activities on screens with lots of symbols - we never managed to trace thiscompletely, but it only seemed to happen running under AIR rather than purely Flash(We built an AIR shell loader so we could run the App in browser etc). The components for this setup are probably nearing 2years old now, but I reckon the PC would cost £500, then the screen and kiosk need to be accounted for on top of that. HTH Glen On 30/11/2012 22:45, Paul A. wrote: Following on from the tablet question earlier, I've been asked to quote on a kiosk app and suggest some hardware. What kinds of hardware are people using for kiosks these day? It'll be used by kids and in use all day. A tablet may be a bit on the small side and a full-blown PC might be a bit too big. I've been wondering if anyone has tried this with a laptop with a swivel touch screen? Any thoughts? Paul ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Exhibition type kiosks
Hi, Sorry, I was getting mixed up with a previous EXE based app that I wrote. The AIR onewe published to AIR, but used the same SWF in the browser. It had some functionality that disabled itself if AIR was not running - File API's etc. :# Glen On 30/11/2012 23:41, Henrik Andersson wrote: Glen Pike skriver: We built an AIR shell loader so we could run the App in browser etc. Tell me more. I have not heard how to do this. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] MVC - ScreenManager
:D On 09/03/2012 05:20, Karl DeSaulniers wrote: If you can't take the Henrik, get out of the kitchen.. lol ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Importing A Button or Other Component Dynamically With Pure AS 3
I think you can compile an SWC and link against that. http://jessewarden.com/2009/05/creating-modules-in-flash-cs4.html On 26/02/2012 20:23, it...@aol.com wrote: Hello Actionscript Experts, Scenario: I have a shared library *.swf file with most of my assets. It is loaded after the main introductory *.swf file is already loaded. I then call from the Shared Library file the needed assets. Appears that this scenario of importing assets works great with all my custom ones (Sprite, MovieClip, Bitmap, etc). However, when trying to do the same with any of the components like Button, Datgrid..etc, I get an error. Right now it appears, the component must be stored in the library of the main introductory file, and be linked, which thereby makes this introductory file large. Any idea and/or solution/comments will be appreciated. Thanks, Dan ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Sound control problem
Hi, I think you need to set the soundTransform of the MovieClip that contains the timeline sound? Also look at the SoundMixer class for global controls - you may need the stopAll functionality when you add and remove MC's with sound to/from the stage. Glen On 16/02/2012 19:48, natalia Vikhtinskaya wrote: Hi I have mute button with class linked to this mc in the library package lib { import flash.display.*; import flash.events.*; import flash.utils.*; import flash.media.*; public class MuteControl extends flash.display.MovieClip { private var _so:SoundTransform; public function MuteControl() { _so=new SoundTransform(); _so.volume = 1; soundTransform=_so; this.addEventListener(MouseEvent.CLICK, muteControlButton); this.buttonMode = true; this.mouseChildren = false; return; } private function muteControlButton(e:MouseEvent):void { if (_so.volume==1){ _so.volume=0; e.target.gotoAndStop(2); } else { _so.volume=1; e.target.gotoAndStop(1); } this.soundTransform = _so; //nothing changes } } } muteControlButton function works correctly but sound does not change. Sound file attached on Timeline. What is wrong? Please advice. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] AIR Socket.readObject received in multiple ProgressEvents?
Hi, Are you sure that this is not something server-side? I have had similar problems which were compounded when using Wireless connections - we traced the fault back to the server code giving up filling the socket buffer when it got a buffer full event? Apart from that you could use some sort of paradigm like: http://stackoverflow.com/questions/7345214/as3-air-readobject-from-socket-how-do-you-check-all-data-has-been-received Glen On 15/02/2012 16:44, Mattheis, Erik (MIN-WSW) wrote: In a the client of a client/server AIR app I have: function onSocketData(event:ProgressEvent) : void { var result = _socket.readObject(); // do something with result } How can I be sure the whole object is available before I try to use it? Things work as expected most of the time, but with large pieces of data or on laptops will hang when operating over a wireless connection, so I suspect the object is spread out over multiple ProgressEvents. I can only find pseudo code illustrating what you should do reassemble an AMF object received in separate ProgressEvents. _ _ _ Erik Mattheis | Weber Shandwick P: (952) 346.6610 M: (612) 377.2272 ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] MovieClipLoader Oddness
Hi, We have had similar issues loading images this way - we cannot stream from our image server program so Flash loads the same image into 2 movie clips swapping them whilst the server saves to the same image. To solve some difficulties with refreshing, so we used a cache-killer method, e.g. var url:String = http://imageserver/image.jpg?; + new Date().getTime(); We also had some problems loading one image when the first one had finished, so I used setTimeout inside the onLoadInit handler to delay calling of loading the next image. Our server also caused problems - apache could not read the image when the server was writing it, so the programmer wrote to a 2nd image, then renamed it to our desirable one, but this might not affect you. Hope some of these tricks may help. Glen On 11/10/2011 23:42, [p e r c e p t i c o n] wrote: Hi All, I'm working on a project in which I continuously grab images from a server (don't ask..) using MovieClipLoader. everything works fine for a period of days then suddenly the player crashes with the dreadful ..script to run slowly... dialog. when I check my servers logs, i notice that the server at some point earlier than the crash, started to send 304 (http status - means the document hasn't been modified) as opposed to status code 200 (ok - document was found..) has anyone else encountered this? and if so, what headers might the flash player be sending to trigger this? anyone with in-depth knowledge of the headers flash sends? Thx, percy ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] E4X XML manipulation
Hi, You would have to: 1 Create a new XML node, myNewNode = my_xml/ 2. Select nodes from the existing XML where id != a var nodes:XMLList = my_xml.child(row).attribute(id != a); 3. Select nodes from existing XML where id = a var parentNodes:XMLList = my_xml.child(row).attribute(id != a); 4. Conditionally, Append result of 3 to your new node. var parent:XML; if(0 != parentNodes.length()) { parent = myNewNode.appendChild(parentNodes[0]); } 5. Append result of 2 to your new node id=a if(parent) { for each(var node:XML in nodes) { parent.appendChild(node); } } This is untested, so please try and see how you get on. There may be a neater way, but I found deleting nodes based on e4x results sometimes problematic... Hope this helps. Glen On 11/10/2011 16:54, Paul Andrews wrote: On 11/10/2011 16:33, Merrill, Jason wrote: row id=c / /row And row id=c / /row Are not valid XML. Therefore, I'm not clear on what you want to do. :) Hmm.. myXMLNode = my_xml row id=a / row id=b / row id=c / /my_xml; into: my_xml row id=a row id=b / row id=c / /row /my_xml I didn't realise the space was there - not intended- too much going on at once! Jason Merrill Instructional Technology Architect II Bank of America Global Learning ___ -Original Message- From: flashcoders-boun...@chattyfig.figleaf.com [mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Paul Andrews Sent: Tuesday, October 11, 2011 9:53 AM To: flashcoders@chattyfig.figleaf.com Subject: [Flashcoders] E4X XML manipulation What's the best way to turn this: myXMLNode = my_xml row id=a / row id=b / row id=c / /my_xml; into: my_xml row id=a row id=b / row id=c / /row /my_xml Using some E4X? It's not so much a case of adding b and c as children of a, but of removing them so I don't end up with: my_xml row id=a row id=b / row id=c / /row row id=b / row id=c / /my_xml Paul ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders -- This message w/attachments (message) is intended solely for the use of the intended recipient(s) and may contain information that is privileged, confidential or proprietary. If you are not an intended recipient, please notify the sender, and then please delete and destroy all copies and attachments, and be advised that any review or dissemination of, or the taking of any action in reliance on, the information contained in or attached to this message is prohibited. Unless specifically indicated, this message is not an offer to sell or a solicitation of any investment products or other financial product or service, an official confirmation of any transaction, or an official statement of Sender. Subject to applicable law, Sender may intercept, monitor, review and retain e-communications (EC) traveling through its networks/systems and may produce any such EC to regulators, law enforcement, in litigation and as required by law. The laws of the country of each sender/recipient may impact the handling of EC, and EC may be archived, supervised and produced in countries other than the country in which you are located. This message cannot be guaranteed to be secure or free of errors or viruses. References to Sender are references to any subsidiary of Bank of America Corporation. Securities and Insurance Products: * Are Not FDIC Insured * Are Not Bank Guaranteed * May Lose Value * Are Not a Bank Deposit * Are Not a Condition to Any Banking Service or Activity * Are Not Insured by Any Federal Government Agency. Attachments that are part of this EC may have additional important disclosures and disclaimers, which you should read. This message is subject to terms available at the following link: http://www.bankofamerica.com/emaildisclaimer. By messaging with Sender you consent to the foregoing. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Flash on top of flash
Hi, I had to do some similar hacky workaround for a site that wanted a flash navigation that expanded over the top of HTML. The Flash had to be fullscreen for the intro and then shrink vertically to be the navigation bar at the top of the screen when content appeared. The only way I could figure to do this was to have Flash call JavaScript after / before each transition to change the css and expand / contract the Flash div over the top of the other content. If the non-intersecting parts of your 2 swfs is rectangular, this might work for you? HTH Glen On 21/09/2011 07:09, Mikael Enroos wrote: Hi, I'm trying to position a windowed swf on top of another windowed swf on my site. The underlaying swf (windowed) is the main application and now I need to add a separate swf on top of it, which is another application. I tried with some css work including z-layer but without any luck. Has anyone else done this? Mikael Enroos Webmaster ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Fw: Timer Probelem
Hi, Your Timer delay is possibly too small to be reliable - in the documentation it says that a timer delay lower than 20ms is not recommented: http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/utils/Timer.html#Timer%28%29 If you then start a loop to trace 1000 times during a timer event, this will slow down your system whilst the loop runs... What is probably happening is that your flag_loop variable is set to true again before the loop has finished. My question is why do you need timer3 to test the step variable - can't you do that in Timer1? Also timer2 seems pretty redundant - could you run a single timer that tests various conditions instead? HTH Glen On 08/09/2011 13:50, New Flashdeveloper wrote: Hi I am student , I’m new in flash .In My Project I need to have timer that work correctly with out depending on other process in my project . Please look at the attachment , one timer worl alone another work and have condition , when we get the condition the timers work slowly , I don’t know why is that and how can I solve it and have independent timer . I test it when we need to work with loop or other thing the timer stop working even the timers that aren’t related to it ? I have foure text box inside stage (i cant attach file because of limited size in site) import flash.utils.Timer; import flash.events.TimerEvent; var i :int var flagloop:Boolean=false; var step:Number=0 var startTime :Number=getTimer() var timer1:Timer=new Timer(1) timer1.start() timer1.addEventListener(TimerEvent.TIMER,Func_time1) function Func_time1(e:TimerEvent):void { timer1txt.text=String(step) step +=0.001 } /Timer 2 var timer2:Timer=new Timer(1) timer2.start() timer2.addEventListener(TimerEvent.TIMER,Func_time2) function Func_time2(e:TimerEvent):void { timer2txt.text=e.target.currentCount gettimertxt.text=String((getTimer()- startTime)) //e.updateAfterEvent(); flagloop=true } //vv/Timer 2 var timer3:Timer=new Timer(1) timer3.start() timer3.addEventListener(TimerEvent.TIMER,Func_time3) function Func_time3(e:TimerEvent):void { timer3txt.text=e.target.currentCount if((step2) (step2.25)) { if(flagloop== true) { testTimer() } } } ///vv function testTimer():void { flagloop=false for(i=0;i1000;i++) { trace(Hello World) } flagloop=true } ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Fw: Timer Probelem
Hi, Because your timer resolution is 1ms - so you will hold up the AVM with your 1000 loop traces and your timer resolution will suffer. If you set flag_loop=true somewhere else, you maybe okay, but your logic in timer3 currently means the testTimer theoretically gets called 2 times between 2 and 2.25 seconds. For more useful information about how timers work in flash, check out: http://www.bit-101.com/blog/?p=910 http://www.kongregate.com/forums/4/topics/83008 http://www.craftymind.com/2008/04/18/updated-elastic-racetrack-for-flash-9-and-avm2/ Maybe google them. It also seems your example is theoretical rather than a solution to a problem. If we knew what you were trying to achieve other than showing timer counts we may be able to give you some better direction. Glen On 08/09/2011 15:19, New Flashdeveloper wrote: Hi Suppose that i set flagloop=true out side of Func_time2, mi problem is why other process have an affect on timer? If we have loop in our program it affect on timer why is that? *From:* Glen Pike g...@engineeredarts.co.uk *To:* New Flashdeveloper flashdeveloper...@yahoo.com; Flash Coders List flashcoders@chattyfig.figleaf.com *Sent:* Thursday, September 8, 2011 6:25 PM *Subject:* Re: [Flashcoders] Fw: Timer Probelem Hi, Your Timer delay is possibly too small to be reliable - in the documentation it says that a timer delay lower than 20ms is not recommented: http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/utils/Timer.html#Timer%28%29 If you then start a loop to trace 1000 times during a timer event, this will slow down your system whilst the loop runs... What is probably happening is that your flag_loop variable is set to true again before the loop has finished. My question is why do you need timer3 to test the step variable - can't you do that in Timer1? Also timer2 seems pretty redundant - could you run a single timer that tests various conditions instead? HTH Glen On 08/09/2011 13:50, New Flashdeveloper wrote: Hi I am student , I’m new in flash .In My Project I need to have timer that work correctly with out depending on other process in my project . Please look at the attachment , one timer worl alone another work and have condition , when we get the condition the timers work slowly , I don’t know why is that and how can I solve it and have independent timer . I test it when we need to work with loop or other thing the timer stop working even the timers that aren’t related to it ? I have foure text box inside stage (i cant attach file because of limited size in site) import flash.utils.Timer; import flash.events.TimerEvent; var i :int var flagloop:Boolean=false; var step:Number=0 var startTime :Number=getTimer() var timer1:Timer=new Timer(1) timer1.start() timer1.addEventListener(TimerEvent.TIMER,Func_time1) function Func_time1(e:TimerEvent):void { timer1txt.text=String(step) step +=0.001 } /Timer 2 var timer2:Timer=new Timer(1) timer2.start() timer2.addEventListener(TimerEvent.TIMER,Func_time2) function Func_time2(e:TimerEvent):void { timer2txt.text=e.target.currentCount gettimertxt.text=String((getTimer()- startTime)) //e.updateAfterEvent(); flagloop=true } //vv/Timer 2 var timer3:Timer=new Timer(1) timer3.start() timer3.addEventListener(TimerEvent.TIMER,Func_time3) function Func_time3(e:TimerEvent):void { timer3txt.text=e.target.currentCount if((step2) (step2.25)) { if(flagloop== true) { testTimer() } } } ///vv function testTimer():void { flagloop=false for(i=0;i1000;i++) { trace(Hello World) } flagloop=true } ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com mailto:Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] DataGrid: save multidim arrayfrom Flash to mySQL with PHP
Hi, You can post multidimensional arrays to PHP for example in an HTML form, this is better than GET which may have a lower limit on the number of characters that can be sent in a request (as I found out with some JQuery stuff)... http://php.net/manual/en/reserved.variables.post.php http://www.php.net/manual/en/reserved.variables.post.php#96902 You can do: input name=myArray[0][id] value=123/ So in Flash you could do the same by setting the appropriate variables in a URLVariables, but note, you probably have to call your variables something like this: var data:URLVariables = new URLVariables(); data[myArray[0][id]] = 123; So you could loop through your datagrid and submit the values that way - you would need to add a count variable which tells PHP how many objects are in your array, then you could do: ?php $num_items = isset($_POST['num_items']) ? (int)$_POST['num_items'] : 0; for($i = 0; $i $num_items;$i++) { $id = $_POST[myArray][$i][id]; //... } ? Alternatively - and less data-intensively, you could save the values every time someone changes a field and then it loses focus. You would have to save each variable separately so you would need a form processor that handles some kind of id, a variable name and a value that you then add / update in the database (if there is no id field, you could be inserting data). You could use Sephiroth's serialiazer system: http://www.sephiroth.it/test/unserializer/ Or some other way of dealing with the data like AMF, etc. There used to be some good stuff on Flash DB http://www.flash-db.com/, but it appears to be down now, so maybe it has gone the way of many websites... I think there are lots of libraries that do a lot of the crappy grunt work for you with Flash - Database stuff so whilst it's good to learn the principles, you would possibly benefit from finding something like these in the long run, especially where security is concerned: http://www.php.net/manual/en/security.database.php Hope this helps you a little. If only you could assign an object to URLVariables and have it post properly Glen On 06/09/2011 04:04, Cor wrote: Thanks Karl, Yes, I know. My problem is how to fetch my $_POST['VALUES'], which is the multi-dimensional array: myArray[0[id] myArray[0][name] myArray[0][description] myArray[1[id] myArray[1][name] myArray[1][description] myArray[2[id] myArray[2][name] myArray[2][description] etc. Best regards, Cor van Dooren -Original Message- From: flashcoders-boun...@chattyfig.figleaf.com [mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Karl DeSaulniers Sent: dinsdag 6 september 2011 3:54 To: Flash Coders List Subject: Re: [Flashcoders] DataGrid: save multidim arrayfrom Flash to mySQL with PHP Hi Cor, Assuming you know enough php to set up the file for connecting to your database, you can insert into your database with the following example. function addDescription($id, $name, $description) { //Escape any data being inserted $id = mysql_real_escape_string($id); $name = mysql_real_escape_string($name); $description = mysql_real_escape_string($description); $query = INSERT INTO YOUR_TABLE_NAME_HERE VALUES ('.$id.','. $name.','.description.'); $_POST['VALUES']; $result = mysql_query($query, YOUR_CONNECTION) or die(mysql_error()); return $result; //Returns true or false if error } HTH, Best, Karl On Sep 5, 2011, at 2:04 PM, Cor wrote: I have a editable datagrid which I fill from mySQL with PHP. So far works good. But when items are changed (edit, added, deleted), I want them to save the data in my mySQL database. My values are in this multi-dimensional indexed array, which elements all contain a associative array: myArray[i][id] myArray[i][name] myArray[i][description] So, can anyone tell/show me a apropriate way to pass this to PHP and in the php-file how to INSERT or UPDATE this to mySQL? TIA! Best regards, Cor van Dooren ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Karl DeSaulniers Design Drumm http://designdrumm.com ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] DataGrid: Expanding vertical Thumb width
Hi, I remember having to hack this in Flash for a list component, you should be able to set the style, but you need to use GrantSkinners workaround http://gskinner.com/blog/archives/2007/05/variable_scroll.html Edit your skin, then include Grant's fl.controls.List or whatever - that includes Scrollbar code. Set your width using the setStyle props. _list.setStyle(scrollBarWidth,40); _list.setStyle(scrollArrowHeight, 40); HTH Glen On 04/09/2011 21:24, lists...@fo.com wrote: What is the approach to expand a DataGrid vertical scrollbar's width (from the standard 15 pixels, to 44 or so, for touchscreens) in pure AS3 / Flash CS 5? It looks easy in Flex now http://www.switchonthecode.com/tutorials/flex-fun-advanced-datagrid-topics But in Flash/AS3, directly editing library Component Assets ScrollBarSkins Scrolltrack_skin as recommended at http://help.adobe.com/en_US/ActionScript/3.0_UsingComponentsAS3/WS5b3ccc516d4fbf351e63e3d118a9c65b32-7f4a.html to change its color and width does change the color and the width in the library, but only the color -- not the width at runtime. Widening scrollThumb_upSkin, et al in the library does show them altered when run, but cut off at the stock 16 pixel width of DataGrid scrolltrack. Any thoughts? thanks // basically straight from livedocs... import fl.controls.DataGrid; import fl.controls.dataGridClasses.DataGridColumn; import fl.data.DataProvider; import fl.events.DataGridEvent; function setup ():void { var aDg:DataGrid = new DataGrid(); addChild(aDg); aDg.verticalScrollPolicy=on; var nameDGC:DataGridColumn = new DataGridColumn(name); nameDGC.sortOptions = Array.CASEINSENSITIVE; var scoreDGC:DataGridColumn = new DataGridColumn(score); scoreDGC.sortOptions = Array.NUMERIC; aDg.addColumn(nameDGC); aDg.addColumn(scoreDGC); var aDP_array:Array = new Array({name:clark, score:3135}, {name:Bill, score:803}, {name:fc, score:03}, {name:Bruce, score:403}, {name:Peter, score:25}) aDg.dataProvider = new DataProvider(aDP_array); aDg.rowCount = aDg.length - 2; aDg.width = 200; // also does nothing aDg.verticalScrollBar.width = 60; } ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Help Registration point and origion point
Hello, I did some stuff a long time ago with moving particles along a sine wave type path where you can control the frequency and amplitude. Not sure if it will help much - the code is in (probably old bad) AS2, but you are welcome to look at it and borrow if it's any help. You would need to update the position of a single particle as it moves along the waveform and draw a line from this to your previous point. If you click and drag on the SWF vertical changes amplitude, horizontal changes frequency. It's a good visual example of aliasing in action too - if you increase the frequency, the shape appears to cycle. By the way, your frequency control on your scope appears to be backwards - turning anti-clockwise increases the frequency. Hope this helps. http://glenpike.co.uk/play/sinewave.html Source: http://glenpike.co.uk/play/flash/sinewave.fla Glen On 03/08/2011 09:40, nasim h wrote: Hi I'm Really appreciate u I want to simulate Osiloscope . Part of My program give me x,y and I shoudl draw wave base on that point in osiloscope ,my osiloscope should have scalex and y i should can move to right and left up and down I cant make it dynamically so i make 2 empty MovieClip nested in firt mc I draw my wave and move it left and Right and in parent I use scale but it has a bit bug and my wave will be thiker after scale what do u do it and how to program it this is my problem can u help me omethin like this not actually http://d.violet.vn/uploads/resources/171/scope.swf --- On Tue, 8/2/11, Ktuktu_fl...@cataclysmicrewind.com wrote: From: Ktuktu_fl...@cataclysmicrewind.com Subject: Re: [Flashcoders] Help Registration point and origion point To: Flash Coders Listflashcoders@chattyfig.figleaf.com Date: Tuesday, August 2, 2011, 10:33 AM Hopefully below will help you: I'm going to just explain how the origin stuff works, and how you can learn to compensate for it, and maybe you can apply this to your work. Starting off with an example where the visual elements of a sprite are not originated at 0,0 var mySprite:Sprite = new Sprite (); mySprite.graphics.beginFill(); mySprite.graphics.drawRect (10, 10, 50, 50); mySprite.graphics.endFill(); mySprite.x = 10; mySprite.y = 10; stage.addChild(mySprite); *the stage thinks this:* mySprite.x = 10; mySprite.y = 10; mySprite.width = 50; mySprite.height = 50; *mySprite thinks this:* this.x = 10; this.y = 10; this.width = 50; this.height = 50; But what happened to the fact that the rectangle I drew lives at x:10, y:10 !!! *So how do you find out where the origin is from inside mySprite?* - mySprite.getBounds(mySprite); this will return the boundaries of mySprite, in relation to mySprite. The visual reality of mySprite is that its boundaries are this: x: 10 y: 10 width:50 height:50 your origin offset is x:10, y:10. This still doesn't account for the x and y placement of mySprite on the stage, but that is simple to calculate. *The next part, is compensating for the scale: ** *If you take our mySprite from above, and scale it to 2, there are some notable changes: - mySprite.scaleX = mySprite.scaleY = 2; mySprite thinks: x:10 y:10 width:100 height:100 mySprite.getBounds(mySprite) returns this: x:10 y:10 width:50 height:50 The visual elements inside of mySprite did not grow, but mySprite is telling it to grow (because of the scaleX| scaleY changes) But what is probably messing you up is that when you scale an object that has an origin offset, the distance between the origin offset is multiplied by the same scale. *Here's the example:* (same mySprite as above, and already scaleX and scaleY = 2) mySprite is located at x:10, y:10 mySprite is scaled to 2, with an origin offset of x:10,. y:10. multiply the origin offsets by the scale of the object and you get x:20, y:20 the visual position of mySprite is at x:30, y:30 We can verify this by using getBounds again, but in relation to the stage. mySprite.getBounds(stage); returns: x:30 y:30 width:100 height:100 So, an example to compensate for the offset and scale would go like this: (if you want mySprite to *look* like its at 0,0 on the stage) var myBounds:Rectangle = mySprite.getBounds(mySprite); var originOffset:Point = new Point() originOffset.x = -myBounds.x * mySprite.scaleX originOffset.y = -myBounds.y * mySprite.scaleY; mySprite.x = originOffset.x; mySprite.y = originOffset.y; Now, mySprite will appear to be at 0,0 on the stage, even though the origin is offset and the scale has been changed. *Solutions* You can try compensation for both the origin and scale, or you can change the way you scale, say by scaling the actual sin wave and not the containing parent. You could also just redraw the wave instead of changing the scale. Hope that helps. the end code I used: var mySprite:Sprite = new Sprite (); mySprite.graphics.beginFill(0); mySprite.graphics.drawRect (10, 10, 50, 50); mySprite.graphics.endFill(); mySprite.x = 10; mySprite.y =
Re: [Flashcoders] NativeProcess On Mac
Hi, Unless you can use /usr/sbin/diskutil as your File name and pass the other elements of the command line as separate arguments, then you might have to be more creative with your approach. 1.Write a shell script that encapsulates this command and call that. 2.Capture the output of the first command and use Regular expressions to extract the UUID yourself? Glen On 29/07/2011 13:16, Sumeet Kumar wrote: Thanks Karl. But I want to run shell script from adobe air and also I am able to run simple shell script commands from the native process API. The problem in the this command mentioned below is /usr/sbin/diskutil info / | /usr/bin/awk '$0 ~ /UUID/ { print $3 }' That it has two commands , the first one is /usr/sbin/diskutil info / and the second one is /usr/bin/awk '$0 ~ /UUID/ { print $3 }' seprated by | And the second command takes the ouput of first command as input. And I don't know how to use this in adobe air native process API Hope I am able to explain my problem in a better way now. Apologies for not being very clear in my first email. Thanks again. -Original Message- From: flashcoders-boun...@chattyfig.figleaf.com [mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Karl DeSaulniers Sent: Friday, July 29, 2011 5:20 PM To: Flash Coders List Subject: Re: [Flashcoders] NativeProcess On Mac Hi Sumeet, Found this. Take a look. http://www.adobe.com/devnet/air/flash/quickstart/articles/ interacting_with_native_process.html Looks like it talks about integrating with XCode, which is what I think you need for mac. But it has both mac and pc. Also, I googled Flash NativeProcess API and XCode, there looked to be a barrel full. HTH, Best, Karl On Jul 29, 2011, at 6:38 AM, Sumeet Kumar wrote: Hi All, I am using Nativeprocess in adobe air for a MAC desktop application. I need to find the volume UUID for mac. I have found a shell script command which is like this /usr/sbin/diskutil info / | /usr/bin/awk '$0 ~ /UUID/ { print $3 }' This command works fine on Mac Terminal. But I am not able to figure out how to use this with NativeProcess API. Any help or suggestion on this regard would be great Regards Sumeet Kumar ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Karl DeSaulniers Design Drumm http://designdrumm.com ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Calling applescript from Adobe AIR
Hi, Not sure, but if AppleScript files can be executable like shell scripts in Linux, then you can call them from Air desktop using the Native Process API. If you download Air Launchpad and get it to generate the source code example for the Native Process API, you can then hack it to try your code, see my example below which starts an SSH session using putty on Windows - did not try on Mac as I don't have one, but should also be able to make it work on Linux. Glen protected function runProcess():void { var file:File = new File(); try { if (Capabilities.os.toLowerCase().indexOf(win) -1) { file = new File(C:\\Documents and Settings\\Will\\Desktop\\Downloads\\Progs\\putty.exe); } else if (Capabilities.os.toLowerCase().indexOf(mac) -1) { file = new File(/sbin/ssh); if (file == null) file = new File(/bin/ssh); else if (file == null) file = new File(/usr/bin/ssh); } else if (Capabilities.os.toLowerCase().indexOf(linux) -1) { file = new File(/sbin/ssh); if (file == null) file = new File(/bin/ssh); else if (file == null) file = new File(/usr/bin/ssh); } var nativeProcessStartupInfo:NativeProcessStartupInfo = new NativeProcessStartupInfo(); nativeProcessStartupInfo.executable = file; var args:Vector.String = new Vector.String; args.push(-P); args.push(50030) args.push(-l); args.push(username); args.push(-pw); args.push(password); args.push(-L); args.push(2080:localhost:2080); args.push(-L); args.push(7766:localhost:7766); args.push(192.168.0.19); nativeProcessStartupInfo.arguments = args; process = new NativeProcess(); process.start(nativeProcessStartupInfo); process.addEventListener(ProgressEvent.STANDARD_OUTPUT_DATA, onStdout); process.addEventListener(ProgressEvent.STANDARD_ERROR_DATA, onError); } catch (e:Error) { Alert.show(e.message, Error); } } On 20/07/2011 07:42, Sumeet Kumar wrote: Hi All, Is there any way by which I can call Applescript from Adobe air? Any help or suggestion on this regard would be great. Regards Sumeet Kumar ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Calling applescript from Adobe AIR
Hi, I am using FlashDevelop with flex_sdk_4.1.0.16076 and Air 2.5 SDK - can you change the Flex SDK your Flex Builder uses? I think the Native Process API requires AIR 2.0 at least. You also have to setup your #AppName-app.xml file to have the extendedDesktop permissions: supportedProfilesextendedDesktop desktop/supportedProfiles I think Launchpad will automatically generate the correct file for you. Make sure that application.xml has the correct AIR version: application xmlns=http://ns.adobe.com/air/application/2.0; Hope this helps - I am not sure about Flex vs Flashbuilder and SDK versions. Glen On 20/07/2011 10:38, Sumeet Kumar wrote: Thanks a lot for the help Glen, One more question, I am using flex builder 3 and flex SDK 3.2.0, But I am not able to find the nativeprocess API in this configuration. I tried overlaying adobe air 2.0 on flex SDK 3.2.0 as mentioned in some forums but still it does not work. Do I need flash builder 4 to make the nativeprocess API work. Thanks Again, Sumeet Kumar -Original Message- From: flashcoders-boun...@chattyfig.figleaf.com [mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Glen Pike Sent: Wednesday, July 20, 2011 2:35 PM To: Flash Coders List Subject: Re: [Flashcoders] Calling applescript from Adobe AIR Hi, Not sure, but if AppleScript files can be executable like shell scripts in Linux, then you can call them from Air desktop using the Native Process API. If you download Air Launchpad and get it to generate the source code example for the Native Process API, you can then hack it to try your code, see my example below which starts an SSH session using putty on Windows - did not try on Mac as I don't have one, but should also be able to make it work on Linux. Glen protected function runProcess():void { var file:File = new File(); try { if (Capabilities.os.toLowerCase().indexOf(win) -1) { file = new File(C:\\Documents and Settings\\Will\\Desktop\\Downloads\\Progs\\putty.exe); } else if (Capabilities.os.toLowerCase().indexOf(mac) -1) { file = new File(/sbin/ssh); if (file == null) file = new File(/bin/ssh); else if (file == null) file = new File(/usr/bin/ssh); } else if (Capabilities.os.toLowerCase().indexOf(linux) -1) { file = new File(/sbin/ssh); if (file == null) file = new File(/bin/ssh); else if (file == null) file = new File(/usr/bin/ssh); } var nativeProcessStartupInfo:NativeProcessStartupInfo = new NativeProcessStartupInfo(); nativeProcessStartupInfo.executable = file; var args:Vector.String = new Vector.String; args.push(-P); args.push(50030) args.push(-l); args.push(username); args.push(-pw); args.push(password); args.push(-L); args.push(2080:localhost:2080); args.push(-L); args.push(7766:localhost:7766); args.push(192.168.0.19); nativeProcessStartupInfo.arguments = args; process = new NativeProcess(); process.start(nativeProcessStartupInfo); process.addEventListener(ProgressEvent.STANDARD_OUTPUT_DATA, onStdout); process.addEventListener(ProgressEvent.STANDARD_ERROR_DATA, onError); } catch (e:Error) { Alert.show(e.message, Error); } } On 20/07/2011 07:42, Sumeet Kumar wrote: Hi All, Is there any way by which I can call Applescript from Adobe air? Any help or suggestion on this regard would be great. Regards Sumeet Kumar ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com
Re: [Flashcoders] Incorrect XML from PHP to Flash
http://php.net/manual/en/function.urldecode.php On 20/07/2011 15:24, Cor wrote: I am loading data from a mySQL database into Flash with PHP. But I get a string with all the tag-signs replaced with %-characters: %3C%3Fxml%20version=%221%2E0%22%20encoding%3D%22UTF%2D8%22%20%3F%3E%0A%3Cdat a%3E%3Cproject%3E%3Cproject%5Fcode%3E. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Incorrect XML from PHP to Flash
Hmm, maybe not URL encoding. What happens when you call the php page directly - in Firefox, does it show you the XML, or do you have to view the source? (The former would mean firefox considered it valid xml) Does the XML show all the url-encoded characters, or is it just in Flash? As an aside to help with your XML, you could do this - it might not help your encoding, check the results by echoing them out I guess? //Don't worry about \n and whitespace in your $response var, the DOMDocument will sort it out ;) //You don't need to include the ?xml? tag either. $response = //... $doc = new DOMDocument(); $doc-preserveWhiteSpace = false; $doc-formatOutput = true; $doc-loadXML($response); echo $doc-saveXML(); Another trick might be to do this to make your output a bit more easy to automate: $fields = array(code, datum, klant_nummer, ...); while($row = mysql_fetch_assoc($result)) { $response .=project; foreach($fields as $field) { $response .= project_${field}![CDATA[ .$row[project_ .$field] .]]/project_${field}; } HTH Glen On 20/07/2011 15:39, Cor wrote: This is it without the DB-conection ofcourse: if (isset($_POST['sendRequest']) $_POST['sendRequest'] == read_all_projects) { $sql = SELECT * FROM tbl_projecten; $result = mysql_query($sql); header(Content-type: text/xml); $response ='?xml version=1.0 encoding=UTF-8 ?'; $response .=\ndata; while($row = mysql_fetch_object($result)){ $response.='project'; $response.='project_code![CDATA['.$row-project_code.']]/project_code' ; $response.='project_datum![CDATA['.$row-project_datum.']]/project_datu m'; $response.='project_klant_nummer![CDATA['.$row-project_klant_nummer.']] /project_klant_nummer'; $response.='project_naam![CDATA['.$row-project_naam.']]/project_naam' ; $response.='project_omschrijving![CDATA['.$row-project_omschrijving.']] /project_omschrijving'; $response.='project_werkzaamheden![CDATA['.$row-project_werkzaamheden.'] ]/project_werkzaamheden'; $response.='project_ordernummer_klant![CDATA['.$row-project_ordernummer_ klant.']]/project_ordernummer_klant'; $response.='project_contactpersoon![CDATA['.$row-project_contactpersoon. ']]/project_contactpersoon'; $response.='project_aanneemsom![CDATA['.$row-project_aanneemsom.']]/pr oject_aanneemsom'; $response.='project_opdracht![CDATA['.$row-project_opdracht.']]/projec t_opdracht'; $response.='/project'; } $response.=/data; print $response; } Best regards, Cor -Original Message- From: flashcoders-boun...@chattyfig.figleaf.com [mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Henrik Andersson Sent: woensdag 20 juli 2011 16:37 To: Flash Coders List Subject: Re: [Flashcoders] Incorrect XML from PHP to Flash Your php code is broken then. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Calling native code from Flash
Hi, Having tried the Ogg encoding program someone wrote as a demo, I am inclined to agree - to work around this, I used AIR's Native Process API to launch the oggenc encoder to encode wav files. If the northcode DLL stuff is no good, maybe consider running your DLL in an application that provides a simple API over command line and use the Native Process API to pass commands, or use a Socket as other people suggested. We use the socket method to talk to a backend C++ program.. Glen On 19/07/2011 12:35, Gerry Beauregard wrote: On 2011-07-19 , at 18:07 , Leandro Ferreira wrote: Have you tried Alchemy? http://labs.adobe.com/technologies/alchemy/ * * * @leandroferreira* * 55 61 91151257* Yes. Alchemy still runs on the ActionScript Virtual Machine, though, so it's not particularly fast. Nowhere near as fast as compiled C++ code. Alchemy has some other issues too. Passing large amounts of data between AS3 and Alchemy code is pretty slow. As far as I can tell, there's no way to pass a VectorNumber, and passing via ByteArrays is really slow - the reading and writing of the ByteArray is slow enough to obviate any gain you get from using Alchemy as opposed to AS3. Alchemy also seems to still be a research project within Adobe Labs, not really a fully-supported official product, so I'm reluctant to use it for commercial code. -Gerry ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Detecting if line crosses movie clip
Hi, Can you measure the vector distance between the centre of the polygon and the centre of the ball? If that is 0,0, and the diameter of the circle is less than the smallest of width / height of the box, then you are inside. Glen On 16/06/2011 13:58, Paul Steven wrote: Working on a game where the player must draw around some colored balls on screen by dragging the mouse to create the polygon that surrounds the objects. The polygon is created by drawing a series of lines every time the mouse moves. If one of these lines intersects one of the balls (movie clip) I need to perform an action. So my question is how to detect when the line intersects a movie clip? The following is unsuitable as it treats the line as a rectangle e.g a vertical line will have a lot of hit area that I do not want to be hit area if (ballMC.hitTestObject(lineMC)) { My other best suggestion is to use the 4 lines that make up the bounding box of the ball movie clip and do a line intersection test for each line against the line being drawn. This seems overly complex so before I try this I wanted to check there is not a simpler solution. Thanks in advance ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ca ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Stage video
You will need the Flex SDK for that file. On 16/06/2011 15:07, John R. Sweeney Jr wrote: I have the 10.3 plugin and Flash CS5. I haven't installed CS5.5 yet, but a friend has it and he doesn't have the playerglobals.swc file either. Any other way to get access to StageVideo? Thanks in advance, John on 6/16/11 6:35 AM, Henrik Andersson at he...@henke37.cjb.net wrote: It is in playerglobals.swc, it is not a separate as file. You need an updated version of flash in order to use StageVideo. John R. Sweeney Jr. Interactive Multimedia Developer OnDemand Interactive Inc 945 Washington Blvd. Hoffman Estates, IL 60169 Office/Fax: 847.310.5959 Cellular: 847.651.4469 www.ondemandinteractive.com ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Detecting if line crosses movie clip
I am not sure - do you mean single line like a circle, or a single line as in straight one? My idea was to test if a circle was inside a rectangle, so not sure if would work with single lines... It might not work very well with anything but a rectangle either. On 16/06/2011 15:09, Paul Steven wrote: Thanks Glen - this sounds like another good solution. I assume this would work when the polygon is just a single line? -Original Message- From: flashcoders-boun...@chattyfig.figleaf.com [mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Glen Pike Sent: 16 June 2011 14:48 To: Flash Coders List Subject: Re: [Flashcoders] Detecting if line crosses movie clip Hi, Can you measure the vector distance between the centre of the polygon and the centre of the ball? If that is 0,0, and the diameter of the circle is less than the smallest of width / height of the box, then you are inside. Glen On 16/06/2011 13:58, Paul Steven wrote: Working on a game where the player must draw around some colored balls on screen by dragging the mouse to create the polygon that surrounds the objects. The polygon is created by drawing a series of lines every time the mouse moves. If one of these lines intersects one of the balls (movie clip) I need to perform an action. So my question is how to detect when the line intersects a movie clip? The following is unsuitable as it treats the line as a rectangle e.g a vertical line will have a lot of hit area that I do not want to be hit area if (ballMC.hitTestObject(lineMC)) { My other best suggestion is to use the 4 lines that make up the bounding box of the ball movie clip and do a line intersection test for each line against the line being drawn. This seems overly complex so before I try this I wanted to check there is not a simpler solution. Thanks in advance ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ca ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] AS3 exploding and reassemble bitmap
Probably all that CGI hair ;) On 16/06/2011 17:40, Kevin Newman wrote: I updated the post with a link to the source: http://www.unfocus.com/2010/06/29/the-bunny-video-eplodes-explodes/ http://www.unfocus.com/PixelExploder/PixelExploder02.zip If anyone knows why that runs so sluggishly in the content debugger (including the incubator build), I'd love to know why. :-) Kevin N. On 6/14/11 5:22 PM, Eric E. Dolecki wrote: that would be very nice of you - for me and those lurking too. Google Voice: (508) 656-0622 Twitter: eric_dolecki XBoxLive: edolecki PSN: eric_dolecki http://blog.ericd.net On Tue, Jun 14, 2011 at 4:43 PM, Kevin Newmancapta...@unfocus.com wrote: Hmm. I don't seem to have the source up for that (thought I did), you can use a slightly older set of files from here: (This one has source) http://www.unfocus.com/2010/06/23/the-pixels-explode-explode/ If you are interested in the newer faster one (fast enough to work with video - and a blur filter), I'd be happy to zip up the source and post it somewhere. Quick note on the video example - it's sloow in content debugger builds. I don't know why. Kevin N. On 6/14/11 4:25 PM, Eric E. Dolecki wrote: Thanks a lot for showing that to me - I managed to get something working which is both quick and relatively cool. I don't ever do a pixel by pixel explosion to save speed, smallest I go is 2px segments, but it's very quick that way and looks nearly as cool. I am working on the explosion physics at the moment (instead of just coming out from the displayObject, working in spirals, etc. for each piece). Google Voice: (508) 656-0622 Twitter: eric_dolecki XBoxLive: edolecki PSN: eric_dolecki http://blog.ericd.net ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Strange Button Behavior
Hmm, an exe should be exempt from the local vs network restrictions, but maybe something else is failing. Have you tried tracing the error? I vaguely rememeber having problems with _blank, etc. in the past. See if it works without those? Here are some links I found that may help. http://probertson.com/articles/2006/10/11/geturl-flash-projector-firefox-problem/ http://www.adobe.com/devnet/flash/articles/local_network_playback.html http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/net/package.html#navigateToURL%28%29 Glen On 11/06/2011 19:35, Steve Abaffy wrote: Hello, After some more investigation I have found that the buttons not working problem I was having is not a browser malfunction. I have found that when I put the site on a web server all works well regardless of the browser. But when I put the site on a CD a run it from there, all calls to outside sources do not work. All calls to local sources such as url:String = /Documents/some.pdf in the below function works just fine. And insight to this problem would be appreciated. function GotoURLAustinMopac(e:MouseEvent):void{ var url:String = http://maps.google.com/maps?f=qhl=engeocode=q=6836+Austin+Center+Blvd.+A ustin+TX+78731; var request:URLRequest = new URLRequest(url); try { navigateToURL(request,'_blank'); } catch (e:Error) { //Do Nothing } } ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] reading a very simple XML file
Hi, You should be able to do: var children:XMLList = xmlData.children(); foreach(var child:XML in children) { trace(child.toXMLString()); } make sure you use toXMLString for tracing XML elements - otherwise you end up with blanks sometimes. Glen On 08/06/2011 16:28, ACE Flash wrote: thanks Cor, I have already tried this and it returned nothing as well. It's very weird!. I was able to retrieve the length by this, it returned 3. trace(xmlData.asset.length()); On Wed, Jun 8, 2011 at 11:17 AM, Corc...@chello.nl wrote: Try this: trace(xmlData.asset[i]); instead of trace(xmlData.children()[i]); //=== but I can;t get each node here... Groeten, Cor van Dooren www.codobyte.com -- There are only 10 types of people in the world: Those who understand binary and those who don't. -Original Message- From: flashcoders-boun...@chattyfig.figleaf.com [mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of ACE Flash Sent: woensdag 8 juni 2011 17:10 To: Flash Coders List Subject: [Flashcoders] reading a very simple XML file Hi guys, I am pulling out my hair :(, my code can retrieve the xml file without any problem. But I was not able to retrieve each node in the follow case. Would you please help me to take a look my code? am I mising somehing? Cheers = XML FILE ?xml version=1.0 encoding=UTF-8? root asset type=IMAGE url=www.google.com filename=googlefilename size=1000/ asset type=IMAGE url=www.yahoo.com filename=yahoofilename size=1200/ asset type=IMAGE url=www.bing.com filename=bingfilename size=1100/ /root = AS3 import flash.events.Event; var loader:URLLoader = new URLLoader();var request:URLRequest = new URLRequest(test.xml);var xmlData:XML;var childLength:uint; loader.addEventListener(Event.COMPLETE, completeHandler);loader.load(request); function completeHandler(e:Event):void{ xmlData = XML(e.target.data); childLength = xmlData.children().length(); //trace(xmlData.children()); //== I can retrieve the data here for (var i:uint = 0; i childLength; i++) { trace(xmlData.children()[i]); //=== but I can;t get each node here... } } === code online = http://www.privatepaste.com/89e38a7292 ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] reading a very simple XML file
Ooop, sorry make that for each() On 08/06/2011 16:28, ACE Flash wrote: thanks Cor, I have already tried this and it returned nothing as well. It's very weird!. I was able to retrieve the length by this, it returned 3. trace(xmlData.asset.length()); On Wed, Jun 8, 2011 at 11:17 AM, Corc...@chello.nl wrote: Try this: trace(xmlData.asset[i]); instead of trace(xmlData.children()[i]); //=== but I can;t get each node here... Groeten, Cor van Dooren www.codobyte.com -- There are only 10 types of people in the world: Those who understand binary and those who don't. -Original Message- From: flashcoders-boun...@chattyfig.figleaf.com [mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of ACE Flash Sent: woensdag 8 juni 2011 17:10 To: Flash Coders List Subject: [Flashcoders] reading a very simple XML file Hi guys, I am pulling out my hair :(, my code can retrieve the xml file without any problem. But I was not able to retrieve each node in the follow case. Would you please help me to take a look my code? am I mising somehing? Cheers = XML FILE ?xml version=1.0 encoding=UTF-8? root asset type=IMAGE url=www.google.com filename=googlefilename size=1000/ asset type=IMAGE url=www.yahoo.com filename=yahoofilename size=1200/ asset type=IMAGE url=www.bing.com filename=bingfilename size=1100/ /root = AS3 import flash.events.Event; var loader:URLLoader = new URLLoader();var request:URLRequest = new URLRequest(test.xml);var xmlData:XML;var childLength:uint; loader.addEventListener(Event.COMPLETE, completeHandler);loader.load(request); function completeHandler(e:Event):void{ xmlData = XML(e.target.data); childLength = xmlData.children().length(); //trace(xmlData.children()); //== I can retrieve the data here for (var i:uint = 0; i childLength; i++) { trace(xmlData.children()[i]); //=== but I can;t get each node here... } } === code online = http://www.privatepaste.com/89e38a7292 ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
[Flashcoders] Flashplayer linux standalone traces
Hi, I am running Flashplayer debugger standalone versions on linux, but my tracing seems to have broken - anyone noticed this? I tried: flashplayer 10.3.181.14, 10.2.152.27 which both don't work. I get complaints about a missing VDPAU driver in the output, but flash still runs: Failed to open VDPAU backend libvdpau_nvidia.so: cannot open shared object file: No such file or directory Am not too worried about the error message because mplayer does the same and still runs. The last version I have with trace working seems to be 10.0.45.2 TIA Glen ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Flashplayer linux standalone traces
Hi, Found a solution - it looks like adobe changed the way debugging works with 10.1 maybe: http://blog.brokenfunction.com/2010/10/flash-10-1-standalone-debug-player-and-its-missing-debug-output/ Glen On 02/06/2011 13:10, Glen Pike wrote: Hi, I am running Flashplayer debugger standalone versions on linux, but my tracing seems to have broken - anyone noticed this? I tried: flashplayer 10.3.181.14, 10.2.152.27 which both don't work. I get complaints about a missing VDPAU driver in the output, but flash still runs: Failed to open VDPAU backend libvdpau_nvidia.so: cannot open shared object file: No such file or directory Am not too worried about the error message because mplayer does the same and still runs. The last version I have with trace working seems to be 10.0.45.2 TIA Glen ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
[Flashcoders] Hands up who understands utf-8 encoding?
Hi, I have run into a problem that seems pretty bizarre, but may be a silly error on my part. I have a function to encode strings in Flash to hex values, but it needs to deal with various languages and special characters, so needs to handle Unicode strings. I had a function - it works fine in Windows and used to work on the target platform - running 10.0.45.2 standalone debug player on Gentoo Linux All of a sudden - the encoding has stopped working and is creating garbage so is not working any more. We have changed the hardware and probably the kernel version lately, so this is the only thing that I think which could effect it, but I maybe wrong. I have an old function / workaround which I can use, but if someone could explain wtf is going on I would be greatful. Code is posted below for your amusement. Thanks Glen /*Example output (there is a newline \n between Simon and speech - note the disparity between the ByteArray version and the test / older function. UniStr2UTF8Hex 4/4 read, hex is b4 9a 7e b5 from str voice=Simon speech=My name is Robo Thespian. UniStr2UTF8Hex Test str 76 6f 69 63 65 3d 53 69 6d 6f 6e 0a 73 70 65 65 63 68 3d 4d 79 20 6e 61 6d 65 20 69 73 20 52 6f 62 6f 20 54 68 65 73 70 6 9 61 6e 2e */ public function UniStr2UTF8Hex(str:String):String { var hex:String = ; var i:int = 0; var bytes:ByteArray = new ByteArray(); bytes.writeMultiByte(str, utf-8); bytes.position = 0; var byte:String; try { while (i bytes.length) { byte = Number(bytes.readUnsignedByte()).toString(16); if (1 == byte.length) { byte = 0 + byte; } hex += byte + ; i++; } } catch (e:EOFError) { debug(UniStr2UTF8Hex, finished at + i + len + bytes.length, Dbg.DEBUG_MAX); } debug(UniStr2UTF8Hex, i + / + bytes.length + read, hex is + hex + from str + str, Dbg.DEBUG_HIGH); return hex.split( ).join(); } In contrast, this function works fine: public function UniStr2UTF8Hex(str:String):String { var test:String = ; for (i = 0; i str.length; i++) { var ucs:int = str.charCodeAt(i); var ch:String; if (128 ucs) { ch = ucs.toString(16); if (1 == ch.length) { ch = 0 + ch; } test += ch + ; } else if (128 = ucs 2047 = ucs) { ch = Number(192 + (ucs / 64)).toString(16); if (1 == ch.length) { ch = 0 + ch; } test += ch + ; ch = Number(128 + (ucs % 64)).toString(16); if (1 == ch.length) { ch = 0 + ch; } test += ch + ; } } debug(UniStr2UTF8Hex, Test str + test, Dbg.DEBUG_HIGH); return test.split( ).join(); } ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Hands up who understands utf-8 encoding?
Hmm, Think it's a bug in Flashplayer 10.0.45.2 which is not in a later version - 10.2.152.28 Glen On 27/05/2011 12:09, Glen Pike wrote: Hi, I have run into a problem that seems pretty bizarre, but may be a silly error on my part. I have a function to encode strings in Flash to hex values, but it needs to deal with various languages and special characters, so needs to handle Unicode strings. I had a function - it works fine in Windows and used to work on the target platform - running 10.0.45.2 standalone debug player on Gentoo Linux All of a sudden - the encoding has stopped working and is creating garbage so is not working any more. We have changed the hardware and probably the kernel version lately, so this is the only thing that I think which could effect it, but I maybe wrong. I have an old function / workaround which I can use, but if someone could explain wtf is going on I would be greatful. Code is posted below for your amusement. Thanks Glen /*Example output (there is a newline \n between Simon and speech - note the disparity between the ByteArray version and the test / older function. UniStr2UTF8Hex 4/4 read, hex is b4 9a 7e b5 from str voice=Simon speech=My name is Robo Thespian. UniStr2UTF8Hex Test str 76 6f 69 63 65 3d 53 69 6d 6f 6e 0a 73 70 65 65 63 68 3d 4d 79 20 6e 61 6d 65 20 69 73 20 52 6f 62 6f 20 54 68 65 73 70 6 9 61 6e 2e */ public function UniStr2UTF8Hex(str:String):String { var hex:String = ; var i:int = 0; var bytes:ByteArray = new ByteArray(); bytes.writeMultiByte(str, utf-8); bytes.position = 0; var byte:String; try { while (i bytes.length) { byte = Number(bytes.readUnsignedByte()).toString(16); if (1 == byte.length) { byte = 0 + byte; } hex += byte + ; i++; } } catch (e:EOFError) { debug(UniStr2UTF8Hex, finished at + i + len + bytes.length, Dbg.DEBUG_MAX); } debug(UniStr2UTF8Hex, i + / + bytes.length + read, hex is + hex + from str + str, Dbg.DEBUG_HIGH); return hex.split( ).join(); } In contrast, this function works fine: public function UniStr2UTF8Hex(str:String):String { var test:String = ; for (i = 0; i str.length; i++) { var ucs:int = str.charCodeAt(i); var ch:String; if (128 ucs) { ch = ucs.toString(16); if (1 == ch.length) { ch = 0 + ch; } test += ch + ; } else if (128 = ucs 2047 = ucs) { ch = Number(192 + (ucs / 64)).toString(16); if (1 == ch.length) { ch = 0 + ch; } test += ch + ; ch = Number(128 + (ucs % 64)).toString(16); if (1 == ch.length) { ch = 0 + ch; } test += ch + ; } } debug(UniStr2UTF8Hex, Test str + test, Dbg.DEBUG_HIGH); return test.split( ).join(); } ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] is there a dsp lib with analysis using zero crossing in as3
Hi, Andre Michelle did some nice talks about simple audio stuff - his sources may have some useful helpers http://blog.andre-michelle.com/2008/fotb08-sildes-and-sources/ Also checkout his lab page: http://lab.andre-michelle.com/ There is an EQ filter on there, which might be useful. HTH Glen On 11/05/2011 21:12, Anthony Pace wrote: Hello list, I have been doing some experiments, but although my stuff is working, it isn't optimized at all, and I would to try a reliable lib that uses zero crossings for analysis, if one exists. Any suggestions? I am really just interested in pitch analysis with very small sample chunks. Timber is not really necessary, so I, with my limited DSP knowledge, think the FFT is overkill; however, I absolutely admit I could be wrong and not seeing something important. Another thing is that I was thinking a good/cheap way to get rid of some low level background noise would be to normalize all values within the time domain with a very high gain factor, and just give max and min values for the zero crossings( e.g +3, -3 respectively... I know the numbers would obviously not be these ones). I know know frequency analysis would have to be preformed in order to remove a voice, but I am thinking that this could allow me to zero out/ignore, really low level/really high level background noise. Should I try something different? Again, I have just started reading through a copy of 'DSP: a computer science perspective', that someone gave me, and it seems like what I am talking about would work; yet, if not, and you have experience with signals analysis, I would appreciate the heads up. Thank you, Anthony ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Flash Opportunity
Definitely not if you are lounging around the Dominican Republic and your name rhymes with steno... On 06/05/2011 16:12, Deepanjan Das wrote: Hi, Is remote development allowed for this requirement. Warm Regards Deepanjan Das W: http://deepanjandas.wordpress.com || Om Manasamarthadata Shri Aniruddhaya Namah ||http://www.manasamarthyadata.com/ *Think of the environment before printing this email __ * On Fri, May 6, 2011 at 7:58 PM, Amanda Prostack aprost...@missionstaff.comwrote: I wanted to reach out and see if anyone could refer someone for the role below at our client in Newtown Square/Media. Its a long term contract, at least 40 hours a week. Please feel free to have anyone reach out to me who may be interested. Thanks! Amanda Prostack MissionStaff 215-545-1600 Ext. 16 www.MissionStaff.com Title: Flash Developer/Analyst Description of Duties: The core technology skill sets are: · Adobe Illustrator · Adobe Flash · HTML—general web page design skills · Action script writing · Adobe Photoshop The core business skills are: · Ability to take inventory of a large body of work and organize it into a working docket · Adhere to an asset creation and publishing process · Able to follow a multi-step process and improve upon it and document it. · Manage expectations of Marketing Department group responsible for the Marketing Portal content · Take responsibility for the asset Quality Assurance process and work in tandem with a Marketing Department Subject Matter Expert to obtain approval for them to be published to the portal The specific project/day-to-day responsibilities are: · Editing customizable marketing assets/materials in Photoshop and Flash, including cropping, text additions/updates, resolution settings, etc. · Editing action scripts · Creating (compiling) .swf files · Uploading assets to Production environment ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] E4X question: finding parent
@name - will that cause problems because name is a property of XML nodes? if it is maybe try attribute(name) instead? On 05/05/2011 16:53, Kenneth Kawamoto wrote: var xml:XML = root pets group=A pet name=Rover/ pet name=Buffy/ /pets pets group=B pet name=Spot/ pet name=Sugar/ /pets /root; trace(xml.pets.pet.(@name == Sugar).parent().@group); // B Perhaps you don't want to call your XML pets as it's a node name as well. Kenneth Kawamoto http://www.materiaprima.co.uk/ On 05/05/2011 16:32, Mendelsohn, Michael wrote: Hi list... I'm trying to find some xml's parent attribute. I havepet name=Sugar/ and I want to find B. var pets:XML =pets group=A pet name=Rover/ pet name=Buffy/ /pets pets group=B pet name=Spot/ pet name=Sugar/ /pets; I can't seem to find it. Anyone know how? Thanks, - Michael M. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] What is up with adobes documentation?
Local help is a joke in Flash - if you install the AIR app, it just downloads their help pages in HTML - my browser is slightly faster, but still navigating the API's is s slow! I agree about Google - someone needs to make a swf panel which hooks into google to search for flash stuff based on the ide, etc. On 22/04/2011 18:55, Merrill, Jason wrote: I miss the good old days when Adobe's local help was easy to access and find information. I find better results with Google. Jason Merrill Instructional Technology Architect Bank of America Global Learning ___ -Original Message- From: flashcoders-boun...@chattyfig.figleaf.com [mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Kevin Newman Sent: Friday, April 22, 2011 1:52 PM To: Flash Coders List Subject: Re: [Flashcoders] What is up with adobes documentation? I usually just put the class name with as3 into google (LocalConnection as3) - it almost always gives me something useful. I do generally agree that's it's often hard to find anything using Adobe's built in documentation tool - especially using the search field (which is local in CS5). Though you can just type your keyword into Flash's action dialog, or an as document, then click that little ? icon - sometimes pulls it right up (after 17 update dialog boxes maybe). I don't agree with your conclusions about competitiveness based on that difficulty, but yeah, it could be better. Kevin N. On 4/21/11 1:54 PM, allandt bik-elliott (thefieldcomic.com) wrote: Hey folks Every time I do a big search I seem to get a LOT of as2 links and when I add as3 into the search terms I keep getting links to either a page offering up a bunch of generic documentation pages (ie not direct links to the class I'm looking for) or I get class documentation pages that are only half full. Seriously do a search on the livedocs site for the flvplayback class, its shocking especially in light of the fact that there is no longer any local docs installed with the software any more What is going on with this? With people (rightly or wrongly) bashing flash in favour of the yet untried html5 spec, adobe can ill afford this kind of crap support for the flash platform. Come on A ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders -- This message w/attachments (message) is intended solely for the use of the intended recipient(s) and may contain information that is privileged, confidential or proprietary. If you are not an intended recipient, please notify the sender, and then please delete and destroy all copies and attachments, and be advised that any review or dissemination of, or the taking of any action in reliance on, the information contained in or attached to this message is prohibited. Unless specifically indicated, this message is not an offer to sell or a solicitation of any investment products or other financial product or service, an official confirmation of any transaction, or an official statement of Sender. Subject to applicable law, Sender may intercept, monitor, review and retain e-communications (EC) traveling through its networks/systems and may produce any such EC to regulators, law enforcement, in litigation and as required by law. The laws of the country of each sender/recipient may impact the handling of EC, and EC may be archived, supervised and produced in countries other than the country in which you are located. This message cannot be guaranteed to be secure or free of errors or viruses. References to Sender are references to any subsidiary of Bank of America Corporation. Securities and Insurance Products: * Are Not FDIC Insured * Are Not Bank Guaranteed * May Lose Value * Are Not a Bank Deposit * Are Not a Condition to Any Banking Service or Activity * Are Not Insured by Any Federal Government Agency. Attachments that are part of this EC may have additional important disclosures and disclaimers, which you should read. This message is subject to terms available at the following link: http://www.bankofamerica.com/emaildisclaimer. By messaging with Sender you consent to the foregoing. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
[Flashcoders] CS5, SharedObject AIR for Android debugging
Hi, I am trying to debug an AIR for Android app in CS5 and am having problems with saving shared object data. Originally it was throwing exceptions - I found a fix to use SharedObject.close() after each operation, but it seems that the AIR app cannot save to local storage in the IDE. Tried to google, but not having much luck, can anyone shed some light on this? Thanks Glen ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Problem embedding and using a font variant
Have you tried enumerating your embedded fonts to see what name Flash gives it? If you embed just your Myriad Pro Condensed into a document and add the actionscript to list out the font name, etc. http://www.google.com/search?ie=UTF-8oe=UTF-8sourceid=navclientgfns=1q=as3+enumerate+font You might find the system gives it a different name? Glen On 11/04/2011 19:24, Matt Perkins wrote: I'm using Myriad Pro for regular (non TLF) dynamic text fields in my project and it's working fine. Now the client wants to use Myriad Pro Condensed Bold for titles and I cannot get it to show up. I can't get just Myriad Pro Condensed to show either. I don't have any problems with Myriad Pro - I think the condensed variant/style is causing issues. I've checked over and over that I have it embedded properly. Looks like Condensed Bold is treated as a style like bold but there's no way to set a style on a text format object. I even tried setting the font style via html in the text content: textfild.htmlText = font face='Myriad Pro Condensed'+mytext+/font; Didn't work. Any tips for using font variants like this? I'd rather keep doing it dynamically like this and not have to create a textfield symbol in the library to use (which would work). Also, this is an AS3/CS5 project. The TLF TextLayoutFormat has a font style property, but not sure if it would work - but the last time I tried to use TLF my FLA wouldn't compile because of some error with my assets SWC and the TLF SWC. So I'd rather not go there. Maybe I can fake it by tweaking the scaleX property. Thanks, Matt ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] constructor interpreted?
On 05/04/2011 06:48, Kevin Newman wrote: Hey all, A long while ago I read that the constructor is interpreted, unlike the rest of the class methods, which are compiled. Is that still true? thanks, Kevin N. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Hi, I am not sure about the interpreted bit - I can't remember to well, but Colin Moock's AS3 book mentioned not putting too much code in a constructor because of some constraint on the system - instead you should farm out initialization to another function, e.g. public class MyClass { public function MyClass() { _init(); } private function _init():void { trace(doing lots of setup); //... trace(finished setup...); } } ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Wait for several things to be loaded
Hi, The clunkiness depends on how flexible you need to be I guess - to get it working, your approach is probably fine. But, if you have to keep implementing it over and over again, you might want to start refining your approach. e.g. If you have to add a data sets to be loaded, how do you accommodate this. When you have 10 or more, is is becoming unweildy and hard to manage? If so, it's probably time to refactor your approach to make it more flexible. Here is a couple of ideas off the top of my head - they are not the right way, just ideas. If you are using URLRequests to load data, you could separate out loading from your Database and SiteData and use something like QueueLoader: http://code.google.com/p/queueloader-as3/ or LoaderMax https://www.greensock.com/loadermax/ to load the data then populate your models. You could create an interface that each of your Database, SiteData other classes implement, then create an array of instances of these at runtime, then loop through them one by one, calling init on and setting flags / counting how many are loaded in your handler. For more complicated systems that regularly talk to servers with lots of commands you may have to run in sequence, look up asynchronous command chaining in Google - this is probably beyond what you want to do here as you are only loading in data from several sources at startup by the look of it, but the approaches may give you ideas to help implement a flexible system. HTH Glen On 18/03/2011 01:09, Mattheis, Erik (MIN-WSW) wrote: I'm building an AIR app following the MVC pattern. Several parts of the model have to be loaded or created before the view can be initialized. I'm doing it like this - which works, but seems clunky. Is there a better way? From the main class of the model: public function Model() { _database = new Database(); _database.addEventListener(Event.COMPLETE, handleComplete); _database.init(); _siteData = new SiteData(); _siteData.addEventListener(Event.COMPLETE, handleComplete); _siteData.init(); } private function handleComplete(e:Event) { if (e.target is SiteData) { _siteDataLoaded = true; } else if (e.target is Database) { _databaseLoaded = true; } if (_siteDataLoaded _databaseLoaded) { dispatchEvent(new Event(Event.COMPLETE)); } } _ _ _ Erik Mattheis | Weber Shandwick P: (952) 346.6610 M: (612) 377.2272 ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Simple encapsulation question
I would suggest allowing Tabs to remain ignorant of each other and let the parent deal with the focus, because you might like to change it. In my lazy world of radio-buttons that can only have on toggled on at once, I keep a reference to the currently toggled button. If I receive a click from a button and there is a current one, I untoggle that first, before toggling the clicked one and assigning it to the current reference. On 16/03/2011 17:00, Mattheis, Erik (MIN-WSW) wrote: I have a typical tabbed layout and am trying to figure out the simplest/best way to reset the focused state on the focused tab when another is clicked. Classes: Tab - contains graphics and a public variable referencing the MovieClip of the over state. Header - creates tabs, adds event listeners, contains array of references to tabs and a function to loop through them and remove the over state child. Is there a better way - to somehow add an event listener to each tab listening for a click on each other tab? Even if I don't know how many tabs there will be? _ _ _ Erik Mattheis | Weber Shandwick P: (952) 346.6610 M: (612) 377.2272 ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Getting Data into my SWF
Hello, The parameters that you pass to the SWF in your HTML are different to communicating with a back-end system. If you look at URLLoader in actionscript. This enables you to load data as you would load a web-page. You would use URLLoader with your server-side code, e.g. PHP to do GET and POST type requests: http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/net/URLLoader.html http://help.adobe.com/en_US/as3/dev/WS5b3ccc516d4fbf351e63e3d118666ade46-7ee2zephyr_serranozephyr.html This way, your users cannot inject their own date and it is also possible to have login type facilities. This way, what flash is doing is putting the pretty skin over your application. The difference from HTML is that you stay on the same page and make requests similar to Ajax. This site might have some good tutorials to get you started. http://www.flash-db.com/ Also, these pages should become your most thumbed. http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/index.htm http://help.adobe.com/en_US/flash/cs/using/index.html http://help.adobe.com/en_US/as3/dev/index.html HTH Glen On 10/03/2011 18:35, Kevin Holleran wrote: I'll explain further so I get valuable responses and avoid the sarcasm. My goal is to pass in the date from the server, the application counts down, and when the date hits a certain time, the application does something. This something that the application does will also be loaded by calling a PHP script that will load from a backend DB. My concern is someone being able to launch the SWF passing in an incorrect date that will trigger this something early. Thanks for your help. Kevin ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Getting Data into my SWF
Okay, so it is possible to change the date using a sniffer, but being as the majority of people don't tend to use sniffers, unless the guy is writing a critical application that flies planes or crashes them if the date is wrong then I would suggest that the risk assessment here would be to accept the fact that there are some people there who might use a sniffer and change the date. if we all ran around with the attitude that you can't trust anyone, so what's the point, we would still be in the dark ages. On 11/03/2011 09:45, Henrik Andersson wrote: Glen Pike skriver: Hello, The parameters that you pass to the SWF in your HTML are different to communicating with a back-end system. If you look at URLLoader in actionscript. This enables you to load data as you would load a web-page. You would use URLLoader with your server-side code, e.g. PHP to do GET and POST type requests: This way, your users cannot inject their own date and it is also possible to have login type facilities. You clearly haven't heard of HTTP request sniffers. With something like Fiddler http://www.fiddler2.com/ I can easily override the reply from any server. And no, SSL does not help there. I can authorize any certificate authority I feel like, including my own one. And for any other checksum/validation I can always just edit the swf file to skip the check. In the end it is the same ages old trusted client problem. You just can't protect code that runs on the client. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] quiet in here at the moment
That's because we are all old grizzly flashers who have scared the newbies away. Apart from that, I am still using Flash with no apparent end in sight, although I am also doing some stuff in other languages. Luckily, I am not doing it for an agency, but on a long-term project so I don't have to put up with marketing b**t telling me what I have to code in I have a question, but I will ask on another thread :) On 07/03/2011 18:11, Merrill, Jason wrote: Yep, this list has been getting rather quiet of the past month or two. Odd. So has Flash_Tiger. Jason Merrill Instructional Technology Architect Bank of America Global Learning ___ -Original Message- From: flashcoders-boun...@chattyfig.figleaf.com [mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of allandt bik-elliott (thefieldcomic.com) Sent: Monday, March 07, 2011 12:55 PM To: Flash Coders List Subject: [Flashcoders] quiet in here at the moment everyone still alive? ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders -- This message w/attachments (message) is intended solely for the use of the intended recipient(s) and may contain information that is privileged, confidential or proprietary. If you are not an intended recipient, please notify the sender, and then please delete and destroy all copies and attachments, and be advised that any review or dissemination of, or the taking of any action in reliance on, the information contained in or attached to this message is prohibited. Unless specifically indicated, this message is not an offer to sell or a solicitation of any investment products or other financial product or service, an official confirmation of any transaction, or an official statement of Sender. Subject to applicable law, Sender may intercept, monitor, review and retain e-communications (EC) traveling through its networks/systems and may produce any such EC to regulators, law enforcement, in litigation and as required by law. The laws of the country of each sender/recipient may impact the handling of EC, and EC may be archived, supervised and produced in countries other than the country in which you are located. This message cannot be guaranteed to be secure or free of errors or viruses. References to Sender are references to any subsidiary of Bank of America Corporation. Securities and Insurance Products: * Are Not FDIC Insured * Are Not Bank Guaranteed * May Lose Value * Are Not a Bank Deposit * Are Not a Condition to Any Banking Service or Activity * Are Not Insured by Any Federal Government Agency. Attachments that are part of this EC may have additional important disclosures and disclaimers, which you should read. This message is subject to terms available at the following link: http://www.bankofamerica.com/emaildisclaimer. By messaging with Sender you consent to the foregoing. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Exploring full-screen mode
Hi, It looks reasonable from here - I see a grey background with a blue rectangle that still shows up if I go full-screen - they are cropped slightly, i.e. the blue rectangle is at the bottom right hand corner of my screen and I have white bars top and bottom - maybe the swf doesn't match my screen proportion - 1280 x 1024 Glen On 24/02/2011 09:48, natalia Vikhtinskaya wrote: Hi I am trying to use full screen mode. I tested this example for AS2 http://www.adobe.com/devnet/flashplayer/articles/full_screen_mode.html Here is a test html with goScaledFullScreen function http://www.mightybook.com/test/adobeAS2.html As you can see in full mode content disappears. The same if I use goFullScreen function. What is wrong in my adaptation? Code with custom context menu from this article import flash.geom.Rectangle; function goFullScreen() { Stage[displayState] = fullScreen; } function goScaledFullScreen(){ var screenRectangle:Rectangle = new Rectangle(); screenRectangle.x = 0; screenRectangle.y = 0; screenRectangle.width=Stage.width/2; screenRectangle.height=Stage.height/2; Stage[fullScreenSourceRect] = screenRectangle; Stage[displayState] = fullScreen; } function exitFullScreen() { Stage[displayState] = normal; } function menuHandler(obj, menuObj) { if (Stage[displayState] == normal) { menuObj.customItems[0].enabled = true; menuObj.customItems[1].enabled = false; } else { menuObj.customItems[0].enabled = false; menuObj.customItems[1].enabled = true; } } var fullscreenCM:ContextMenu = new ContextMenu(menuHandler); fullscreenCM.hideBuiltInItems(); var fs:ContextMenuItem = new ContextMenuItem(Go Full Screen,goScaledFullScreen); fullscreenCM.customItems.push( fs ); var xfs:ContextMenuItem = new ContextMenuItem(Exit Full Screen, exitFullScreen); fullscreenCM.customItems.push( xfs ); _root.menu = fullscreenCM; Thank you in advance. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Exploring full-screen mode
Hi, IE 8 is fine with 10.1.85.3 10,2,152,26 Firefox 3.6.13 is fine with 10,2,152,26 Cache problem? Glen On 24/02/2011 10:09, natalia Vikhtinskaya wrote: I see white empty screen in full mode. IE 8, FireFox 3.6, FlashPlayer 10 2011/2/24 Glen Pikeg...@engineeredarts.co.uk: Hi, It looks reasonable from here - I see a grey background with a blue rectangle that still shows up if I go full-screen - they are cropped slightly, i.e. the blue rectangle is at the bottom right hand corner of my screen and I have white bars top and bottom - maybe the swf doesn't match my screen proportion - 1280 x 1024 Glen On 24/02/2011 09:48, natalia Vikhtinskaya wrote: Hi I am trying to use full screen mode. I tested this example for AS2 http://www.adobe.com/devnet/flashplayer/articles/full_screen_mode.html Here is a test html with goScaledFullScreen function http://www.mightybook.com/test/adobeAS2.html As you can see in full mode content disappears. The same if I use goFullScreen function. What is wrong in my adaptation? Code with custom context menu from this article import flash.geom.Rectangle; function goFullScreen() { Stage[displayState] = fullScreen; } function goScaledFullScreen(){ var screenRectangle:Rectangle = new Rectangle(); screenRectangle.x = 0; screenRectangle.y = 0; screenRectangle.width=Stage.width/2; screenRectangle.height=Stage.height/2; Stage[fullScreenSourceRect] = screenRectangle; Stage[displayState] = fullScreen; } function exitFullScreen() { Stage[displayState] = normal; } function menuHandler(obj, menuObj) { if (Stage[displayState] == normal) { menuObj.customItems[0].enabled = true; menuObj.customItems[1].enabled = false; } else { menuObj.customItems[0].enabled = false; menuObj.customItems[1].enabled = true; } } var fullscreenCM:ContextMenu = new ContextMenu(menuHandler); fullscreenCM.hideBuiltInItems(); var fs:ContextMenuItem = new ContextMenuItem(Go Full Screen,goScaledFullScreen); fullscreenCM.customItems.push( fs ); var xfs:ContextMenuItem = new ContextMenuItem(Exit Full Screen, exitFullScreen); fullscreenCM.customItems.push( xfs ); _root.menu = fullscreenCM; Thank you in advance. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Exploring full-screen mode
Hi, This sounds like a video driver problem, although I am not 100%. When you re-installed flashplayer, did you uninstall first - use the uninstaller: http://www.adobe.com/support/flashplayer/downloads.html#uninstaller Check out this post about similar complaint - it might help resolve it, I don't know. Glen On 24/02/2011 12:54, natalia Vikhtinskaya wrote: Karl, thank you for your help. I see something wrong on my side. I also don't see any youtube fullscreen video. But I don't know where the problem can be. If I play swf without browser I also don't see content in full screen mode. That means it is FlashPlayer problem. What else can I check or change? 2011/2/24 Karl DeSaulniersk...@designdrumm.com: Here is a sample. Make sure allowFullScreen is set in your HTML. http://designdrumm.com/nataliaVikhtinskaya/ Best, Karl On Feb 24, 2011, at 5:13 AM, Karl DeSaulniers wrote: Try this natalia... import flash.geom.Rectangle; Stage[fullScreenSourceRect] = new Rectangle( 0, 0, Stage.width/2, Stage.height/2); Stage.scaleMode = maintainAspectRatio; function goFullScreen() { Stage[displayState] = fullScreen; } function exitFullScreen() { Stage[displayState] = normal; } function menuHandler(obj, menuObj) { if (Stage[displayState] == normal) { menuObj.customItems[0].enabled = true; menuObj.customItems[1].enabled = false; } else { menuObj.customItems[0].enabled = false; menuObj.customItems[1].enabled = true; } } this.onFullScreen = function(bFullScreen:Boolean):Void { if (bFullScreen){ Stage.showMenu = true; } } var fullscreenCM:ContextMenu = new ContextMenu(menuHandler); fullscreenCM.hideBuiltInItems(); var fs:ContextMenuItem = new ContextMenuItem(Go Full Screen, goFullScreen); fullscreenCM.customItems.push( fs ); var xfs:ContextMenuItem = new ContextMenuItem(Exit Full Screen, exitFullScreen); fullscreenCM.customItems.push( xfs ); Stage.addListener(Stage[displayState] == fullScreen, onFullScreen); _root.menu = fullscreenCM; Works for me.. :) Best, Karl On Feb 24, 2011, at 3:48 AM, natalia Vikhtinskaya wrote: Hi I am trying to use full screen mode. I tested this example for AS2 http://www.adobe.com/devnet/flashplayer/articles/full_screen_mode.html Here is a test html with goScaledFullScreen function http://www.mightybook.com/test/adobeAS2.html As you can see in full mode content disappears. The same if I use goFullScreen function. What is wrong in my adaptation? Code with custom context menu from this article import flash.geom.Rectangle; function goFullScreen() { Stage[displayState] = fullScreen; } function goScaledFullScreen(){ var screenRectangle:Rectangle = new Rectangle(); screenRectangle.x = 0; screenRectangle.y = 0; screenRectangle.width=Stage.width/2; screenRectangle.height=Stage.height/2; Stage[fullScreenSourceRect] = screenRectangle; Stage[displayState] = fullScreen; } function exitFullScreen() { Stage[displayState] = normal; } function menuHandler(obj, menuObj) { if (Stage[displayState] == normal) { menuObj.customItems[0].enabled = true; menuObj.customItems[1].enabled = false; } else { menuObj.customItems[0].enabled = false; menuObj.customItems[1].enabled = true; } } var fullscreenCM:ContextMenu = new ContextMenu(menuHandler); fullscreenCM.hideBuiltInItems(); var fs:ContextMenuItem = new ContextMenuItem(Go Full Screen,goScaledFullScreen); fullscreenCM.customItems.push( fs ); var xfs:ContextMenuItem = new ContextMenuItem(Exit Full Screen, exitFullScreen); fullscreenCM.customItems.push( xfs ); _root.menu = fullscreenCM; Thank you in advance. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Karl DeSaulniers Design Drumm http://designdrumm.com ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Karl DeSaulniers Design Drumm http://designdrumm.com ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Exploring full-screen mode
Hi, Sorry, I did not post the forum link before - it could be a problem with H/W acceleration: http://forums.techarena.in/windows-software/1349719.htm http://www.google.com/support/forum/p/Chrome/thread?tid=74fc99d821fed64ahl=en Hopefully this might help Glen On 24/02/2011 13:31, natalia Vikhtinskaya wrote: I uninstaled and installed FP again. Result is the same. FP doesn't show content in full mode. 2011/2/24 Glen Pikeg...@engineeredarts.co.uk: Hi, This sounds like a video driver problem, although I am not 100%. When you re-installed flashplayer, did you uninstall first - use the uninstaller: http://www.adobe.com/support/flashplayer/downloads.html#uninstaller Check out this post about similar complaint - it might help resolve it, I don't know. Glen On 24/02/2011 12:54, natalia Vikhtinskaya wrote: Karl, thank you for your help. I see something wrong on my side. I also don't see any youtube fullscreen video. But I don't know where the problem can be. If I play swf without browser I also don't see content in full screen mode. That means it is FlashPlayer problem. What else can I check or change? 2011/2/24 Karl DeSaulniersk...@designdrumm.com: Here is a sample. Make sure allowFullScreen is set in your HTML. http://designdrumm.com/nataliaVikhtinskaya/ Best, Karl On Feb 24, 2011, at 5:13 AM, Karl DeSaulniers wrote: Try this natalia... import flash.geom.Rectangle; Stage[fullScreenSourceRect] = new Rectangle( 0, 0, Stage.width/2, Stage.height/2); Stage.scaleMode = maintainAspectRatio; function goFullScreen() { Stage[displayState] = fullScreen; } function exitFullScreen() { Stage[displayState] = normal; } function menuHandler(obj, menuObj) { if (Stage[displayState] == normal) { menuObj.customItems[0].enabled = true; menuObj.customItems[1].enabled = false; } else { menuObj.customItems[0].enabled = false; menuObj.customItems[1].enabled = true; } } this.onFullScreen = function(bFullScreen:Boolean):Void { if (bFullScreen){ Stage.showMenu = true; } } var fullscreenCM:ContextMenu = new ContextMenu(menuHandler); fullscreenCM.hideBuiltInItems(); var fs:ContextMenuItem = new ContextMenuItem(Go Full Screen, goFullScreen); fullscreenCM.customItems.push( fs ); var xfs:ContextMenuItem = new ContextMenuItem(Exit Full Screen, exitFullScreen); fullscreenCM.customItems.push( xfs ); Stage.addListener(Stage[displayState] == fullScreen, onFullScreen); _root.menu = fullscreenCM; Works for me.. :) Best, Karl On Feb 24, 2011, at 3:48 AM, natalia Vikhtinskaya wrote: Hi I am trying to use full screen mode. I tested this example for AS2 http://www.adobe.com/devnet/flashplayer/articles/full_screen_mode.html Here is a test html with goScaledFullScreen function http://www.mightybook.com/test/adobeAS2.html As you can see in full mode content disappears. The same if I use goFullScreen function. What is wrong in my adaptation? Code with custom context menu from this article import flash.geom.Rectangle; function goFullScreen() { Stage[displayState] = fullScreen; } function goScaledFullScreen(){ var screenRectangle:Rectangle = new Rectangle(); screenRectangle.x = 0; screenRectangle.y = 0; screenRectangle.width=Stage.width/2; screenRectangle.height=Stage.height/2; Stage[fullScreenSourceRect] = screenRectangle; Stage[displayState] = fullScreen; } function exitFullScreen() { Stage[displayState] = normal; } function menuHandler(obj, menuObj) { if (Stage[displayState] == normal) { menuObj.customItems[0].enabled = true; menuObj.customItems[1].enabled = false; } else { menuObj.customItems[0].enabled = false; menuObj.customItems[1].enabled = true; } } var fullscreenCM:ContextMenu = new ContextMenu(menuHandler); fullscreenCM.hideBuiltInItems(); var fs:ContextMenuItem = new ContextMenuItem(Go Full Screen,goScaledFullScreen); fullscreenCM.customItems.push( fs ); var xfs:ContextMenuItem = new ContextMenuItem(Exit Full Screen, exitFullScreen); fullscreenCM.customItems.push( xfs ); _root.menu = fullscreenCM; Thank you in advance. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Karl DeSaulniers Design Drumm http://designdrumm.com ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Karl DeSaulniers Design Drumm http://designdrumm.com ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Exploring full-screen mode
http://www.macromedia.com/support/documentation/en/flashplayer/help/help01.html Right click on a running flash player, e.g. youtube video or something else and choose Settings, then in the settings box, choose the first icon - Display. On 24/02/2011 14:11, natalia Vikhtinskaya wrote: I found some here http://forums.adobe.com/thread/659297?tstart=0 How can I open Settings Manager or what new drivers I need for Flash Player 10? 2011/2/24 natalia Vikhtinskayanatavi.m...@gmail.com: Yes playing swf locally stand alone or as projector file gives the same effect in full screen. Movie plays but I see blank screen. 2011/2/24 Karl DeSaulniersk...@designdrumm.com: Are you trying to run the file locally? Stand alone? Did you try making a projector of it? I think a projector file can go fullscreen. Karl On Feb 24, 2011, at 7:31 AM, natalia Vikhtinskaya wrote: I uninstaled and installed FP again. Result is the same. FP doesn't show content in full mode. 2011/2/24 Glen Pikeg...@engineeredarts.co.uk: Hi, This sounds like a video driver problem, although I am not 100%. When you re-installed flashplayer, did you uninstall first - use the uninstaller: http://www.adobe.com/support/flashplayer/downloads.html#uninstaller Check out this post about similar complaint - it might help resolve it, I don't know. Glen On 24/02/2011 12:54, natalia Vikhtinskaya wrote: Karl, thank you for your help. I see something wrong on my side. I also don't see any youtube fullscreen video. But I don't know where the problem can be. If I play swf without browser I also don't see content in full screen mode. That means it is FlashPlayer problem. What else can I check or change? 2011/2/24 Karl DeSaulniersk...@designdrumm.com: Here is a sample. Make sure allowFullScreen is set in your HTML. http://designdrumm.com/nataliaVikhtinskaya/ Best, Karl On Feb 24, 2011, at 5:13 AM, Karl DeSaulniers wrote: Try this natalia... import flash.geom.Rectangle; Stage[fullScreenSourceRect] = new Rectangle( 0, 0, Stage.width/2, Stage.height/2); Stage.scaleMode = maintainAspectRatio; function goFullScreen() { Stage[displayState] = fullScreen; } function exitFullScreen() { Stage[displayState] = normal; } function menuHandler(obj, menuObj) { if (Stage[displayState] == normal) { menuObj.customItems[0].enabled = true; menuObj.customItems[1].enabled = false; } else { menuObj.customItems[0].enabled = false; menuObj.customItems[1].enabled = true; } } this.onFullScreen = function(bFullScreen:Boolean):Void { if (bFullScreen){ Stage.showMenu = true; } } var fullscreenCM:ContextMenu = new ContextMenu(menuHandler); fullscreenCM.hideBuiltInItems(); var fs:ContextMenuItem = new ContextMenuItem(Go Full Screen, goFullScreen); fullscreenCM.customItems.push( fs ); var xfs:ContextMenuItem = new ContextMenuItem(Exit Full Screen, exitFullScreen); fullscreenCM.customItems.push( xfs ); Stage.addListener(Stage[displayState] == fullScreen, onFullScreen); _root.menu = fullscreenCM; Works for me.. :) Best, Karl On Feb 24, 2011, at 3:48 AM, natalia Vikhtinskaya wrote: Hi I am trying to use full screen mode. I tested this example for AS2 http://www.adobe.com/devnet/flashplayer/articles/full_screen_mode.html Here is a test html with goScaledFullScreen function http://www.mightybook.com/test/adobeAS2.html As you can see in full mode content disappears. The same if I use goFullScreen function. What is wrong in my adaptation? Code with custom context menu from this article import flash.geom.Rectangle; function goFullScreen() { Stage[displayState] = fullScreen; } function goScaledFullScreen(){ var screenRectangle:Rectangle = new Rectangle(); screenRectangle.x = 0; screenRectangle.y = 0; screenRectangle.width=Stage.width/2; screenRectangle.height=Stage.height/2; Stage[fullScreenSourceRect] = screenRectangle; Stage[displayState] = fullScreen; } function exitFullScreen() { Stage[displayState] = normal; } function menuHandler(obj, menuObj) { if (Stage[displayState] == normal) { menuObj.customItems[0].enabled = true; menuObj.customItems[1].enabled = false; } else { menuObj.customItems[0].enabled = false; menuObj.customItems[1].enabled = true; } } var fullscreenCM:ContextMenu = new ContextMenu(menuHandler); fullscreenCM.hideBuiltInItems(); var fs:ContextMenuItem = new ContextMenuItem(Go Full Screen,goScaledFullScreen); fullscreenCM.customItems.push( fs ); var xfs:ContextMenuItem = new ContextMenuItem(Exit Full Screen, exitFullScreen); fullscreenCM.customItems.push( xfs ); _root.menu = fullscreenCM; Thank you in advance. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Karl DeSaulniers Design Drumm http://designdrumm.com ___ Flashcoders mailing list
Re: [Flashcoders] FFMPEG replacement
That's insane! Are you running entirely on closed source servers then? On 18/02/2011 02:35, Patrick Matte wrote: For legal reasons, one of our client strictly forbids us to use any open source software... Unbelievable I know... So does anyone know of any other software that we could buy and install on the server side that can merge an image sequence and a sound file in a single video file like FFmpeg? Thanks for any suggestions... Patrick This e-mail is intended only for the named person or entity to which it is addressed and contains valuable business information that is privileged, confidential and/or otherwise protected from disclosure. Dissemination, distribution or copying of this e-mail or the information herein by anyone other than the intended recipient, or an employee or agent responsible for delivering the message to the intended recipient, is strictly prohibited. All contents are the copyright property of TBWA Worldwide, its agencies or a client of such agencies. If you are not the intended recipient, you are nevertheless bound to respect the worldwide legal rights of TBWA Worldwide, its agencies and its clients. We require that unintended recipients delete the e-mail and destroy all electronic copies in their system, retaining no copies in any media.If you have received this e-mail in error, please immediately notify us via e-mail to disclai...@tbwaworld.com. We appreciate your cooperation. We make no warranties as to the accuracy or completeness of this e-mail and accept no liability for its content or use. Any opinions expressed in this e-mail are those of the author and do not necessarily reflect the opinions of TBWA Worldwide or any of its agencies or affiliates. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
[Flashcoders] Problem with XML.childIndex()
Hi, I am having a problem with getting the childIndex value from an e4x result: Both these functions work - e.g. they return an XML node from a list, but the childIndex property always traces as -1 for the first function. Can anyone see what the problem is? TIA Glen public function getAssetDetails(prop:*):XML { if (!_assets) { return null; } var res:XMLList = _assets.(child(number) == String(prop)); if (0 != res.length()) { debug(this, getAssetDetails + res[0].childIndex()); return res[0]; } else { return null; } } override public function getAssetDetails(prop:*):XML { if (!_assets) { return null; } var res:XMLList = _assets.(attribute(icon) == String(prop)); if (0 != res.length()) { debug(this, getAssetDetails + res[0].childIndex()); return res[0]; } else { return null; } } ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Problem with XML.childIndex()
Hmm, they just return the number node from a matching asset in the list, but if I do this: var res : XMLList = _assets.child(number).(text() == prop); if (0 != res.length()) { trace(this, getAssetDetails + res[0].parent().childIndex()); return res[0].parent(); } I still have the same problem even using the parent??? On 17/02/2011 11:24, Jens Struwe wrote: Try: var res : XMLList = _assets.child(number).(text() == prop); var res:XMLList = _assets.*.(attribute(icon) == String(prop)); Jens Am 17.02.2011 11:08, schrieb Glen Pike: Hi, I am having a problem with getting the childIndex value from an e4x result: Both these functions work - e.g. they return an XML node from a list, but the childIndex property always traces as -1 for the first function. Can anyone see what the problem is? TIA Glen public function getAssetDetails(prop:*):XML { if (!_assets) { return null; } var res:XMLList = _assets.(child(number) == String(prop)); if (0 != res.length()) { debug(this, getAssetDetails + res[0].childIndex()); return res[0]; } else { return null; } } override public function getAssetDetails(prop:*):XML { if (!_assets) { return null; } var res:XMLList = _assets.(attribute(icon) == String(prop)); if (0 != res.length()) { debug(this, getAssetDetails + res[0].childIndex()); return res[0]; } else { return null; } } ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Problem with XML.childIndex()
Hi, The problem is not getting the assets - this works for both example functions. The problem is that when I try to trace the childIndex() of the asset that has been found, it always returns -1 for the asset obtained by matching the child rather than the attribute. So the following e4x works, but the childIndex value does not. var res:XMLList = _assets.(child(number) == String(prop)); if (0 != res.length()) { debug(this, getAssetDetails + res[0].childIndex()); return res[0]; } else { return null; } Here is a much shortened list of assets: entity id524/id number2001/number name![CDATA[Hello]]/name description![CDATA[Compose Audio]]/description type1/type events_count1/events_count length0.85/length outputs /outputs /entity entity id527/id number2004/number name![CDATA[Cry]]/name description![CDATA[Compose Audio]]/description type1/type events_count1/events_count length2.63/length outputs /outputs /entity entity id530/id number2007/number name![CDATA[Sob]]/name description![CDATA[Compose Audio]]/description type1/type events_count1/events_count length2.02/length outputs /outputs /entity On 17/02/2011 12:30, Jens Struwe wrote: May I refine your question? I have an XML tree. How can I select nodes depending on the value of subnodes or the value of subnode attributes. Hi, I am having a problem with getting the childIndex value from an e4x result: Both these functions work - e.g. they return an XML node from a list, but the childIndex property always traces as -1 for the first function. Can anyone see what the problem is? TIA Glen public function getAssetDetails(prop:*):XML { if (!_assets) { return null; } var res:XMLList = _assets.(child(number) == String(prop)); if (0 != res.length()) { debug(this, getAssetDetails + res[0].childIndex()); return res[0]; } else { return null; } } override public function getAssetDetails(prop:*):XML { if (!_assets) { return null; } var res:XMLList = _assets.(attribute(icon) == String(prop)); if (0 != res.length()) { debug(this, getAssetDetails + res[0].childIndex()); return res[0]; } else { return null; } } ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Problem with XML.childIndex()
Thank you - I have discovered the problem now - I was making a copy the XML for an asset when creating a list of items, which broke the indexing because the copy was not related to the original, e.g. for (var i:int = 0; i len;i++ ) { //Making a copy of the node means that getAssetDetails. var asset:XML = _assets[i].copy(); dp.addItem({label:asset.child(number) + : +asset.child(name), data:asset.name}); } Incidentally - the getAssetByNumber would not have been possible as I am programming to an API which compares objects of various types against the XML so I have to use getAssetDetails(prop:*) Thank you for your help :) Glen On 17/02/2011 13:13, Jens Struwe wrote: Thanks for the XML. Given this, the method works as expected: getAssetByNumber(2001); getAssetByNumber(2004); getAssetByNumber(2007); public function getAssetByNumber(theNumber : int):XML { if (!_assets) return null; var res : XMLList = _assets.*.(number == theNumber); if (0 != res.length()) { trace(this, getAssetDetails + XML(res[0]).childIndex()); return res[0]; } else { return null; } } - [object XMLTest] getAssetDetails 0 [object XMLTest] getAssetDetails 1 [object XMLTest] getAssetDetails 2 Am 17.02.2011 13:43, schrieb Glen Pike: Hi, The problem is not getting the assets - this works for both example functions. The problem is that when I try to trace the childIndex() of the asset that has been found, it always returns -1 for the asset obtained by matching the child rather than the attribute. So the following e4x works, but the childIndex value does not. var res:XMLList = _assets.(child(number) == String(prop)); if (0 != res.length()) { debug(this, getAssetDetails + res[0].childIndex()); return res[0]; } else { return null; } Here is a much shortened list of assets: entity id524/id number2001/number name![CDATA[Hello]]/name description![CDATA[Compose Audio]]/description type1/type events_count1/events_count length0.85/length outputs /outputs /entity entity id527/id number2004/number name![CDATA[Cry]]/name description![CDATA[Compose Audio]]/description type1/type events_count1/events_count length2.63/length outputs /outputs /entity entity id530/id number2007/number name![CDATA[Sob]]/name description![CDATA[Compose Audio]]/description type1/type events_count1/events_count length2.02/length outputs /outputs /entity On 17/02/2011 12:30, Jens Struwe wrote: May I refine your question? I have an XML tree. How can I select nodes depending on the value of subnodes or the value of subnode attributes. Hi, I am having a problem with getting the childIndex value from an e4x result: Both these functions work - e.g. they return an XML node from a list, but the childIndex property always traces as -1 for the first function. Can anyone see what the problem is? TIA Glen public function getAssetDetails(prop:*):XML { if (!_assets) { return null; } var res:XMLList = _assets.(child(number) == String(prop)); if (0 != res.length()) { debug(this, getAssetDetails + res[0].childIndex()); return res[0]; } else { return null; } } override public function getAssetDetails(prop:*):XML { if (!_assets) { return null; } var res:XMLList = _assets.(attribute(icon) == String(prop)); if (0 != res.length()) { debug(this, getAssetDetails + res[0].childIndex()); return res[0]; } else { return null; } } ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] how to get a byteArray of multiple sounds?
If you read the first code section of this blog post, it describes how to mix audio tracks using AS3 rather than pixel bender http://www.kaourantin.net/2008/10/audio-mixing-with-pixel-bender.html There are a lot of posts on the net about mixing audio with Flash http://www.google.co.uk/#sclient=psyhl=enq=flash+as3+mixing+audio+sample+dataaq=faqi=aql=oq=pbx=1fp=2e26c5153a2f6c6 On 17/02/2011 16:42, Pierrick Pluchon wrote: Ok , i didn't get a clue on how to do that :) Is it possible to have a pseudocode example please(or even better as3) :D ? Currently, i can easily get a byteArray for each sound, and i know when each note should play. But, how to add them together? 2011/2/17 Henrik Anderssonhe...@henke37.cjb.net You need to do your own mixing. First you need a way to get each note and then a way to know when each note should play. With that information you can start mixing, read the value of the first sample from each note currently playing and add them together, this is the mixed value. Now write that out and you have mixed one sample worth of audio. Repeat a few million times, but with the next samples and you are done. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] How to center my Flash in SWFOBJECT?
You might need: html, body { width:100%; height:100%;} #flashContent { height:100%;width:100%; text-align:center;} This won't do vertical align - you have to hack with javascript to do that. On 16/02/2011 12:40, Cor wrote: Can anyone tell me how to center my Flash content in html page with use of SWFOBJECT? I tried these: style type=text/css body { margin: 0px} div#flashContent { text-align: center; } object#flashContent { display:inline; } /style AND style type=text/css body { margin: 0px} div#flashContent { text-align:left; } object#flashContent { display:block; margin:0 auto; } /style But it doesn't center??? TIA Cor ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] OTish MP3 files for a piano scale
At this point, you might want to take advantage of one of the synth libraries of AS3 and use the mp3 files as your wave-table then add your filters envelope generators just like a normal sample-based synth. Probably overkill for an online distraction, but if you are going for quality / realism, then worth considering. Have a look at some of Andre Michelle's examples or see if you can find the Flashcodersbrighton experiments with as3 synths if you are interested. On 08/02/2011 15:35, tom rhodes wrote: multisampled pianos are available without having to record it all yourself! you'd still have to be loading a hell of a lot of wavs for it to sound half decent though, and probably code up something to handle the release of the keys properly... On 8 February 2011 16:27, Kerry Thompsonal...@cyberiantiger.biz wrote: Jason Merrill wrote: I was going to say something similar to what Kerry said - taking samples from the real world as separate MP3 files. It would seem to be pretty easy (albeit somewhat time consuming) to do that if you had a moderately OK mic (even one from Best Buy) and access to a piano or even a synthesizer. Then you'd have a library to work from. You could preload all possible notes - being they would be quite small files individually, wouldn't be too bad. Heck, you could sell the library online for some small bucks and make money. -- You could go further than recording all 88 notes. A soft note has a different timbre, attack, and decay from a loud note. For such a library to be really valuable, you would need to have different attacks at different volume levels. At least you don't have to worry about legato, since a piano can't play true legato like a violin or French Horn. A non-accented attack would do well for legato. Cordially, Kerry Thompson ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] OTish MP3 files for a piano scale
I think they are, but you could substitute your generated waveform for sound data from a file - the hack the system used relied on loading in a single mp3 then injecting sound data into it... Glen On 08/02/2011 16:18, tom rhodes wrote: interesting i thought those examples were generating a waveform? did that ever get packaged as a library? i remember it from a few years back but haven't looked since... On 8 February 2011 17:03, Glen Pikeg...@engineeredarts.co.uk wrote: At this point, you might want to take advantage of one of the synth libraries of AS3 and use the mp3 files as your wave-table then add your filters envelope generators just like a normal sample-based synth. Probably overkill for an online distraction, but if you are going for quality / realism, then worth considering. Have a look at some of Andre Michelle's examples or see if you can find the Flashcodersbrighton experiments with as3 synths if you are interested. On 08/02/2011 15:35, tom rhodes wrote: multisampled pianos are available without having to record it all yourself! you'd still have to be loading a hell of a lot of wavs for it to sound half decent though, and probably code up something to handle the release of the keys properly... On 8 February 2011 16:27, Kerry Thompsonal...@cyberiantiger.biz wrote: Jason Merrill wrote: I was going to say something similar to what Kerry said - taking samples from the real world as separate MP3 files. It would seem to be pretty easy (albeit somewhat time consuming) to do that if you had a moderately OK mic (even one from Best Buy) and access to a piano or even a synthesizer. Then you'd have a library to work from. You could preload all possible notes - being they would be quite small files individually, wouldn't be too bad. Heck, you could sell the library online for some small bucks and make money. -- You could go further than recording all 88 notes. A soft note has a different timbre, attack, and decay from a loud note. For such a library to be really valuable, you would need to have different attacks at different volume levels. At least you don't have to worry about legato, since a piano can't play true legato like a violin or French Horn. A non-accented attack would do well for legato. Cordially, Kerry Thompson ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] OTish MP3 files for a piano scale
I think he was referring to velocity rather than frequency - velocity would be difficult from a computer keyboard - you just get on or off. If you were to change the attack and decay based on frequency, essentially, you could cheat and pre-apply the ADSR to a waveform unless you needed to calculate this, but most samples of a piano would have this anyway. On 08/02/2011 17:14, Henrik Andersson wrote: Kerry Thompson skriver: ... and volume controls wouldn't be able to emulate different attacks. Yes they could. Who is to say that you can't make the control change based on the frequency? ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
[Flashcoders] Access AIR API's from a loaded SWF
Hi, I am working on an application where I currently load a number of SWF's into a Shell SWF. Recently I have been experimenting with using AIR 2 and Mass Storage Detection / File API's and would like to integrate this functionality into my application. I can load in the Shell SWF to an AIR app and this works okay. What I want to know, is it possible to use the AIR API's from within these loaded SWF's? I have been looking around and I am not sure I can see a way to get my external SWF's to compile without making them part of AIR applications too? I have been trying to do this with Pure AS3 projects in Flash Develop, but not having much luck. I have been googling around and reading the doc's, but no joy, does anyone have any tips / suggestions please? TIA Glen ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Access AIR API's from a loaded SWF
Hmm, Okay Mr Ted, I managed to get something working, but I have to create 2 AIR projects compile the inner one and copy the SWF into my bin folder to package up with my outer swf. It's a bit kludgy, but should work. Thanks for listening ;) Glen On 04/02/2011 16:33, Glen Pike wrote: Hi, I am working on an application where I currently load a number of SWF's into a Shell SWF. Recently I have been experimenting with using AIR 2 and Mass Storage Detection / File API's and would like to integrate this functionality into my application. I can load in the Shell SWF to an AIR app and this works okay. What I want to know, is it possible to use the AIR API's from within these loaded SWF's? I have been looking around and I am not sure I can see a way to get my external SWF's to compile without making them part of AIR applications too? I have been trying to do this with Pure AS3 projects in Flash Develop, but not having much luck. I have been googling around and reading the doc's, but no joy, does anyone have any tips / suggestions please? TIA Glen ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] interesting discovery: full screen flash + IM
That's because playing with Flash is more important than nattering to people ;) On 28/01/2011 13:54, Mendelsohn, Michael wrote: Hi list... I just thought I'd share this tidbit: A colleague was testing a Flash piece I did that goes FULL_SCREEN_INTERACTIVE. We were discussing it over IM (Microsoft Office Communicator). We noticed that when he was in full screen mode of the flash presentation, his status dot on IM went from green to do not disturb. Pretty interesting. - Michael M. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] test
No, Beno is still on holiday. On 11/01/2011 18:06, Merrill, Jason wrote: Could be a sign of list maturity. As the list audience grows in skill set, people have to ask fewer questions until we reach a point where the list has served its ultimate purpose and fulfilled its destiny and can move on to a higher plane, kind of like Yoda. Perhaps we're all gurus now. :) Or, could just be that the global economy still sucks and fewer of us have jobs. Jason Merrill Instructional Technology Architect Bank of America Global Learning ___ -Original Message- From: flashcoders-boun...@chattyfig.figleaf.com [mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Mendelsohn, Michael Sent: Tuesday, January 11, 2011 12:37 PM To: Flash Coders List Subject: RE: [Flashcoders] test Good one Kerry! That's because we don't have Flash is dead threads. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders -- This message w/attachments (message) is intended solely for the use of the intended recipient(s) and may contain information that is privileged, confidential or proprietary. If you are not an intended recipient, please notify the sender, and then please delete and destroy all copies and attachments, and be advised that any review or dissemination of, or the taking of any action in reliance on, the information contained in or attached to this message is prohibited. Unless specifically indicated, this message is not an offer to sell or a solicitation of any investment products or other financial product or service, an official confirmation of any transaction, or an official statement of Sender. Subject to applicable law, Sender may intercept, monitor, review and retain e-communications (EC) traveling through its networks/systems and may produce any such EC to regulators, law enforcement, in litigation and as required by law. The laws of the country of each sender/recipient may impact the handling of EC, and EC may be archived, supervised and produced in countries other than the country in which you are located. This message cannot be guaranteed to be secure or free of errors or viruses. References to Sender are references to any subsidiary of Bank of America Corporation. Securities and Insurance Products: * Are Not FDIC Insured * Are Not Bank Guaranteed * May Lose Value * Are Not a Bank Deposit * Are Not a Condition to Any Banking Service or Activity * Are Not Insured by Any Federal Government Agency. Attachments that are part of this EC may have additional important disclosures and disclaimers, which you should read. This message is subject to terms available at the following link: http://www.bankofamerica.com/emaildisclaimer. By messaging with Sender you consent to the foregoing. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] test
Hmm, the farce is strong in this one. Go far he will. On 12/01/2011 09:55, tom rhodes wrote: ahahah. ok i promised a client 3d dancing and talking monkeys integrated with facebook and twitter, i've got a facebook account but i'm a bit stuck with the rest On 12 January 2011 10:08, Glen Pikeg...@engineeredarts.co.uk wrote: No, Beno is still on holiday. On 11/01/2011 18:06, Merrill, Jason wrote: Could be a sign of list maturity. As the list audience grows in skill set, people have to ask fewer questions until we reach a point where the list has served its ultimate purpose and fulfilled its destiny and can move on to a higher plane, kind of like Yoda. Perhaps we're all gurus now. :) Or, could just be that the global economy still sucks and fewer of us have jobs. Jason Merrill Instructional Technology Architect Bank of America Global Learning ___ -Original Message- From: flashcoders-boun...@chattyfig.figleaf.com [mailto: flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Mendelsohn, Michael Sent: Tuesday, January 11, 2011 12:37 PM To: Flash Coders List Subject: RE: [Flashcoders] test Good one Kerry! That's because we don't have Flash is dead threads. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders -- This message w/attachments (message) is intended solely for the use of the intended recipient(s) and may contain information that is privileged, confidential or proprietary. If you are not an intended recipient, please notify the sender, and then please delete and destroy all copies and attachments, and be advised that any review or dissemination of, or the taking of any action in reliance on, the information contained in or attached to this message is prohibited. Unless specifically indicated, this message is not an offer to sell or a solicitation of any investment products or other financial product or service, an official confirmation of any transaction, or an official statement of Sender. Subject to applicable law, Sender may intercept, monitor, review and retain e-communications (EC) traveling through its networks/systems and may produce any such EC to regulators, law enforcement, in litigation and as required by law. The laws of the country of each sender/recipient may impact the handling of EC, and EC may be archived, supervised and produced in countries other than the country in which you are located. This message cannot be guaranteed to be secure or free of errors or viruses. References to Sender are references to any subsidiary of Bank of America Corporation. Securities and Insurance Products: * Are Not FDIC Insured * Are Not Bank Guaranteed * May Lose Value * Are Not a Bank Deposit * Are Not a Condition to Any Banking Service or Activity * Are Not Insured by Any Federal Government Agency. Attachments that are part of this EC may have additional important disclosures and disclaimers, which you should read. This message is subject to terms available at the following link: http://www.bankofamerica.com/emaildisclaimer. By messaging with Sender you consent to the foregoing. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
[Flashcoders] CS5 - Android debugging
Hi Guys, I installed the CS5 Android extension and I am trying to setup CS5 for debugging on the device, but on my Win machine, there is no Path to Adb field in the AIR Android Settings-Deployment dialog. Is this something I only get with a Mac? :0 Glen ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] test
Yes, but very quiet. On 11/01/2011 16:11, Mendelsohn, Michael wrote: Test: is the list alive? - MM ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Masked mc and total size
mc.mask.width? On 08/12/2010 17:26, natalia Vikhtinskaya wrote: Hi I have mc content_mc with 3 mc inside. Each of them has image with different size and masked with size 100px width. I expected to get total size for container_mc 3*100. But it is not true. When I trace(content_mc._width) it gives me 497. I need correct calculation for content mc. What I can do for that? I tried different type of masks – dynamic and static. Result always wrong. Thank you in advance. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] (From a PDF?) Getting bitmap data successfully
We used xpdf to generate jpgs / text of all our pdf files - that's opensource. Unfortunately this is command line too, so might not be any good to you, but it might be easier to generate thumbs for your PDF statically if you are re-using the same PDF's each time? http://www.foolabs.com/xpdf/about.html HTH Glen On 02/12/2010 16:59, lists...@fo.com wrote: I need to pull in a PDF and be able to show thumbnails of the larger graphics to the user. They check off a couple and those are then saved as PNG or JPG files. I am ok on saving graphics as PNG/JPG (given a bitmap) and doing the UI piece, but can’t seem to find anything on how to manipulate the PDF to pull the bitmaps. Is there anything available short of Acrobat-SDK, and that is AS3-based? There are a few utilities to do this*, but nothing code-based to glean from. *Existing tools: a-pdf.com verypdf.com sobolsoft.com somepdf.com dawningsoft.com I have contacted them; but they only offer command-line, no-source, alternatives. Thanks ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Getting bitmap data after successfully loading a swf file
Hi, If your loaded asset is a swf, you cannot just access the bitmapData property - it does not have one. However, you can draw the contents of a MovieClip / Sprite / DisplayObject into a BitmapData object, which you can then pass to the constructor of a Bitmap. http://help.adobe.com/en_US/as3/dev/WS5b3ccc516d4fbf351e63e3d118a9b90204-7d60.html You should also use the INIT event rather than the COMPLETE event for loaded objects because your SWF may have to initialise when it's loaded and you cannot be guaranteed that height, width and child clips are on stage. HTH Glen On 30/11/2010 19:18, ACE Flash wrote: hi there, I am pulling my hair off :), i was able to use any PNG or JPG file in my code, the SWF file just didn't work. Would you please take a look for me? Is there anything I am missing?? I am using flash 9 and all files are on the same domain. Thanks import flash.net.URLRequest;import flash.display.Loader; // I am able to use the PNG/JPG files var fileURL:String = http://www.google.com/images/logos/ps_logo2.png; // BUT!!! the SWF just doesn't work, it always return null! //var fileURL:String = x.swf var request:URLRequest = new URLRequest(fileURL); var loader:Loader = new Loader();loader.contentLoaderInfo.addEventListener(Event.COMPLETE, dataCompleteHandler);loader.load(request); function dataCompleteHandler(e:Event):void{ var image:Bitmap = new Bitmap(e.currentTarget.content.bitmapData); addChild(image);} ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Testing display object if its MovieClip or BitMap?
How about up-casting: var mc:MovieClip = loadedDisplayObject as MovieClip; if(mc) { mc.play(); } else { //could be a bitmap, but if it's not guaranteed, then you might need to do more tests. var bmp:Bitmap = loadedDisplayObject as Bitmap; } On 01/12/2010 22:39, Micky Hulse wrote: Hello, I am using this class: http://code.google.com/p/as3-multiple-file-preloader/ And I need to determine the display object type (i.e. is it MovieClip or Bitmap). trace(getQualifiedClassName(loadedDisplayObject)); Gives me this output (in a loop of 3 images and 1 swf loaded): flash.display::Bitmap flash.display::Bitmap flash.display::Bitmap flash.display::MovieClip Would that be the best way to test for MovieClip or Bitmap? Based on what is being loaded, I need to do different things (i.e. if MovieClip, I will need to control the timeline, if bitmap then I can skip all the timeiline commands). Thanks so much! Cheers, Micky ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Testing display object if its MovieClip or BitMap?
Sorry, I meant downcast On 01/12/2010 22:56, Glen Pike wrote: How about up-casting: var mc:MovieClip = loadedDisplayObject as MovieClip; if(mc) { mc.play(); } else { //could be a bitmap, but if it's not guaranteed, then you might need to do more tests. var bmp:Bitmap = loadedDisplayObject as Bitmap; } On 01/12/2010 22:39, Micky Hulse wrote: Hello, I am using this class: http://code.google.com/p/as3-multiple-file-preloader/ And I need to determine the display object type (i.e. is it MovieClip or Bitmap). trace(getQualifiedClassName(loadedDisplayObject)); Gives me this output (in a loop of 3 images and 1 swf loaded): flash.display::Bitmap flash.display::Bitmap flash.display::Bitmap flash.display::MovieClip Would that be the best way to test for MovieClip or Bitmap? Based on what is being loaded, I need to do different things (i.e. if MovieClip, I will need to control the timeline, if bitmap then I can skip all the timeiline commands). Thanks so much! Cheers, Micky ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Testing display object if its MovieClip or BitMap?
Hi, If your downcast does not work - the as bit - your variable will be null -it does not throw exceptions. http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/operators.html#as Glen On 01/12/2010 23:07, Micky Hulse wrote: Hi Glen! Many thanks for the quick reply and example code. I really appreciate it! :) On Wed, Dec 1, 2010 at 2:56 PM, Glen Pikepostmas...@glenpike.co.uk wrote: How about up-casting: var mc:MovieClip = loadedDisplayObject as MovieClip; if(mc) { mc.play(); } else { //could be a bitmap, but if it's not guaranteed, then you might need to do more tests. var bmp:Bitmap = loadedDisplayObject as Bitmap; } Ahhh, very interesting! That's a great idea! Thanks for tip. I wonder if I will have to use try/catch to avoid any typecasting errors? Testing now... Works perfectly! var mc:MovieClip = o[i] as MovieClip; if (mc) { trace(movieclip); } else { trace(other); } Pretty cool! Thaks for tip. :) Have a great day! Much appreciated. Cheers, Micky ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Finda and Replace
Hi, For really simple replacements like single characters and strings, you are probably better off using s.replace(?, ); For RegExp grab a copy of Grant Skinners RegExr tool - it's invaluable: http://gskinner.com/RegExr/desktop/ HTH Glen On 15/11/2010 17:26, Lehr, Theodore wrote: Say you have the following string: var s:String = This is a test. Is this a test? Yes.; I am trying: var findAndReplace:RegExp = new RegExp(Is this a test?, gi); s=s.replace(findAndReplace,xxx); I would expect to get back: This is a test. xxx Yes. but there seem to be an issue with the ? - how would I handle a ? in this case? Thanks! Ted ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Finda and Replace
erm s.split(?).join(); is that any use? Glen On 15/11/2010 19:17, Lehr, Theodore wrote: OK - so what if I have multiple ? - s.replace(?, ); seems to just get the first one From: flashcoders-boun...@chattyfig.figleaf.com [flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Glen Pike [postmas...@glenpike.co.uk] Sent: Monday, November 15, 2010 1:34 PM To: Flash Coders List Subject: Re: [Flashcoders] Finda and Replace Hi, For really simple replacements like single characters and strings, you are probably better off using s.replace(?, ); For RegExp grab a copy of Grant Skinners RegExr tool - it's invaluable: http://gskinner.com/RegExr/desktop/ HTH Glen On 15/11/2010 17:26, Lehr, Theodore wrote: Say you have the following string: var s:String = This is a test. Is this a test? Yes.; I am trying: var findAndReplace:RegExp = new RegExp(Is this a test?, gi); s=s.replace(findAndReplace,xxx); I would expect to get back: This is a test. xxx Yes. but there seem to be an issue with the ? - how would I handle a ? in this case? Thanks! Ted ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] How to detect for modifier (alt/ctrl) keys
Hi, I would suggest using a keyboard manager class that tracks when various keys are pressed and sets a flag - this would effectively allow you to Poll such keys when you are checking others. There is a good example from Richard Lord here: http://www.richardlord.net/blog/polling-the-keyboard-in-actionscript-3 HTH Glen On 15/11/2010 22:43, Benny wrote: In an application I am building I need to detect whether the (right) alt-key was pressed in combination with another (letter) and make sure that the control key isn't being pressed at the same time. But it looks like the Keyboard events for both MOUSE_DOWN and MOUSE_UP always return true for ctrlKey (when it is not actual pressed!) while the Alt key is pressed. Simplified test code: import flash.events.KeyboardEvent; stage.addEventListener(KeyboardEvent.KEY_DOWN, onKeyDownHandler); stage.addEventListener(KeyboardEvent.KEY_UP, onKeyUpHandler); function onKeyDownHandler(e:KeyboardEvent):void { trace(onKeyDown: e.ctrlKey= + e.ctrlKey + , e.altKey= + e.altKey); } function onKeyUpHandler(e:KeyboardEvent):void { trace(onKeyUp: e.ctrlKey= + e.ctrlKey + , e.altKey= + e.altKey); } When I test the code (tested on 2 PC's with Flash 10 or 10.1 Debug player in Flash pro CS5 or via same version debug players in MSIE/FF browsers) and press only the right alt key or a key combi e.g. right-alt-5 the traces report always true for the ctrlKey, so even when it isn't pressed!? I checked the Adobe bug base, tried Google, but didn't find anything related so far. What am I missing? Thanks. - Benny ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Sorry I know this is [OT] but i just swiched from CS3 to CS5 and have a UI question
Hi, I asked this question a while ago and I think the answer is no... http://www.mail-archive.com/flashcoders@chattyfig.figleaf.com/msg54882.html You might want to put a request into Adobe to get them to use floating layouts so the properties panel works horizontally vertically. Personally, I think it sucks vertically too, but gladly I am doing more coding (in Flash Develop) then stuff in the ide. Glen On 15/11/2010 23:12, Roger Persson wrote: Hi, Again, sorry for the OT question. I've tried googling every combination of words i could think of without any luck. Is it possible to get the properties panel horizontal (like in CS3) in Flash Professional CS5? The vertical jumping up and down depending on what I select makes jack a dull boy, productivity is down by 20%. I guess I'll learn sooner or later but I will always remember the good times we had, CS3 and I :) Thanks in advance /roger ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] How to detect for modifier (alt/ctrl) keys
Yes, but if you don't use keyEvent.ctrlKey in your event handler, but check for CTRL and set a flag: e.g. public static const CTRL_KEYCODE:int = 17; private var _ctrlKeyDown:Boolean = false; //etc function onKeyDownHandler(e:KeyboardEvent):void { switch(e.keyCode) { case CTRL_KEYCODE: _ctrlKeyDown = true; return; break; //your choice if you put break after return //case ALT_KEYCODE: // _altKeyDown = true; // return; // break; default: break; } trace(onKeyDown: ctrlKeyDown= + _ctrlKeyDown); } function onKeyUpHandler(e:KeyboardEvent):void { switch(e.keyCode) { case CTRL_KEYCODE: _ctrlKeyDown = false; return; break; //your choice if you put break after return //case ALT_KEYCODE: // _altKeyDown = false; / return; // break; default: break; } trace(onKeyUp: e.ctrlKey= + e.ctrlKey + , e.altKey= + e.altKey); } On 15/11/2010 23:34, Benny wrote: Thanks for the tip Glen. Unfortunately that class also shows the problem of Keyboard.CONTROL (keycode 17) being reported as being down (while it actual isn't) when the right alt key is being pressed. - Benny ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] How to view and edit alternate content
Can you temporarily disable JavaScript in your browser so that swfobject does not run? On 12/11/2010 10:11, Marco Terrinoni wrote: Hi there I have created a flash site using Gaia Framework which scaffolds xhtml pages for browsers that don't support flash. I am in the middle of creating the alternate content but cannot find a way to view and edit these pages because my flash browser is automatically detected and swfObject is overwriting alternate content with flash. Is there a way I can use actionscript 3.0 to create a button which will display this content for the user? Many thanks in advance! Marco Terrinoni - Director MULARAM PRODUCTIONS web design // animation // illustration uk: +44 7876 652 643 e: ma...@mularam.com w: www.mularam.com ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Actionscript 4?
Actionscript 4 - is a very high level language, you just think it and it appears on screen ;) On 09/11/2010 12:15, Merrill, Jason wrote: Did anyone who attended Max this year hear anything about the status of Actionscript 4? I heard a lot about new tools and HTML 5 support and junk, but I meant to ask the Adobe guys about Actionscript 4 and forgot. And I had ample opportunity too. Anyone heard or know anything about Actionscript 4? I know I can look at the latest ECMA specs to get an idea of what may be coming, but I'm curious about what Adobe's doing and when. Thanks. Jason Merrill Instructional Technology Architect Bank of America Global Learning -- This message w/attachments (message) is intended solely for the use of the intended recipient(s) and may contain information that is privileged, confidential or proprietary. If you are not an intended recipient, please notify the sender, and then please delete and destroy all copies and attachments, and be advised that any review or dissemination of, or the taking of any action in reliance on, the information contained in or attached to this message is prohibited. Unless specifically indicated, this message is not an offer to sell or a solicitation of any investment products or other financial product or service, an official confirmation of any transaction, or an official statement of Sender. Subject to applicable law, Sender may intercept, monitor, review and retain e-communications (EC) traveling through its networks/systems and may produce any such EC to regulators, law enforcement, in litigation and as required by law. The laws of the country of each sender/recipient may impact the handling of EC, and EC may be archived, supervised and produced in countries other than the country in which you are located. This message cannot be guaranteed to be secure or free of errors or viruses. References to Sender are references to any subsidiary of Bank of America Corporation. Securities and Insurance Products: * Are Not FDIC Insured * Are Not Bank Guaranteed * May Lose Value * Are Not a Bank Deposit * Are Not a Condition to Any Banking Service or Activity * Are Not Insured by Any Federal Government Agency. Attachments that are part of this EC may have additional important disclosures and disclaimers, which you should read. This message is subject to terms available at the following link: http://www.bankofamerica.com/emaildisclaimer. By messaging with Sender you consent to the foregoing. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] OT just a test
Okay here. On 02/11/2010 14:23, John R. Sweeney Jr wrote: Haven't seen an email since 10/27. Just making sure things are working. John R. Sweeney Jr. Interactive Multimedia Developer OnDemand Interactive Inc 945 Washington Blvd. Hoffman Estates, IL 60169 Office/Fax: 847.310.5959 Cellular: 847.651.4469 www.ondemandinteractive.com ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] OT: Resizing AS window
On 05/10/2010 13:50, Lehr, Theodore wrote: My AS window is too tall for my monitor (not sure how that happened) and I can figure out how to resize it? Anyone know? ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Maybe close Flash IDE and edit the workspace layout file - for CS5 / Win it's in here - whichever workspace you are using, look in the XML file and see if you can change the panel height, etc. C:\Documents and Settings\##USERNAME##\Local Settings\Application Data\Adobe\Flash CS5\en_US\Configuration\Workspace ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] bounce object off tilted wall
Hi, You should be able to work out your angle of reflection in a similar way as you do for horizontal collision. 2 billiard balls - collision detection is easy - if the distance between the centre's is less than 2 x the radius you have a collision. I think there is some optimisation you can do for this - check out some tutorials / books. Keith Peter's Making Things Move book is really good. Jobe Makar's Flash MX Game Programming Demystified explained the basic concepts nicely too. For the angle of reflection - it's to do with the angle between the wall and the ball. If you assume the wall (for one of your billiard balls) is at right angles to the direction of the billiard ball, you have a starting point - again, there is some stuff you can do with trig in here. There are lots of tutorials online, so I would Google as3 physics collisions or similar. For other optimisations - it's possibly not worth updating stuff that's not on stage until you put it back - is that possible? Glen On 28/09/2010 18:40, Kevin Newman wrote: Hi, I'm looking for information to help me learn how to bounce an object off another rotated object (or irregularly shaped object). I've already got basic collision detection working, and can bounce off straight horizontal and vertical shapes easily enough (blocks). I'm looking for info on doing that to an arbitrarily rotated block, or even a round shape, in a realistic way. I'd considered using a physics engine, but that seems like overkill in my case - I really just need the bounce logic. Any ideas or tutorials suggestions are appreciated. :-) A bonus would be information that helps me do that to data that isn't on the display list or DisplayObject derived. Thanks, Kevin N. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Inheritance and abstract classes
Ooops, my bad - I have the picture now :) On 23/09/2010 20:51, Henrik Andersson wrote: Glen Pike skriver: has a (interfaces) than is a (subclass), That's wrong. HAS-A is not used for interfaces, it is used for reference properties and other forms of containment. Both interfaces and classes use the IS-A relation. You don't say Picture HAS-A IDrawable, you say Picture IS-A IDrawable. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Left shifting input text as user types is unreliable
Is this happening because you are using the CHANGE event - is that firing when you change modify the character also? Have you tried using the TextEvent.TEXT_INPUT event - this might work, but I am not sure. The only other suggestion may be out of place, but concerns usability and might be redundant: Making a text field large enough for the input data may be a way around this too - I know email addresses can be ridiculously long, but I think I would be happier with one that is long enough rather than having one the right width just to please a graphic designer... On 24/09/2010 15:36, Paul Andrews wrote: On 22/09/2010 20:25, Paul Andrews wrote: On 22/09/2010 19:18, Cédric Muller wrote: And, by any chance, are any fonts not embedded ? (another halfy dumb question) No, they are embedded. It's not that the text is not accepted it's just that typing more text doesn't cause the text to move left when the field is filled. It's not a case of typing characters that aren't embedded. It really is odd. OK, I spotted what is making a difference. The field in question is being used to enter an email address. Some testers had reported that they were unable to enter a '@' symbol because when the tried to they got an '' (double quote). After a lot of discussion with the project manager where i explained this was certainly down to incorrectly configured keyboard/language settings (most likely UK English/US English), I needed a solution, so for that field I attached a CHANGE listener and substituted any typed character with @ . This works nicely, but has clearly introduced another problem on some machines. Scratched head for the moment. Paul 22/09/2010 19:28, Paul Andrews wrote : On 22/09/2010 17:26, Cédric Muller wrote: Out in the wild (read: dumb question): Do you have some player version detection in your tests ? (it could be that the third computer has not FP9 installed?) Fair question. Machine in question is running FP10! (as are the other two) hth, Cedric I've been working on an AS3 project with some input text - using CS5 targetting FP 9. It works nicely but I have a few text input fields, but one of them has a problem on some computers. I have tried it on three computers and only one shows the problem and the other input fields do not show the problem. Even cutting and pasting working or new textInput fields don't cure it. The problem is that when the user types too much text, the text should shift left so that what the user has just typed is always in view. In two out of three machines I have access to it does. On another it does not and the user can't see what they are typing. There's no obvious correlation between machines that have the correct behaviour for the field and those that do not. One tester had the bad behaviour on all browsers except IE8. Works fine on every browser I have installed. Any ideas? Paul ___ ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Inheritance and abstract classes
Hi, If you type as a superclass you are generally programming to an interface, so you can just as easily type to an interface. Using interfaces is generally more flexible - it's easier to work with has a (interfaces) than is a (subclass), but sometimes you need a default implementation for your interface, which is why there are a number of abstract classes in AS3 that implement the interface - you need some generic behaviour, it can go in a super-class, but concrete classes are often difficult to deal with when you want to swap between interfaces. E.g. unlike C++ with multiple inheritance, you can only extend a single class, but you can implement as many interfaces as you want. People will generally tell you to work with interfaces, but there are times - and you will find out somewhere along the line, where only a superclass will do. For a simple example of this, look at what we do with Sprites and MovieClips when we extend them. Hope this helps. If you have not looked at Head First Design Patterns, or a similar book about patterns, then they will give you a more in-depth grounding than I can. Glen On 23/09/2010 17:42, Doug Lambert wrote: Inheritance and abstract classes The examples I've seen are set up this way: Super class (abstract class) contains all methods Subclass overrides methods in super class Class instances are typed as super class and instantiated as subclass. I'm wondering why the examples show instances typed as a super class and instantiated as a subclass. This makes it necessary for all methods to exist in the super(abstract) class and overridden in the subclass. Is this on purpose so the abstract class acts as an interface? Wouldn't it be more flexible to type and instantiate as the subclass so methods can be added to the subclass that don't exist in the super(abstract) class? I like the idea of abstract classes. I'm just trying to figure out the best way to use them. Thanks. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Downloading a .swc library
Hi. I would think about using the [Embed] directive in pure AS3 code to create font swf files. You can have one or more fonts in a swf which does not matter and you can load them in a runtime dynamically. Here is an example of a Font file - you can setup a project in FlashDevelop that will compile this as the main class in a SWF file. For multiple Fonts, just duplicate the [Embed] line and the static variable for it (with a different name. Using an FLA - it does not embed the font ranges in the same way. I found there were only a certain range of characters in the IDE created SWF even when I changed the range to be embedded - only by de-compiling the SWF and looking at the glyphs embedded with Sothink's tool! If you need unicode ranges, this page is really useful: http://www.zenoplex.jp/tools/unicoderange_generator.html Also lots of links I have used to piece together my methods: http://blog.arwidthornstrom.com/2009/04/embedded-fonts-that-work-with-flash-ide-and-flex-sdk/ http://troyworks.com/blog/2008/09/12/flash-runtime-font-sharing-embedding-with-only-partial-character-sets-how-to/ http://www.betriebsraum.de/blog/2007/06/22/runtime-font-loading-with-as3-flash-cs3-not-flex/ http://developer.yahoo.com/flash/articles/runtime-fonts-as3.html http://www.ultrashock.com/forums/actionscript/font-embedding-using-flash-as3-and-flex-3-a-109509.html http://www.aaronwest.net/blog/index.cfm/2009/3/16/Lee-Brimelow-on-Creating-Runtime-Loaded-Fonts-in-Flash-CS4 http://mx.coldstorageonline.com/index.php?bid=48 The font is shown below - this is added to my config file - my application automatically loads any .swf files at startup (it is local, not net as a 7MB font with Traditional Chinese will strain your connection). If I change languages, my XML file may specify a font to find - IMPORTANT - the fontName in the XML matches the fontName in the Embed statement! My Application Screens all use a public static variable called _defaultFont, which can be changed at runtime by the following function and all my components can access the defaultFont variable should they wish to use it (a snippet of XML is shown at the bottom). Hope this helps - you can follow the links and work it out yourself if you want, or peek below: Glen protected function _findLanguageFont():void { var langXML:XML = languages.language.(attribute(lang) == languageCode)[0]; debug(this, will check for languageCode + languageCode + in + languages.language.toXMLString()); _defaultFont = null; if (langXML) { if(0 != langXML.attribute(fontName).length()) { debug(this, Language has font + langx...@fontname); var fonts:Array = Font.enumerateFonts(false); for(var i:int = 0;i fonts.length;i++) { var fnt:Font = fonts[i]; if (fnt.fontName == langx...@fontname) { _defaultFont = fnt; debug(this, Language set _defaultFont to + defaultFont.fontName); break; } } } } } package { import flash.display.Sprite import flash.text.Font; /** * Times font embedding class example. * Whatever you set the fontName property to is what you use as the fontName property in the config file for the app. * * This is different to embedding fonts with Flash because you can: * * 1. Set the unicodeRange - specify certain characters / ranges to embed, reducing file size. * 2. Choose your own fontName to avoid font clashes at runtime. * 3. Register the font in the file - the contstructor is called as the swf is loaded because this class is the * document class, so all you need to do is look for your font by fontName in your app. * * NB - Adobe's UnicodeTable.xml file was used to get the ranges for unicode, which omit the ? and a few other chars, so * this was doctored to include those (basically U+0300-U+030A,U+0041-U+005A was combined into U+0030-U+005A. * * @author Glen */ public class _Times extends Sprite { //Basic Latin characters + some punctuation - don't use the Adobe UnicodeTable for Basic Latin - it misses ? = 0x030F [Embed(source = C:/WINDOWS/Fonts/TIMES.TTF, fontName = _Times, fontFamily = Times, mimeType = application/x-font-truetype, unicodeRange = 'U+0020-U+002F,U+0030-U+005A,U+005B-U+0060,U+0061-U+007A,U+007B-U+007E')] public static var _font:Class; public function _Times():void { trace(Font Loaded:: _Times); Font.registerFont(_font); } } } Sample XML config file for the application - the asset called ?xml version=1.0 encoding=utf-8 ? data assets asset swfFile=icons.swf/ asset niceName=Font_Times
Re: [Flashcoders] Flash On The Beach 2010
I am not going this year, but have been to FOTB a couple of times and think it's amazing. My approach to choosing - as a coder - is to find stuff outside my normal sphere of interest, so I tend to take in lots of creative stuff and maybe catch up with some new tech things I might need in the near future. My rationale is that I can look up the code online, but the inspiration is harder to find ;) I have not seen Lee Brimelow, but have seen 2 of Mario's sessions - the first one blew me away and the second one was pretty good, but not as amazing as the first. In the end it's down to personal preference - go with your heart maybe more than your head? Glen On 20/09/2010 13:42, David Hunter wrote: Cool. I've never been before to anything like this. What sessions interest you? I'm really torn on what to attend at some points. Such as Mario Klingemann or Lee Brimelow on day one. From: c...@chello.nl To: flashcoders@chattyfig.figleaf.com Subject: RE: [Flashcoders] Flash On The Beach 2010 Date: Mon, 20 Sep 2010 13:13:06 +0200 Yes, I am. Groeten, Cor van Dooren www.codobyte.com -- There are only 10 types of people in the world: Those who understand binary and those who don't. -Original Message- From: flashcoders-boun...@chattyfig.figleaf.com [mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of David Hunter Sent: maandag 20 september 2010 12:58 To: flashcoders@chattyfig.figleaf.com Subject: [Flashcoders] Flash On The Beach 2010 Anyone going to Flash On The Beach next week in Brighton? ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Geen virus gevonden in het binnenkomende-bericht. Gecontroleerd door AVG - www.avg.com Versie: 9.0.851 / Virusdatabase: 271.1.1/3142 - datum van uitgifte: 09/17/10 20:34:00 ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Streaming Video w/o Flash Media Server: Possible?
http://www.google.com/#hl=enq=rtmp+server Red5 is an open-source one that might be worth looking at. On 20/09/2010 17:04, Steven Loe wrote: Is it possible to get video to stream over a rtmp connection that is not on a flash media server? I'm working with a company that provides streaming video content. Their engineers want to provide a video stream over rtmp but not use Flash Media Server, wowza etc. Is this possible? Has anyone done this? Thanks very much, Steven ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Embedding Fonts, it should be easy...., right!
Hi, I have had lots of problems with this in the past - be careful you are not embedding the font in the IDE for any of your text fields, I think it clashes. Where is MyriadProFont coming from in your App? Glen On 15/09/2010 08:46, Jiri wrote: He Keith, thanks for pointing that out to me. I tried and it still wont show any text. When I enumerate the fonts, and using the code provided by Keith I get this output embeddedFontsArray (@367abf39) [0]flash.text.Font (@369a56c1) fontNameMyriadProFont fontStyleregular fontTypeembedded [1]flash.text.Font (@369a5701) fontNameMyriadProBoldFont fontStylebold fontTypeembedded [2]flash.text.Font (@369a5761) fontNameMyriadProFont fontStylebold fontTypeembedded [3]flash.text.Font (@369a57a1) fontNameMyriadProRegularFont fontStyleregular fontTypeembedded length4 So although regsitering two fonts to the Font class, it shows 4 Font instances in the embeddedFonts?? Anybody has another take? Jiri On 14-09-10 22:39, Keith Reinfeld wrote: The fontNames for each embedded font need to be distinct from one another. Use Font.registerFont(Class); to make the embedded fonts available to loaded swfs. Use the fontName when assigning format.font; code [Embed( source='../../../../../fonts/myriad pro/MyriadPro-Bold.otf', fontName='MyriadProBoldFont', unicodeRange='U+0010-U+00FC', fontWeight = 'bold', fontFamily=Myriad Pro Bold, mimeType='application/x-font-truetype', embedAsCFF=false )] public static var MyriadProBoldFont:Class; // Make the font available to loaded swfs Font.registerFont(MyriadProBoldFont); [Embed( source='../../../../../fonts/myriad pro/MyriadPro-Regular.otf', fontName='MyriadProRegularFont', unicodeRange='U+0010-U+00FC', fontWeight = 'normal', fontFamily=Myriad Pro Regular, mimeType='application/x-font-truetype', embedAsCFF=false )] public static var MyriadProRegularFont:Class; // Make the font available to loaded swfs Font.registerFont(MyriadProRegularFont); /code Then: code var tField:TextField = _sprite.getChildByName(field) as TextField; addFormatting( treatmentTimeInfo , STD_LABEL_FONT_SIZE , WHITE); function addFormatting(tField:TextField):void{ var format:TextFormat = new TextFormat() format.font = MyriadProBoldFont; format.bold = true; tField.defaultTextFormat = format; tField.embedFonts = true; tField.setTextFormat( format ); tField.text = some_text } /code HTH Regards, Keith Reinfeld Home Page: http://keithreinfeld.home.comcast.net ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Zooming
On 13/09/2010 17:26, Henrik Andersson wrote: Lehr, Theodore skriver: Is there anyway to zoom into a mc and make sure a certain point on an object (just an image converted to a mc in this instance) is always in the center? Yes, with geometry. I recommend using a virtual camera, since it will take out a bunch of complicated (but far from advanced) math. Then you just need to center the camera on the spot using simple geometry. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders You should be able to find a nice virtual camera class on Bitey castle guys website. http://www.biteycastle.com/ ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Isometric Graphics Libraries
Hi, I just found one page a bit randomly - I know it's been a while, but maybe this will help. http://reinerstileset.4players.de/englisch.html Glen Tom Gooding wrote: Hi - is anyone aware of any pre-existing free or commercial isometric graphic libraries - for characters and props? ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Apple backing off. Why?
A large one :) Henrik Andersson wrote: Carl Welch skriver: I don't believe apple really gives a crap about developers. We can thank the FTC probe for their sudden change of policy. I still feel burnt by Mr. Jobs. I must have missed that, what probe? ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Apple changes their guidelines
I am guessing you App cannot be a shell for other code that is not downloaded from the AppStore - so your Flash iPhone app has to be totally self-contained, not like you can download the Flex Framework, etc. as external resources. You might be allowed to download graphics. Depending on the legalese, you could argue that reading websites that display source is downloading other code, but then I am guessing the agreement is better worded than that. e.g. you can't write your own App store, web-browser that runs js, etc. Glen On 09/09/2010 16:37, Kurt Dommermuth wrote: Hi Nathan, It's the agreement they are referring to where the legalese is that sucks to read. The article is fine. At this point I've read enough to feel confident that they will accept CS5 as a development tool, but what I'm curious about is the statement as long as code isn't downloaded. What does that mean? On Thu, Sep 9, 2010 at 10:53 AM, Nathan Mynarciknat...@mynarcik.comwrote: That link is not even a page long... Nathan Mynarcik nat...@mynarcik.com 254.749.2525 www.mynarcik.com On Thu, Sep 9, 2010 at 10:13 AM, Kurt Dommermuthk...@kurtdommermuth.com wrote: shit. I don't want to read their damn agreement. What the hell does this mean? On Thu, Sep 9, 2010 at 9:59 AM, allandt bik-elliott (thefieldcomic.com) alla...@gmail.com wrote: how does cs5 generate files for iphone? Does it create a swf and then use a cocoa framework to make it work or does it transcode the file directly into objective c? suddenly looks very interesting again a On 9 September 2010 14:46, Henrik Anderssonhe...@henke37.cjb.net wrote: http://www.apple.com/pr/library/2010/09/09statement.html ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Impossible?
On 03/09/2010 13:32, George Jones wrote: Hi; I think I've done my homework on this, but I can find no answers. Is it possible, using BitmapData, to make part--and only part--of a bitmap transparent? I'm presuming the answer is no. If that is the case, would you be so kind as to inform me so that I quit beating my head against the wall? I've asked the following question on about 5 forums and nobody has answered it, which I presume means it's over most people's heads...but certainly not this list. The net effect which I'm trying to create is programmically created fire that burns over a background image I select. What I now have is such fire over a black background (or any other color I choose), not over a jpg, for example. Hi, Not sure if it's any help, but I did something similar overlaying perlin clouds on a background - have a look at this post and see if it gives any clues. http://www.mail-archive.com/flashcoders@chattyfig.figleaf.com/msg44114.html I will try and look at my code when I get home later. Glen ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Detect player version that was published
On 24/08/2010 15:04, Todd Dominey wrote: Hi everyone - I have an AS3 component that publishes to either Flash Player 9 or Flash Player 10, and I'm trying to figure out a way to detect (within the component's ActionScript) whether the user published the SWF to 9 or 10 as their target. I realize the SWF is agnostic to the IDE and won't be able to see that directly, but is there a way for the SWF itself to know which player it was published for? Or a way for a Flash Player 9 SWF to try and access a Flash Player 10 property of some kind that won't return a compile error in the IDE? ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/system/Capabilities.html?allClasses=1#version ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Detect player version that was published
On 24/08/2010 15:36, Todd Dominey wrote: Right, not looking for the Flash Player plugin version a user has installed, but rather which runtime the SWF was published to (9 or 10). The root of my dilemma is that Flash's behavior when applying an alpha tween to a Sprite containing a text field using system typefaces isn't consistent when publishing to FP9 and FP10. When FP9 is the runtime, the text fields aren't tweened as part of the parent. When FP10 is the runtime, they are. Note that this is independent of the Flash Player plugin a user has installed. If you compile the SWF with FP9 as the runtime and load it in FP10 in the browser, the text fields aren't tweened. Compile to FP10 and load in FP10, they are. So...I'm trying to find something that an AS3 SWF could look for to know whether FP10 was selected as its runtime when published. If I knew that, I could code around it to control how that tween behavior is handled. Todd You could look into conditional compilation which is available in CS4+ I think: http://www.google.co.uk/#hl=enq=flash+ide+conditional+compilingaq=faqi=aql=oq=gs_rfai=fp=67d5d5d61e9a0270 http://www.google.co.uk/#hl=enq=flash+ide+conditional+compilingaq=faqi=aql=oq=gs_rfai=fp=67d5d5d61e9a0270 Glen ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Detect player version that was published
On 24/08/2010 15:04, Todd Dominey wrote: Hi everyone - I have an AS3 component that publishes to either Flash Player 9 or Flash Player 10, and I'm trying to figure out a way to detect (within the component's ActionScript) whether the user published the SWF to 9 or 10 as their target. I realize the SWF is agnostic to the IDE and won't be able to see that directly, but is there a way for the SWF itself to know which player it was published for? Or a way for a Flash Player 9 SWF to try and access a Flash Player 10 property of some kind that won't return a compile error in the IDE? ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Sorry, was a bit fast off the mark there, but you could leverage the FP version to decide whether to implement certain features regardless of whether the publisher published to Flash 9 or 10 - if the runtime is FP10, then I guess it's up-to-you to do stuff and also whether to expose certain API's to the publisher? ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] pdf encoders
OT: No experience scripting Open Office, but in my experience using it, the PDF exporter sucks. I normally install a PDF printer like CutePDF and use that to render my PDF's as the OO one can't seem to render my documents without nasty artifacts, jaggy fonts and just poor quality overall. On 23/08/2010 17:15, Alexander Farber wrote: Maybe script it with Openoffice? On 8/20/10, Glen Pikepostmas...@glenpike.co.uk wrote: ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] pdf encoders
Hi, Never tried it, but what about Zend_Pdf? Glen Anthony Pace wrote: I am sending this here just cause I think it's likely some developers here have had to work with PDF output. I know about alivePDF, which is great; yet, from what I have it's just not ideal for generating hundreds of PDF files in a row right now. For several PDFs here or there, alivePDF would be okay; however, I need at least dozens per minute, plus some security to limit users, so something on the server side would be best. Does it even have user security features? (e.g. encryption, or no printing at a dpi higher than specified) I know they can be bypassed, but I am not trying to make it impossible; just not practical. I know I already mentioned TCPDF (offshoot of fpdf); however, I need something really stable and really fast, which tcpdf, although feature rich, just isn't. I do have to say, that when I submit a bug report to Nicola Asuni, the guy that does most of the development, it gets fixed in a couple days; yet, there are just too many at this point, and the speed is so slow, that it just won't work for my needs. Any suggestions? Oh yes, I need it to be opensource, and the client is not interested in paying a license; therefore, PDFlib is out of the question. Maybe, something in Perl if it's really easy to use? But, I would prefer PHP; cause it would integrate better with everything else I have done. Thanks in advance, Anthony ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Question FP10 inactive event dispatched when not visible.
It is a special event. It is one of the few broadcast events. The manual is quite clear on this. It is not dispatched for focus issues. Think I have been looking at the old AS3 reference - it is clear in the docs for CS5, but Flash 9.0 ref is less verbose. Sorry, I understand the broadcast thing fully now :-! ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders