RE: [Flashcoders] Measuring width of some text
Just a txt.textWidth should do the trick -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Perdue, Blake Sent: donderdag 21 december 2006 22:28 To: flashcoders@chattyfig.figleaf.com Subject: [Flashcoders] Measuring width of some text I need to measure the width of some text. Here's the function I'm using: private function getTextWidth(txt,fontSize) { var fmt=new TextFormat(); fmt.font='Univers 67 CondensedBold'; fmt.size=fontSize; fmt.autoSize='left'; var metrics=fmt.getTextExtent(txt); return metrics.textFieldWidth; } This function is not predictable - for the same text, it returns different numbers on different OSes or flash player versions: - works fine in IE/FF for flash player 6 - doesn't work in Mac Safari for flash player 6 - works fine in IE/FF for flash player 8 using Service Pack 1 - doesn't work for IE/FF for flash player 8 using Service Pack 2 Is there another function I can use, or another way to go about measuring the width of some text? Blake Perdue | 212.522.1292 | AIM: blakepCNN ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
RE: [Flashcoders] flashing first frame
Did you add a stop(); on the last frame? (silly me) -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Jim Berkey Sent: dinsdag 12 december 2006 13:54 To: flashcoders@chattyfig.figleaf.com Subject: Re: [Flashcoders] flashing first frame A quick-n-dirty way to prevent the first frame from loading before the getURL command happens is to add a few empty frames after the getURL command, so that the swf has somewhere to go while the page takes its sweet time to open. jimbo *** REPLY SEPARATOR *** On 12/12/2006 at 12:33 PM nik crosina wrote: Hi, Small issue with getURL. We want to load a new html page at the end of a swf. So we use getURL on the last frame to do this. Problem is - on some occasions we get a flash of the first frame before the new page is loaded. How can we avoid this? Is this a little bug, or could this be in our code some where? Thanks guys. -- Nik C ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com B ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
RE: [Flashcoders] cuepoint/flvplayback question
You can put a listener on the scrubbing and the change event of the FLV playback and retrieve the last cue point with code: Ex. public function getLastCuePoint():Object { var pht:Number = my_FLVPlybk.playheadTime; for(var i:Number = cuePoint_array.length-1; i=0; i--){ if(pht = cuePoint_array[i].time) return cuePoint_array[i]; } return null; } -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Michael Appenzellar Sent: dinsdag 12 december 2006 16:11 To: flashcoders@chattyfig.figleaf.com Subject: [Flashcoders] cuepoint/flvplayback question Cuepoint question: I have cuepoints working but they act strange if you move the video seekbar aroundthe video shows the wrong cuepoint until the video hits the next cuepointany way to have the cuepoint follow the seekbar position? flvplayback question: I have 2 videosI can show the first one and then show the 2nd one fine, but I don't want to show any player controls, specifically the seekbar during the first video...I have tried just putting a graphic over the controls but that didn't work as expected. Michael Appenzellar Sr. Web Applications Developer Mirame Interactive http://www.mirameinteractive.com 301-663-5672 x6413 ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
[Flashcoders] Event bubbling in Flash like in Flex
Hi list, a question that's in my mind since for a little while now : how can you get event bubbling (cfr. Flex) in Flash? I have a menu with nested bullet-movieclips. A click on a bullet dispatches an event and my menu does not automatically forward that event to the listeners on the menu (sample : http://www.novio.be/downloads/showReel/showReel.zip) What I usually do is add an event handler at the level of the menu and then re-dispatch the event in that handler. This is a bit silly indeed, but how to do better? Thanks, Hans. ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
RE: [Flashcoders] Event bubbling in Flash like in Flex
Great, thanks! I've updated the sample with the static function initializeBubbling in a separate class all is well ! (sample : http://www.novio.be/downloads/showReel/showReel.zip) -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Johannes Nel Sent: donderdag 28 september 2006 16:59 To: Flashcoders mailing list Subject: Re: [Flashcoders] Event bubbling in Flash like in Flex personally i use a different mechanism, but this one by ralf bokelberg is good http://www.helpqlodhelp.com/blog/archives/000144.html On 9/28/06, Van De Velde Hans [EMAIL PROTECTED] wrote: Hi list, a question that's in my mind since for a little while now : how can you get event bubbling (cfr. Flex) in Flash? I have a menu with nested bullet-movieclips. A click on a bullet dispatches an event and my menu does not automatically forward that event to the listeners on the menu (sample : http://www.novio.be/downloads/showReel/showReel.zip) What I usually do is add an event handler at the level of the menu and then re-dispatch the event in that handler. This is a bit silly indeed, but how to do better? Thanks, Hans. ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com -- j:pn http://www.lennel.org ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
RE: [Flashcoders] Event bubbling in Flash like in Flex
It's because event bubbling is so great in Flex 2, that I started looking for a slick solution in ActionScript 2... By the way, are you a moderator for this list? -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Merrill, Jason Sent: donderdag 28 september 2006 18:33 To: Flashcoders mailing list Subject: RE: [Flashcoders] Event bubbling in Flash like in Flex I've updated the sample with the static function initializeBubbling in a separate class all is well ! Actionscript 3.0 will have event bubbling. Just FYI, not to burst your bubble. Jason Merrill Bank of America Learning Organization Effectiveness - Technology Solutions ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
RE: [Flashcoders] PRINTJOB HELL, PRINTJOB NIGHTMARE with several PAGES
You get your text from the textarea and you do this: Dynamically attach a movieclip from the library with a preformatted textfield that exactly fits an A4 page (set movieclip to _visible = false to do it invisibly) and fill the textfield up with the text from your textarea until the textfield is full. Then you add to movieclip to the printjob and push the reference to the movieclip to an array. Cut the remaining text and fill up the next one... Create a loop of this to write out all your text. After all text is written out, you execute the printjob and remove all the movieclips with removeMovieClip by looping the array of movieclips. NOTE : this is easier than it seems. Been there, done that, Regards, Hans. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of julian atienza Sent: maandag 24 april 2006 17:26 To: flashcoders@chattyfig.figleaf.com Subject: [Flashcoders] PRINTJOB HELL, PRINTJOB NIGHTMARE with several PAGES Hi. I wanted to Print contents of a long Scrollable textArea with Flash, but it's a kind of nightmare. I tried to made a class to manage Printing (with a PrintJob object inside) , and one empty swf that Creates Dynamically the TextArea and the Class to ManagePrinting, who feeds textArea with contents and scroll TextArea adding page by page contents. Problems: - The Scrolled area in Screen doesn't appeared to be the same than the printable area (each Page, i see repeated contents... why? i just don't know . IT's like the scroll doesn't scroll propertly). - Of course, sometimes, appeared incomplete text (with a cut at the middle) because i don't know any mechanism to avoid it at the moment. Somebody have any idea - the contents to print will be sometimes of 5 or 6 pages DIN A-4 thanks in advance ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
RE: [Flashcoders] MovieClipLoader - Crash in player 7, fine in pl ayer 8
I've had some trouble in the Flash 7 plugin when loading JPEGs that were Saved for the Web in Adobe Photoshop CS2 with the Optimized checkbox ticked on : the images simply weren't displayed with Flash plugin 7. (After re-saving without that option everything was ok.) Please note that the getBytes-method cannot be called if your externally loaded content comes from a different domain (Flash plugin sandbox security) and in that case you need to allow the accessing domain first with a System.allowDomain in the external content. Problem : with JPEGs loaded from an different you can't possibly put code on it and the getBytes simply doesn't work (!) Hans. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Martin Weiser Sent: dinsdag 4 april 2006 12:08 To: Flashcoders mailing list Subject: Re: [Flashcoders] MovieClipLoader - Crash in player 7, fine in player 8 i got similar problem, not possible to access MovieClip.getBytes...() methods, and also affecting progress value of movieClipLoader onProgress event . Maybe show more of your script Martin - Original Message - From: Roman Blöth [EMAIL PROTECTED] To: flashcoders@chattyfig.figleaf.com Sent: Tuesday, April 04, 2006 12:03 PM Subject: [Flashcoders] MovieClipLoader - Crash in player 7, fine in player 8 Hello folks, once again flash strikes my mind: I've made a small test movie to test my ClipLoader-class, which stores and handles loading queues using a MovieClipLoader. To make a stress test I queue 5 larger swf files for loading on button press (made another button for testing a stop-function). When trying it out using flash player 8 everithing works just fine, when I try the same using player 7 (as browser plugin, that is), then the whole thing crashes. When using my ClipLoader-class in an actual project, everithing works fine when only one file is added to the queue, but even the Flash IDE crashes completely when adding several files for loading. We've been through all of the code and debugging output for two days with two programmers now, but we can not find any clue on about what the problem is. Anyone out there ever has made experience like this? MovieClipLoader.loadClip crashing flash ide/flash plugin under certain conditions?! Any comment welcome, regards, roman. -- --- gosub communications gmbh | fredersdorfer str. 10 | 10243 berlin t [030] 29 36 39 1 - 43 | f [030] 29 66 88 84 | http://www.gosub.de --- ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
RE: [Flashcoders] MovieClipLoader - Crash in player 7, fine in pl ayer 8
To work around the sandbox security problem when loading JPEGs from a different domain, you can always make a proxy. For example, you can make a servlet that fetches a JPEG from a different domain. And in the loadClip you give the name of the servlet. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Van De Velde Hans Sent: dinsdag 4 april 2006 12:25 To: 'Flashcoders mailing list' Subject: RE: [Flashcoders] MovieClipLoader - Crash in player 7, fine in pl ayer 8 I've had some trouble in the Flash 7 plugin when loading JPEGs that were Saved for the Web in Adobe Photoshop CS2 with the Optimized checkbox ticked on : the images simply weren't displayed with Flash plugin 7. (After re-saving without that option everything was ok.) Please note that the getBytes-method cannot be called if your externally loaded content comes from a different domain (Flash plugin sandbox security) and in that case you need to allow the accessing domain first with a System.allowDomain in the external content. Problem : with JPEGs loaded from an different you can't possibly put code on it and the getBytes simply doesn't work (!) Hans. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Martin Weiser Sent: dinsdag 4 april 2006 12:08 To: Flashcoders mailing list Subject: Re: [Flashcoders] MovieClipLoader - Crash in player 7, fine in player 8 i got similar problem, not possible to access MovieClip.getBytes...() methods, and also affecting progress value of movieClipLoader onProgress event . Maybe show more of your script Martin - Original Message - From: Roman Blöth [EMAIL PROTECTED] To: flashcoders@chattyfig.figleaf.com Sent: Tuesday, April 04, 2006 12:03 PM Subject: [Flashcoders] MovieClipLoader - Crash in player 7, fine in player 8 Hello folks, once again flash strikes my mind: I've made a small test movie to test my ClipLoader-class, which stores and handles loading queues using a MovieClipLoader. To make a stress test I queue 5 larger swf files for loading on button press (made another button for testing a stop-function). When trying it out using flash player 8 everithing works just fine, when I try the same using player 7 (as browser plugin, that is), then the whole thing crashes. When using my ClipLoader-class in an actual project, everithing works fine when only one file is added to the queue, but even the Flash IDE crashes completely when adding several files for loading. We've been through all of the code and debugging output for two days with two programmers now, but we can not find any clue on about what the problem is. Anyone out there ever has made experience like this? MovieClipLoader.loadClip crashing flash ide/flash plugin under certain conditions?! Any comment welcome, regards, roman. -- --- gosub communications gmbh | fredersdorfer str. 10 | 10243 berlin t [030] 29 36 39 1 - 43 | f [030] 29 66 88 84 | http://www.gosub.de --- ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
RE: [Flashcoders] vardump an object in ActionScript?
Yes, there is, do this : import mx.data.binding.ObjectDumper; // usage of static function toString like this trace(ObjectDumper.toString(theObjectYouWantToDump)); Regards, Hans Van de Velde Senior Multimedia Developer e-mail: [EMAIL PROTECTED] direct: +32 2 745 58 51 Digital Age Design SA/NV Rue Colonel Bourg 105A B-1140 Brussels Tel. +32 2 706 05 40 Fax: +32 2 706 05 69 www.dad.be member of LB Iconlogo DAD -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of judah Sent: woensdag 15 februari 2006 5:16 To: Flashcoders mailing list Subject: Re: [Flashcoders] vardump an object in ActionScript? Hi Josh, You can check out this Enumerator class at this dudes website www.judahfrangipane.com. Heard he's a weirdo tho. Josh McDonald wrote: Hi, I'm wondering if there's any way to just dump out all there is to know about an object in ActionScript similar to PHP's vardump()? It's easily done with for(foo in bar) in JS, but that doesn't seem to work. Any pointers much appreciated :) Cheers, -Josh -- Always bear in mind that your own resolution to succeed is more important than any one thing. You can have anything you want - if you want it badly enough. You can be anything you want to be, do anything you set out to accomplish if you hold to that desire with singleness of purpose. - Abraham Lincoln ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
[Flashcoders] Firefox flash plugin problem?
Hi list, I have the strangest problem on a mini-site with a form: in Firefox, the Input textfields don't allow to type an @ or any other special character (!) and I do NOT have the problem in other browsers on PC or Mac... To see it : http://you-are-here.be/ http://you-are-here.be/ Send To A Friend Does anybody has a fix? Any ideas? FYI: Authored in Flash 8 with ActionScript 2, published to Flash 7. and looking at it with flash plugin 8 on Windows XP Pro with Firefox 1.5. Any help is welcome, coz I'm pulling my hair out, Hans. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
[Flashcoders] CORRECTION: Firefox flash plugin problem?
http://www.you-are-here.be/ http://www.you-are-here.be/ -Original Message- From: Van De Velde Hans Sent: donderdag 1 december 2005 18:34 To: 'flashcoders@chattyfig.figleaf.com' Subject: Firefox flash plugin problem? Hi list, I have the strangest problem on a mini-site with a form: in Firefox, the Input textfields don't allow to type an @ or any other special character (!) and I do NOT have the problem in other browsers on PC or Mac... To see it : http://you-are-here.be/ http://you-are-here.be/ Send To A Friend Does anybody has a fix? Any ideas? FYI: Authored in Flash 8 with ActionScript 2, published to Flash 7. and looking at it with flash plugin 8 on Windows XP Pro with Firefox 1.5. Any help is welcome, coz I'm pulling my hair out, Hans. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
[Flashcoders] zoomable Flash maps
Hi list, I need to make a geographical map viewer module in Flash with a dynamic number of hierarchical zoomable depth levels and with a number of hotspots per level (i.e. the stores of the client in a certain country, region or city). And I need to foresee an administration module that allows to drag and drop hotspots on the maps and store these hotspots to a database. Please send me links to examples of Flash maps, howtos or anything that can help Thanks, Hans. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders