Re: [Flashcoders] world clock - revisited
I can't send code if that's what you need (because it belongs to a client app) but on each clock (that are a kind of widget you can place into a dashboard) you can select the timezone you want to display in that clock. The time is simply calculated by performing some math on the Date object: var d:Date = new Date(); var ct:Number = Number(d)+(d.getTimezoneOffset() * 6); // this makes the time be at GMT+0 d.setTime(ct + (selectedTimeZoneOffset * 6)); //this makes the time be at the selected Timezone Where the "selectedTimeZoneOffset" variable holds the information of the "b" attribute. Then, I use that date to check if I'm in DST I re-do the calc, but using the "d" attribute. Regards, On Thu, 27 Mar 2008 11:05:44 -0300, Corban Baxter <[EMAIL PROTECTED]> wrote: thats great! Marcelo! sorry about the code confusion. :) do you have any examples of how you are implementing this? I think i have put my clocks together ok... i'd kinda like to see how you are using it. do you mind? On Wed, Mar 26, 2008 at 6:08 PM, Marcelo Volmaro <[EMAIL PROTECTED]> wrote: I did that code :) You have problems because the US changed the DST policy. Now it starts at SECOND SUNDAY of MARCH and ends at FIRST SUNDAY of NOVEMBER. So, USADLS now should be (2, 0, 3, 1, 0, 11); I don't know if the other policies changed too. This is the latest table: OLD_USADST: new Dst(LAST, SUNDAY, OCTOBER, FIRST, SUNDAY, APRIL), NEW_USADST: new Dst(FIRST, SUNDAY, NOVEMBER, SECOND, SUNDAY, MARCH), EU_DST: new Dst(LAST, SUNDAY, OCTOBER, LAST, SUNDAY, MARCH), CH_DST: new Dst(SECOND, SATURDAY, MARCH, SECOND, SATURDAY, OCTOBER), OCBR_DST: new Dst(SECOND, SUNDAY, FEBRUARY, FIRST, SUNDAY, NOVEMBER), NCBR_DST: new Dst(LAST, SUNDAY, FEBRUARY, FIRST, SUNDAY, NOVEMBER), MV_DST: new Dst(SECOND, SUNDAY, MARCH, FIRST, SUNDAY, OCTOBER), MA_DST: new Dst(LAST, SUNDAY, SEPTEMBER, LAST, SUNDAY, MARCH), JD_DST: new Dst(LAST, FRIDAY, SEPTEMBER, LAST, THURSDAY, MARCH), ME_DST: new Dst(LAST, SATURDAY, OCTOBER, LAST, SUNDAY, MARCH), EG_DST: new Dst(LAST, THURSDAY, SEPTEMBER, LAST, THURSDAY, APRIL), IS_DST: new Dst(THIRD, SUNDAY, SEPTEMBER, LAST, FRIDAY, MARCH), NA_DST: new Dst(FIRST, SUNDAY, SEPTEMBER, FIRST, SUNDAY, APRIL), AR_DST: new Dst(FIRST, SUNDAY, OCTOBER, FIRST, SUNDAY, APRIL), IR_DST: new Dst(FOURTH, TUESDAY, SEPTEMBER, FIRST, SUNDAY, MARCH), AU_DST: new Dst(LAST, SUNDAY, MARCH, LAST, SUNDAY, OCTOBER), TA_DST: new Dst(LAST, SUNDAY, MARCH, FIRST, SUNDAY, OCTOBER), NZ_DST: new Dst(THIRD, SUNDAY, MARCH, FIRST, SUNDAY, OCTOBER) There are a couple of countries that do not have a "programatic" DST but moves from year to year. Below is the XML I use to get the information I need: Attributes: n = name of the timezone b = time offset (in minutes) d = same, but in daylight f and l = used to identify first and last nodes. Any year before f will use the information in f for the calcs, any year after l will use the information in l. dst = the dst information from above. shh, ehh: Start hour and End hour where the change occurs (so, it is not always at 00:00). If a year does not has a DST information, it must has the information regarding the start and end date (sd = start day, sm = start month, ed = end day, em = end month). If no information is provided (nor DST nor Start/End dates), there are no DST for that specific year. Also, remember that countries/timezones that have DST may or may not apply the policy (example: Check GreenLand in the TimeZone control pannel in Windows, you have an option to adjust for DST or not). Hope this helps d="420"> d="360"> d="300"> d="300"> d="240"> emm="59" ess="59"/> b="0" d="-60"> b="-60" d="-120"> b="-60" d="-120"> d="-120&
Re: [Flashcoders] world clock - revisited
b="-120" d="-180"> On Wed, 26 Mar 2008 19:25:47 -0300, Corban Baxter <[EMAIL PROTECTED]> wrote: Hey all, because of the daylight savings time going on across the world I was having trouble with the world clocks I setup for a client. I tried to implement the code below but was un succesful to do it correctly apparently. Does anyone have any working examples of this. And if so do you mind sharing? Thanks ALL!! Code via: Keith Reinsfield (I think* sorry...) dstPolicies = { USADLS:new DstPolicy(1,0,4, -1,0,10), EUDLS:new DstPolicy(-1,0,3, -1,0,10), AU2003DLS:new DstPolicy(-1,0,10, -1,0,3), AUTDLS:new DstPolicy(1,1,10, -1,0,3), RUDLS:new DstPolicy(-1,0,3, -1,0,10), EGDLS:new DstPolicy(-1,5,4, -1,4,9), IRDLS:new DstPolicy(-1,6,3, -1,1,9), IQDLS:new DstPolicy(255, 1,4, 255, 1,10), ILDLS:new DstPolicy(-1,4,3, 1,4,10), JODLS:new DstPolicy(-1,3,3, -1,4,10), NADLS:new DstPolicy(1,0,9, 1,0,4), PKDLS:new DstPolicy(1,6,4, 1,6,10), SYDLS:new DstPolicy(255,30,3, 255,21,9), CLDLS:new DstPolicy(2,0,10, 2,0,3), CLEDLS:new DstPolicy(2,5,10, 2,6,3), NZDLS:new DstPolicy(1,0,10, 3,0,3), PYDLS:new DstPolicy(1,0,9, 1,0,4), FKDLS:new DstPolicy(1,0,9, -1,0,4) }; /*Where the first number is the position (1: first, -1:last, 255: straight date), the second and the third are the day/month. If the position is 255, the date is a straight day/month date, so for example for IRAQ the start date is April 1. The formulas for the calcs are:*/ /** * @param y:int Year * @param m:int Month (0 - 11) * @param n:int Day of the week (0 for a Sunday, 1 for a Monday, 2 for a Tuesday, etc) * @param w:int Occurence (1:first, 2:second, 3:third, 4:fourth, -1:last) * @return real day of the month where the DST starts/ends * * first friday = w:1, n:5 * third monday = w:3, n:1 * last monday = w:-1, n:1 */ function calcStartEnd(y:Number, m:Number, n:Number, w:Number):Number { if (w<0) { var nd:Number = (new Date(y, m, 0)).getDate(); var diff:Number = (getDayOfWeek(y, m+1, nd)-n)%7; if (diff<0) { diff += 7; } return nd-diff; } var nq:Number = 7*w-6+(n-getDayOfWeek(y, m+1, 1))%7; if (nq<1) { nq += 7; } return nq; } /** * @param y:int Year * @param m:int Month (1 - 12) * @param d:int Day (1 - 31) * @return 0 for a Sunday, 1 for a Monday, 2 for a Tuesday, etc. */ function getDayOfWeek(y:Number, m:Number, d:Number):Number { var a:Number = Number((14-m)/12); y -= a; m += 12*a-2; var r:Number = (d+y+Number(y/4)-Number(y/100)+Number(y/400)+int((31*m)/12))%7; if (r<0) { return 7+r; } else { return r; } } -- Marcelo Volmaro ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] getDefinitionByName and error #1009
The problem is, I'm using getDefinitionByName in other places, and it works fine. The specific class (EN_US) is included, but I can't instantiate it. Also, I was wrong on one of my statements: The trace of the static var (trace(klass.test)) worked fine. That what makes this a mystery for me.. The class is on the flash, accessing its static member works, but instantiating it does not. On Fri, 08 Feb 2008 13:18:27 -0300, Kenneth Kawamoto <[EMAIL PROTECTED]> wrote: If I do this I get all the traces: (Document class) package { import flash.display.Sprite; import flash.utils.describeType; import flash.utils.getDefinitionByName; import extremefx_comar.i18n.locales.EN_US; public class Test extends Sprite { public function Test():void { trace(EN_US.test); var n:String = "extremefx_comar.i18n.locales.EN_US"; var klass:Class = getDefinitionByName(n) as Class; trace(klass); try { klass = Class(getDefinitionByName(n)); trace(describeType(klass)); } catch (e:Error){ trace("catch error:"+e); } if (klass != null){ trace(klass.test); try { var ca:Object = new klass(); trace(describeType(ca)); } catch (e2:Error){ trace("catch error2:"+e2); } } } } } not sure if this helps though... Kenneth Kawamoto http://www.materiaprima.co.uk/ Marcelo Volmaro wrote: Hi!, I'm trying to do something pretty simple: dynamically instantiate a class based on it's name: var n:String = "extremefx_comar.i18n.locales.EN_US"; var klass:Class = null; try { klass = Class(getDefinitionByName(n)); trace(describeType(klass)); } catch (e:Error){ trace("catch error:"+e); } if (klass != null){ trace(klass.test); try { var ca:Object = new klass(); trace(describeType(ca)); } catch (e2:Error){ trace("catch error:"+e2); } } The first trace works fine, no errors (so the describetype returns the correct XML for that class). Now, when I try to instantiate that class (var ca:Object = new klass()) i get the following error: TypeError: Error #1009: Cannot access a property or method of a null object reference. Also, the klass has a public static var "test". The trace(klass.test) returns undefined. Ideas? Thanks in advance, ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders -- Marcelo Volmaro ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
[Flashcoders] getDefinitionByName and error #1009
Hi!, I'm trying to do something pretty simple: dynamically instantiate a class based on it's name: var n:String = "extremefx_comar.i18n.locales.EN_US"; var klass:Class = null; try { klass = Class(getDefinitionByName(n)); trace(describeType(klass)); } catch (e:Error){ trace("catch error:"+e); } if (klass != null){ trace(klass.test); try { var ca:Object = new klass(); trace(describeType(ca)); } catch (e2:Error){ trace("catch error:"+e2); } } The first trace works fine, no errors (so the describetype returns the correct XML for that class). Now, when I try to instantiate that class (var ca:Object = new klass()) i get the following error: TypeError: Error #1009: Cannot access a property or method of a null object reference. Also, the klass has a public static var "test". The trace(klass.test) returns undefined. Ideas? Thanks in advance, -- Marcelo Volmaro ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] coding a world clock
Now all I need is the data, by location, to pass in. Note to Jim Berkey: First, thank you for the link. Nice touch with the iconic location graphics. Second, I'm getting a 404 for the worldclock source file. Just FYI. Regards, -Keith http://keithreinfeld.home.comcast.net ___ 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 -- Marcelo Volmaro ___ 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] coding a world clock
wana","Bulgaria","Burundi","Cyprus","Egypt","Estonia","Finland","Greece","Israel","Jordan","Latvia","Lebanon","Lesotho","Libya","Lithuania","Malawi","Moldova","Moldovian Rep Pridnestrovye","Mozambique","Romania","Russian Federation zone one","Rwanda","South Africa","Sudan","Swaziland","Syria","Turkey","Ukraine","Zaire Haut Zaire","Zaire Kasai","Zaire Kivu","Zaire Shaba","Zambia","Zimbabwe"], [3.00, "Azerbaijan","Bahrain","Djibouti","Eritrea","Ethiopia","Iraq","Kenya","Kuwait","Madagascar","Mayotte","Qatar","Russian Federation zone two","Saudi Arabia","Somalia","Tanzania","Uganda","Yemen"], [3.50, "Iran"], [4.00, "Armenia","Georgia","Mauritius","Oman","Reunion","Russian Federation zone three","Seychelles","United Arab Emirates"], [4.50, "Afghanistan"], [5.00, "Kyrgyzstan","Maldives","Pakistan","Russian Federation zone four","Turkmenistan","Uzbekistan"], [5.50, "India","Sri Lanka"], [5.75, "Nepal"], [6.00, "Bangladesh","Bhutan","Kazakhstan","Russian Federation zone five","Tajikistan"], [6.50, "Myanmar"], [7.00, "Cambodia","Indonesia West","Laos","Russian Federation zone six","Thailand","Vietnam"], [8.00, "Australia Western","Brunei","China People's Rep","Hong Kong","Indonesia Central","Malaysia","Mongolia","Philippines","Russian Federation zone seven","Singapore","Taiwan"], [9.00, "YST: Yukon Standard","Indonesia East","Japan","Korea Dem Republic of","Korea Republic of","Palau","Russian Federation zone eight"], [9.50, "Australia Northern Territory","Australia South"], [10.00, "AHST: Alaska-Hawaii Standard","CAT: Central Alaska","HST: Hawaii Standard","Australia New South Wales","Australia Queensland","Australia Tasmania","Australia Victoria","Australian Capital Territory","Guam","Mariana Island","Northern Mariana Islands","Papua New Guinea","Russian Federation zone nine"], [10.50, "Australia Lord Howe Island"], [11.00, "Caroline Island","New Caledonia","New Hebrides","Ponape Island","Russian Federation zone ten","Solomon Islands","Vanuatu"], [11.50, "Norfolk Island"], [12.00, "IDLE: International Date Line East","Fiji","Kiribati","Kusaie","Kwajalein","Marshall Islands","Nauru Republic of","New Zealand","Pingelap","Russian Federation zone eleven","Tuvalu","Wake Island","Wallis and Futuna Islands"], [13.00, "Tonga"], [14.00, "Line Islands: Kiritibati"] ]; Regards, On Sun, 02 Sep 2007 19:26:15 -0300, Keith Reinfeld <[EMAIL PROTECTED]> wrote: Hi, This thread inspired me to prototype my own world clock. And, yes the Date object does provide the means to convert local time to remote time IF you have the remote location's GMT offset value to plug in. I think this is the data Corban was asking after. http://wwp.greenwichmeantime.com/ and Wikipedia maybe good general information sources, but I haven't been able to find a nice tidy list of locations and their GMT offsets that I can effortlessly implement in Flash. Regards, -Keith http://keithreinfeld.home.comcast.net ___ 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 -- _ Marcelo Volmaro ___ 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] Dang IE...
It's a problem with External Interface under IE. Check http://www.extremefx.com.ar/blog/fixing-flash-external-interface-inside-form-on-internet-explorer Regards, On Wed, 08 Aug 2007 20:44:36 -0300, Dave Mennenoh <[EMAIL PROTECTED]> wrote: Anyone seen this? In IE I am getting this error: Line: 1, Char: 86, Object doesn't support this property or method, Code:0 Page validates with the W3 school's validator service. Works without error in FF. Works fine in IE, but generates this error that I cannot figure out, and my client is not liking it... The URL: http://65.211.160.184 Still in testing...but almost ready to launch... Dave - Head Developer http://www.blurredistinction.com Adobe Community Expert http://www.adobe.com/communities/experts/ ___ 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 -- _____ Marcelo Volmaro ___ 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] Flash JavaScript Integration Kit Issues
If your flash object is inside a form element, that´s the problem. Check http://www.extremefx.com.ar/blog/fixing-flash-external-interface-inside-form-on-internet-explorer for more information. On Thu, 22 Mar 2007 09:08:49 -0300, Alain Rousseau <[EMAIL PROTECTED]> wrote: Check more on the JavaScript Side, It might be a problem accessing the DOM objects in IE6. Check out document.documentElement in javascript, sometimes this is where the solution lies in such problems. put some alerts() at the key places and try to find the value of the Flash object for IE6 ... Hope this helps Steve Mathews wrote: Hi, I have an issue with some e-learning content that I can't figure out. The content is setup to communicate with the LMS using AICC and is currently working fine in IE7 and FireFox. In IE6 it fails to finish initializing and I believe I have tracked it down to a point where Javascript is calling a Flash method, but Flash doesn't seem to receive the call. Is there any known issues with the kit and IE6 that I might look at, or any reasons for a call to just not get sent? Thanks, Steve ___ 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 -- _____ Marcelo Volmaro ___ 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] javascript, externalinterface and swfobject part 2
Well, i don´t know for sure, but i never, ever use window[element] to access an element object. I always use document.getElementById and had no problems neither in explorer nor in firefox/opera/safari. Also, you should better not use document.write to write content on a page. document.write statements must be run before the page finishes loading. This means that they must be either in the body of the page or in functions called from the body of the page. Any document.write statement that runs after the page finishes loading will create a new page and overwrite all of the content of the current page. This is almost certainly not what you intend to have happen. Use the DOM functions to create a new node and append it to the DOM tree or innerHTML to write content to an existing node (while you can, of course, create the content and insert it on an existing node using DOM, internet explorer has problems with that, so go with the innerHTML version). On Fri, 26 Jan 2007 05:49:56 -0300, Andreas R <[EMAIL PROTECTED]> wrote: So i got EI working with swfobject just fine; turns out i had omitted addParam("allowScriptAccess", "always"); SWF-to-container calls now work wonderfully as such: ExternalInterface.call("methodName"); However, i'm having a hell of a party getting container-to-swf calls up and running; i keep getting the methodName is not defined error in firefox. Here's my JS: Rayon.BlackBox = function(){ document.write('Content here'); mediaPlayer = new SWFObject("mediaplayer.swf", "mediaPlayerMovie", "100%", "100%", "8"); mediaPlayer.addParam("allowScriptAccess", "always"); mediaPlayer.addParam("scale", "exactfit"); mediaPlayer.addParam("menu", "false"); mediaPlayer.addParam("salign", "TL"); mediaPlayer.write("MediaPlayer"); } Rayon.BlackBox.prototype = { getMovie:function(movieName){ if (navigator.appName.indexOf("Microsoft") != -1) { return window[movieName] }else { return document.getElementById(movieName); } }, pushToList:function(jsonString){ alert("push to playlist: "+jsonString); var movie = this.getMovie("mediaPlayerMovie"); movie.addToPlayList(jsonString); alert("push done"); } } var BlackBox = Rayon.BlackBox; instanced with: obj = new BlackBox(); and method called through: obj.pushToList("jsonstring"); in the swf: ExternalInterface.addCallback("addToPlayList",null,addToPlayList); I've tried alerting on the return value for getMovie and it does return a relevant value. However i keep getting "movie.addToPlayList is not a function" errors Anyone know what i'm doing wrong? - Andreas R ___ 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 -- _ Marcelo Volmaro ___ 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] Textformat size ignores anything over 96
As far as i know, no, is not documented. Is adobe aware? It should, because i reported that. But i also reported some other problems a long time ago (when flash 8 saw the light) and they still exist on flash 9, so better go with the code i provided :). On Tue, 09 Jan 2007 09:59:51 -0300, Mike Mountain <[EMAIL PROTECTED]> wrote: Is this documented anywhere? Is Adobe aware? What a stupid limitation. Thanks for sharing the code. Cheers M -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Marcelo Volmaro Sent: 09 January 2007 12:53 To: Flashcoders mailing list Subject: Re: [Flashcoders] Textformat size ignores anything over 96 You can´t. I had to develop an application that needed text sizes bigger than that, and i had to create a "special" text field in where if the size was bigger than 96px (in fact the limit is on the line of the 80px, that´s why i use 81 in the function), i scaled up (by for example 200%) the text field and place the text scaled down (by 50% in this case). The function i use to find the scale is: private function calcFSize(pSize:Number, pDiv:Number):Number { pDiv = pDiv || 1; if ((pSize / pDiv) < 81) return pDiv; return calcFSize(pSize, ++pDiv); } and you use it like: var fontSize = 384; var perc = calcFSize(fontSize); //fontSize is the size in pixels of the font. textformat.size = fontSize/perc; textfield._xscale = textfield._yscale = perc * 100; Regards, On Tue, 09 Jan 2007 07:36:38 -0300, Mike Mountain <[EMAIL PROTECTED]> wrote: > Anyone know how to format text to above 96px high using the texformat > object - it seems to just ignore them. > Cheers > M > > > > > > > > ECM Systems Ltd, Ellifoot Park, Burstwick, East Yorkshire HU12 9DZ > > Tel: 01964 672000 > Fax: 01964 671102 > > Registered in England no. 01646471 > > The information contained within this email expresses the views of the > sender and not necessarily those of the company. It is private and > confidential and may be legally privileged. It is intended solely for > those authorised to receive it. If you are not the intended recipient > you are hereby notified that any disclosure, copying, distribution or > action taken in reliance on its contents is strictly prohibited and > may be unlawful. If you have received this email in error, please > telephone us immediately on > 01964 672000 or email a reply to highlight the error and then delete > it from your system. This email may contain links to web-sites, the > contents of which ECM Systems Ltd have no control over and can accept > no responsibility for. Any attachments have been virus-checked before > transmission; however, recipients are strongly advised to carry out > their own virus checking as ECM Systems Ltd do not warrant that such > attachments are virus-free. Please note that this email has been > created in the knowledge that Internet email is not a secure > communications medium. > We advise that you understand and observe this lack of security when > emailing us. > > ECM Systems Ltd, Ellifoot Park, Burstwick, East Yorkshire HU12 9DZ > > Tel: 01964 672000 > Fax: 01964 671102 > > Registered in England no. 01646471 > > The information contained within this email expresses the views of the > sender and not necessarily those of the company. > It is private and confidential and may be legally privileged. It is > intended solely for those authorised to receive it. If you are not the > intended recipient you are hereby notified that any disclosure, > copying, distribution or action taken in reliance on its contents is > strictly prohibited and may be unlawful. If you have received this > email in error, please telephone us immediately on 01964 672000 or > email a reply to highlight the error and then delete it from your > system. This email may contain links to web-sites, the contents of > which ECM Systems Ltd have no control over and can accept no > responsibility for. Any attachments have been virus-checked before > transmission; however, recipients are strongly advised to carry out > their own virus checking as ECM Systems Ltd do not warrant that such > attachments are virus-free. > Please note that this email has been created in the knowledge that > Internet email is not a secure communications medium. > We advise that you understand and observe this lack of security when > emailing us. > > > > ___ > 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.figle
Re: [Flashcoders] Textformat size ignores anything over 96
You can´t. I had to develop an application that needed text sizes bigger than that, and i had to create a "special" text field in where if the size was bigger than 96px (in fact the limit is on the line of the 80px, that´s why i use 81 in the function), i scaled up (by for example 200%) the text field and place the text scaled down (by 50% in this case). The function i use to find the scale is: private function calcFSize(pSize:Number, pDiv:Number):Number { pDiv = pDiv || 1; if ((pSize / pDiv) < 81) return pDiv; return calcFSize(pSize, ++pDiv); } and you use it like: var fontSize = 384; var perc = calcFSize(fontSize); //fontSize is the size in pixels of the font. textformat.size = fontSize/perc; textfield._xscale = textfield._yscale = perc * 100; Regards, On Tue, 09 Jan 2007 07:36:38 -0300, Mike Mountain <[EMAIL PROTECTED]> wrote: Anyone know how to format text to above 96px high using the texformat object - it seems to just ignore them. Cheers M ECM Systems Ltd, Ellifoot Park, Burstwick, East Yorkshire HU12 9DZ Tel: 01964 672000 Fax: 01964 671102 Registered in England no. 01646471 The information contained within this email expresses the views of the sender and not necessarily those of the company. It is private and confidential and may be legally privileged. It is intended solely for those authorised to receive it. If you are not the intended recipient you are hereby notified that any disclosure, copying, distribution or action taken in reliance on its contents is strictly prohibited and may be unlawful. If you have received this email in error, please telephone us immediately on 01964 672000 or email a reply to highlight the error and then delete it from your system. This email may contain links to web-sites, the contents of which ECM Systems Ltd have no control over and can accept no responsibility for. Any attachments have been virus-checked before transmission; however, recipients are strongly advised to carry out their own virus checking as ECM Systems Ltd do not warrant that such attachments are virus-free. Please note that this email has been created in the knowledge that Internet email is not a secure communications medium. We advise that you understand and observe this lack of security when emailing us. ECM Systems Ltd, Ellifoot Park, Burstwick, East Yorkshire HU12 9DZ Tel: 01964 672000 Fax: 01964 671102 Registered in England no. 01646471 The information contained within this email expresses the views of the sender and not necessarily those of the company. It is private and confidential and may be legally privileged. It is intended solely for those authorised to receive it. If you are not the intended recipient you are hereby notified that any disclosure, copying, distribution or action taken in reliance on its contents is strictly prohibited and may be unlawful. If you have received this email in error, please telephone us immediately on 01964 672000 or email a reply to highlight the error and then delete it from your system. This email may contain links to web-sites, the contents of which ECM Systems Ltd have no control over and can accept no responsibility for. Any attachments have been virus-checked before transmission; however, recipients are strongly advised to carry out their own virus checking as ECM Systems Ltd do not warrant that such attachments are virus-free. Please note that this email has been created in the knowledge that Internet email is not a secure communications medium. We advise that you understand and observe this lack of security when emailing us. ___ 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 -- _________ Marcelo Volmaro ___ 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] weird htmlText split and join behavior
V8 of the player (i don´t know 9) seems to have a BIG problem with textfields. Anytime you modify the contents of an html text field from WITHING the text field (ie: you are modifying the textfield using a link on the textfield) the player start doing weird things with the content. I have the same problem in an html editor i made, where you can "click" on the images. The player starts duplicating the image and you will end with two, three or more images stacked. In your case, the player is duplicating the link all over the textfield. Try doing the same but using a button... No problem and all works as expected. My solution (because i can´t use a button to edit the image) was to rebuild the area. Yes... each time you edit an image, i rebuild the entire textarea... Regards, On Tue, 28 Nov 2006 10:05:34 -0300, GregoryN <[EMAIL PROTECTED]> wrote: Hello all, I'm upgrading a project from v7 to v8 player. Main reason is better text readability. In this project, split().join() combination is used to hide/show some text (similar to css tricks in "normal" html). It works great in player v7, but, when published for v8, all text becomes underlined... Here is a test movie (click "replace" link): http://gousable.com/flash/temp/flashcoders/split_join_bug/textSplitJoin_1.html Source: http://gousable.com/flash/temp/flashcoders/split_join_bug/textSplitJoin1_source.zip In my (original) movie, all the text also becomes a link... Code: // === START OF CODE === var lorem_ipsum:String = "Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Donec vehicula. Nullam orci. Nulla viverra. Curabitur venenatis. Quisque nisi. Aliquam in turpis a tellus semper cursus. "; Nulla viverra. Curabitur venenatis. Quisque nisi. Aliquam in turpis a tellus semper cursus. "; var string2replace:String = "**"; var links_area:String = "href=\"asfunction:doReplace,var1\">replace: case #1"; // NOTE: // createTextField() does NOT return a tf object in player v7 // show system info this.createTextField("sys_info", this.getNextHighestDepth(), 10, 10, 400, 30); sys_info.text = "Flash Player: "+System.capabilities.version; sys_info.border = true; sys_info.borderColor = 0xff; var is_v8_or_later:Boolean = (Number(System.capabilities.version.substr(4,1)) >=8) ; //trace("is_v8player = "+is_v8_or_later); sys_info.text += ", is_v8_or_later = "+is_v8_or_later; var my_format:TextFormat = new TextFormat(); my_format.font = "Verdana"; this.createTextField("my_text1", this.getNextHighestDepth(), 10, 50, 400, 300); my_text1.multiline = true; my_text1.wordWrap = true; my_text1.antiAliasType = "advanced"; my_text1.html= true; my_text1.border = true; my_text1.borderColor = 0x00ff00; my_text1.embedFonts = true; var startText:String = lorem_ipsum + string2replace + links_area + lorem_ipsum; my_text1.htmlText = startText; my_text1.setTextFormat(my_format); // doReplace function doReplace(p:String):Void{ trace("doReplace called"); var tag2replace:String = ""; var my_replace:String = "=== Lorem ipsum ==="; my_text1.htmlText= startText.split( tag2replace ).join( my_replace ); my_text1.setTextFormat(my_format); } // === END OF CODE === What is it - known bug or I'm missing something? Any help is appreciated. -- _ Marcelo Volmaro ___ 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] Grabbing data directly from the HTML page
ML page I was playing around with the idea of passing data from an HTML page directly into a Flash movie via Javascript/SWFObject. One thing I wanted to try was sending the text that SWFObject replaces into the Flash movie. In Firefox this was pretty simple. E.g., if SWFObject was replacing the contents of ..., then all that was needed was something in the Javascript code like: var swfObj = new SWFObject(parameters); swfObj.addVariable("HTML_flashContent", escape('' + document.getElementById("flash-content").innerHTML.toString() + "")); Then, in Flash, the root variable HTML_flashContent can be parsed into an XML object. This has obvious benefits for search engine optimization, as well as making it so a Flash and non-Flash version of a page can be the exact same file. Unfortunately, though, Internet Explorer and Safari return SGML, not XHTML, for the innerHTML property (e.g., the above div tag gets converted to ... in IE). I made a quick-and-dirty SGML to XHTML conversion tool to get around this, and it seems to work so far. My question is, has anybody else made an SGML to XHTML conversion tool in ActionScript, or should I continue to refine mine and offer it for public use when done? ― T. Michael Keesey Director of Technology Exopolis, Inc. 2894 Rowena Ave. Ste. B Los Angeles, California 90039 ___ 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 -- _ Marcelo Volmaro ___ 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] Re: inline images in a textarea
They measure the width of each character and then insert spaces where the image should be placed. Then the image is attached onto a movieclip using as a coordinates the sum of the width of all the characters in one line. If the text spans into multiple lines, that´s no problem neither. You know the width of the text field, so you can check where the text will span, and measuring the height of a textline, add that space to the y coord. Easy? No. Doable? Yes. In fact, i remember now a component that does exactly that... don´t remember the name, but something with emoticons and flash :) Regards, On Tue, 12 Sep 2006 15:43:23 -0300, Rich Rodecker <[EMAIL PROTECTED]> wrote: wierd...how do you suppose they did it here then?: http://www.mambers.com/chat/preloader.swf i thought about picking the string apart and piecign together some new movieclips/text fields to display the content, but that would get crazy when the text spans multiple lines. the link above handles it pretty well though. On 9/8/06, Marcelo Volmaro <[EMAIL PROTECTED]> wrote: You can´t do that because flash doesn´t support images as in-line elements, only as block elements. On Fri, 08 Sep 2006 17:30:43 -0300, Rich Rodecker <[EMAIL PROTECTED]> wrote: > thanks...its not the text thats going to the next line though...the text > is > all appearing on one line, but the image is appearing on the next. > > so for instance when the image is supposed to be in the middle of the > line > of text: > > hey there http://www.thewhole9.com/chat/smilies/smile.jpg"; > width="19" height="19" VSPACE="0" HSPACE="0" /> hows it going? > > is turning into this (visually anyway, the html is still correct in the > textarea): > hey there hows it going? > http://www.thewhole9.com/chat/smilies/smile.jpg"; width="19" > height="19" VSPACE="0" HSPACE="0" /> > > does that make sense? thee image is appearing on the next line, after > the > line of text when it should be right in the middle. > > On 9/8/06, Lori Hutchek <[EMAIL PROTECTED]> wrote: >> >> Check that you are setting this VSPACE="0" HSPACE="0" it's the vertical >> and horizontal space around the image which may be pushing the text to >> next line >> >> -Original Message- >> From: [EMAIL PROTECTED] >> [mailto:[EMAIL PROTECTED] On Behalf Of Rich >> Rodecker >> Sent: Friday, September 08, 2006 12:55 PM >> To: Flashcoders mailing list >> Subject: [Flashcoders] Re: inline images in a textarea >> >> hmmm..anyone? i know i've seen it done a couple of times, but I'm >> pretty >> stuck. >> >> >> >> On 9/7/06, Rich Rodecker <[EMAIL PROTECTED]> wrote: >> > >> > ok, i know working with images in a text area is only going to lead me >> to >> > heartache, but I've seen this done and if anyone can point me in the >> right >> > direction that would be awesome. >> > >> > I have a chat app that im building with support for emoticons. >> everyhting >> > works great except the smiley image always appears on the next line >> after >> > the text, so I wind up with something like: >> > >> > here is my smiley >> > :) >> > >> > when i really want: >> > >> > here is :) my smiley >> > >> > The one quirk i can see that might cause some wierdness is that i am >> > setting the contents of the textarea using the .text property, though >> the >> > textarea is set to html = true and everything renders out ok. I dont >> want >> > to use .htmlText because I'm letting the user choose any font, and >> htmlText >> > wont seem to render without the text embedded. >> > >> > >> > >> ___ >> 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://tr
Re: [Flashcoders] Re: inline images in a textarea
You can´t do that because flash doesn´t support images as in-line elements, only as block elements. On Fri, 08 Sep 2006 17:30:43 -0300, Rich Rodecker <[EMAIL PROTECTED]> wrote: thanks...its not the text thats going to the next line though...the text is all appearing on one line, but the image is appearing on the next. so for instance when the image is supposed to be in the middle of the line of text: hey there http://www.thewhole9.com/chat/smilies/smile.jpg"; width="19" height="19" VSPACE="0" HSPACE="0" /> hows it going? is turning into this (visually anyway, the html is still correct in the textarea): hey there hows it going? http://www.thewhole9.com/chat/smilies/smile.jpg"; width="19" height="19" VSPACE="0" HSPACE="0" /> does that make sense? thee image is appearing on the next line, after the line of text when it should be right in the middle. On 9/8/06, Lori Hutchek <[EMAIL PROTECTED]> wrote: Check that you are setting this VSPACE="0" HSPACE="0" it's the vertical and horizontal space around the image which may be pushing the text to next line -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Rich Rodecker Sent: Friday, September 08, 2006 12:55 PM To: Flashcoders mailing list Subject: [Flashcoders] Re: inline images in a textarea hmmm..anyone? i know i've seen it done a couple of times, but I'm pretty stuck. On 9/7/06, Rich Rodecker <[EMAIL PROTECTED]> wrote: > > ok, i know working with images in a text area is only going to lead me to > heartache, but I've seen this done and if anyone can point me in the right > direction that would be awesome. > > I have a chat app that im building with support for emoticons. everyhting > works great except the smiley image always appears on the next line after > the text, so I wind up with something like: > > here is my smiley > :) > > when i really want: > > here is :) my smiley > > The one quirk i can see that might cause some wierdness is that i am > setting the contents of the textarea using the .text property, though the > textarea is set to html = true and everything renders out ok. I dont want > to use .htmlText because I'm letting the user choose any font, and htmlText > wont seem to render without the text embedded. > > > ___ 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 -- _ Marcelo Volmaro ___ 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] WSIWYG HTML text editor in Flash - follow onquestion
>>>>>> >>>>>>>>This should give you a head start. >>>>>>>> >>>>>>>>- James >>>>>>>> >>>>>>>> >>>>>>>>-Original Message- >>>>>>>>From: [EMAIL PROTECTED] >>>>>>>>[mailto:[EMAIL PROTECTED] On Behalf Of >>>>>>Merrill, >>>>>>>>Jason >>>>>>>>Sent: Tuesday, August 01, 2006 10:11 AM >>>>>>>>To: Flashcoders mailing list >>>>>>>>Subject: [Flashcoders] WSIWYG HTML text editor in Flash? >>>>>>>> >>>>>>>>Two related questions. In a nutshell, trying to make a WSIWYG >>HTML >>>>>>text >>>>>>>>editor for Flash 7. >>>>>>>> >>>>>>>>Question 1: >>>>>>>> >>>>>>>>Has anyone created an HTML text editor component or class of some >>>>kind >>>>>>>>in Flash? Basically, having a textfield containing a paragraph of >>>>>>text >>>>>>>>the user can apply bold, size, font, etc. to - I assume it would >>use >>>> >>>>>>>>something like: >>>>>>>> textfield.replaceText(Selection.getBeginIndex(),Selection.getEnd In >>de >>>>x( >>>>>>), >>>>>>>>theNewString) >>>>>>>> >>>>>>>>or something to that effect. >>>>>>>> >>>>>>>>So to my second question, I was able to get the above working, but >>>>the >>>>>>>>html Textfield would not apply the new HTML tags, it would show >>them >>>> >>>>>>>>literally when replaceText was used. Initially, I set the text >>with >>>> >>>>>>>>textField.htmlText = myText and renders fine with the bolding, but >>>>>>>>textField.replaceText() seems to not allow the textfield to show >>the >>>>>>>>bold tags applied - it shows the literal tag. Any ideas? >>>>>>>> >>>>>>>>Basically, would like to create a WSIWYG HTML text editor (flash >>7), >>>>>>but >>>>>>>>from what I read in the archives, it's a lot harder than it sounds >>>>and >>>>>>>>maybe not even possible in Flash right now, but I don't want to >>give >>>>>>up >>>>>>>>too early. It seems that all the basic methods are available, >>there >>>>>>are >>>>>>>>just some quirks to work out with the Textfield class. >>>>>>>> >>>>>>>>Thanks, >>>>>>>> >>>>>>>>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 >>>>___ >>>>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 -- [ JPG ] ___ 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 -- _ Marcelo Volmaro ___ 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] WSIWYG HTML text editor in Flash - follow onquestion
gt;>>>>>> >>>>>>>>Has anyone created an HTML text editor component or class of some >>>>kind >>>>>>>>in Flash? Basically, having a textfield containing a paragraph of >>>>>>text >>>>>>>>the user can apply bold, size, font, etc. to - I assume it would >>use >>>> >>>>>>>>something like: >>>>>>>> textfield.replaceText(Selection.getBeginIndex(),Selection.getEnd In >>de >>>>x( >>>>>>), >>>>>>>>theNewString) >>>>>>>> >>>>>>>>or something to that effect. >>>>>>>> >>>>>>>>So to my second question, I was able to get the above working, but >>>>the >>>>>>>>html Textfield would not apply the new HTML tags, it would show >>them >>>> >>>>>>>>literally when replaceText was used. Initially, I set the text >>with >>>> >>>>>>>>textField.htmlText = myText and renders fine with the bolding, but >>>>>>>>textField.replaceText() seems to not allow the textfield to show >>the >>>>>>>>bold tags applied - it shows the literal tag. Any ideas? >>>>>>>> >>>>>>>>Basically, would like to create a WSIWYG HTML text editor (flash >>7), >>>>>>but >>>>>>>>from what I read in the archives, it's a lot harder than it sounds >>>>and >>>>>>>>maybe not even possible in Flash right now, but I don't want to >>give >>>>>>up >>>>>>>>too early. It seems that all the basic methods are available, >>there >>>>>>are >>>>>>>>just some quirks to work out with the Textfield class. >>>>>>>> >>>>>>>>Thanks, >>>>>>>> >>>>>>>>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 >>>>___ >>>>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 -- [ JPG ] ___ 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 -- _ Marcelo Volmaro ___ 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] WSIWYG HTML text editor in Flash - follow onquestion
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 ___ 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 -- _ Marcelo Volmaro ___ 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] WSIWYG HTML text editor in Flash?
It was developed with that in mind, but the class itself can be used as standalone editor (I´m already using it for some projects). You simply set the content by writting to the _content property of the HTMLeditor class and get the content by reading that property. Currently i don´t have the time to make a component, but it should be really easy to create a component from what is done. The JS file is used to replace textareas with the html file, and the configuration options you see are simply passed via flashvars to the class, so you don´t need it to make the editor works. On Tue, 01 Aug 2006 11:56:32 -0300, Merrill, Jason <[EMAIL PROTECTED]> wrote: That seems to be a flash file specifically for HTML forms and uses a large .js file for configuration. Could this be loaded into a Flash file? I mean, I know it could, but it doesn't seem like it would work if you did, and how would you get the end string from it? Jason Merrill Bank of America Learning & Organization Effectiveness - Technology Solutions -Original Message- From: [EMAIL PROTECTED] [mailto:flashcoders- [EMAIL PROTECTED] On Behalf Of Marcelo Volmaro Sent: Tuesday, August 01, 2006 10:40 AM To: Flashcoders mailing list Subject: Re: [Flashcoders] WSIWYG HTML text editor in Flash? http://osflash.org/flashtextarea On Tue, 01 Aug 2006 11:35:49 -0300, Merrill, Jason <[EMAIL PROTECTED]> wrote: strip them out and replace with what you need for the corresponding styles for your site Right, if I follow you, that's similar to what I have tried, but I can't get the textfield to re-render the HTML tag - it shows the tag literally if I use replaceText() or replaceSel(). Or how would you do it? Have a code example? thanks. Jason Merrill Bank of America Learning & Organization Effectiveness - Technology Solutions -Original Message- From: [EMAIL PROTECTED] [mailto:flashcoders- [EMAIL PROTECTED] On Behalf Of Tom Rhodes Sent: Tuesday, August 01, 2006 10:23 AM To: Flashcoders mailing list Subject: Re: [Flashcoders] WSIWYG HTML text editor in Flash? i've made some simple ones for css sites, that get their copy out of a db. i used textformats back in the flash 6 days, then in the output string, once you've applied the formatting in the "editor" text field, you look for the textformat tags, strip them out and replace with what you need for the corresponding styles for your site with 7 and the stylesheets support maybe it's even easier than that. I just remember having to keep things simple in terms of editor functionality, basically one button for each possible style Merrill, Jason wrote: Two related questions. In a nutshell, trying to make a WSIWYG HTML text editor for Flash 7. Question 1: Has anyone created an HTML text editor component or class of some kind in Flash? Basically, having a textfield containing a paragraph of text the user can apply bold, size, font, etc. to - I assume it would use something like: textfield.replaceText(Selection.getBeginIndex(),Selection.getEndIndex(), theNewString) or something to that effect. So to my second question, I was able to get the above working, but the html Textfield would not apply the new HTML tags, it would show them literally when replaceText was used. Initially, I set the text with textField.htmlText = myText and renders fine with the bolding, but textField.replaceText() seems to not allow the textfield to show the bold tags applied - it shows the literal tag. Any ideas? Basically, would like to create a WSIWYG HTML text editor (flash 7), but from what I read in the archives, it's a lot harder than it sounds and maybe not even possible in Flash right now, but I don't want to give up too early. It seems that all the basic methods are available, there are just some quirks to work out with the Textfield class. Thanks, 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 -- __ Tom Rhodes - Developer / Composer Wheelhouse Creative Ltd, 2 Albion Place, Hammersmith, London. W6 0QT Tel: 020 8748 4466 Fax: 020 8748 4850 www.wheelhousecreative.co.uk __ ___ 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://trainin
Re: [Flashcoders] WSIWYG HTML text editor in Flash?
http://osflash.org/flashtextarea On Tue, 01 Aug 2006 11:35:49 -0300, Merrill, Jason <[EMAIL PROTECTED]> wrote: strip them out and replace with what you need for the corresponding styles for your site Right, if I follow you, that's similar to what I have tried, but I can't get the textfield to re-render the HTML tag - it shows the tag literally if I use replaceText() or replaceSel(). Or how would you do it? Have a code example? thanks. Jason Merrill Bank of America Learning & Organization Effectiveness - Technology Solutions -Original Message- From: [EMAIL PROTECTED] [mailto:flashcoders- [EMAIL PROTECTED] On Behalf Of Tom Rhodes Sent: Tuesday, August 01, 2006 10:23 AM To: Flashcoders mailing list Subject: Re: [Flashcoders] WSIWYG HTML text editor in Flash? i've made some simple ones for css sites, that get their copy out of a db. i used textformats back in the flash 6 days, then in the output string, once you've applied the formatting in the "editor" text field, you look for the textformat tags, strip them out and replace with what you need for the corresponding styles for your site with 7 and the stylesheets support maybe it's even easier than that. I just remember having to keep things simple in terms of editor functionality, basically one button for each possible style Merrill, Jason wrote: Two related questions. In a nutshell, trying to make a WSIWYG HTML text editor for Flash 7. Question 1: Has anyone created an HTML text editor component or class of some kind in Flash? Basically, having a textfield containing a paragraph of text the user can apply bold, size, font, etc. to - I assume it would use something like: textfield.replaceText(Selection.getBeginIndex(),Selection.getEndIndex(), theNewString) or something to that effect. So to my second question, I was able to get the above working, but the html Textfield would not apply the new HTML tags, it would show them literally when replaceText was used. Initially, I set the text with textField.htmlText = myText and renders fine with the bolding, but textField.replaceText() seems to not allow the textfield to show the bold tags applied - it shows the literal tag. Any ideas? Basically, would like to create a WSIWYG HTML text editor (flash 7), but from what I read in the archives, it's a lot harder than it sounds and maybe not even possible in Flash right now, but I don't want to give up too early. It seems that all the basic methods are available, there are just some quirks to work out with the Textfield class. Thanks, 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 -- __ Tom Rhodes - Developer / Composer Wheelhouse Creative Ltd, 2 Albion Place, Hammersmith, London. W6 0QT Tel: 020 8748 4466 Fax: 020 8748 4850 www.wheelhousecreative.co.uk __ ___ 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 -- _ Marcelo Volmaro ___ 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] Embedding a SWF using base64 and Data: URI scheme
It is possible to encode ANY file to base64 and insert it on a page (a flash file, an image, a sound). The problem is that IE doesn´t support it. You can do (for example) src="data:image/gif;base64,dSQ84lLQfY5R14wDB5Lyon4ubwS7jx9NcV9/j5+g4JADs=" width="10" height="15" /> And all browsers will show the correct image, and IE a broken image icon. (the above image is not a real one, so don´t try on your browser). On Fri, 02 Jun 2006 16:28:00 -0300, John Dowdell <[EMAIL PROTECTED]> wrote: Tom Lee wrote: In the original Microsoft list of workarounds for the Eolas patch, one of the possible workarounds was to base64 encode your swf and embed the data inline in your object tag. The original page has since been removed, and the only evidence I can now find of this is at http://www.mustardlab.com/developer/flash/standards/, a page being kept around for archival reasons (see the "official fixes" section). Though I don't need this technique as an Eolas workaround, I'm still really curious about it. Is it possible to base64 encode a swf file and include that raw data in your web page instead of hosting a separate swf file on your server? Hi Tom, I don't have much solid info myself on that approach... I had heard it discussed during meetings, with the context that there were size constraints of some type, but I haven't seen any implementations of it myself. Sorry I've no solid info, but maybe that in itself is some info...? ;-) jd -- _ Marcelo Volmaro ___ 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] geturl:javascript is causing images to not display on IE
Use getURL("javascript:void(setFlashHeight('wrapper','"+h+"')"); On Mon, 29 May 2006 13:19:02 -0300, Kevin Newman <[EMAIL PROTECTED]> wrote: I think you may have hit one of the problems with using javascript: pseudo urls. If I remember correctly, when you use a javascript pseudo url it disables some of the events under some circumstances. You could try two things - either use fscommand (or FlashJS, or one of the other communication packages floating around on the net) or try returning false from the javascript: url (I'm not sure about this one). getURL("javascript:setFlashHeight('wrapper','"+h+"');return false;"); This is the only mention of the problem that I could find: http://groups.google.com/group/comp.lang.javascript/browse_frm/thread/a57416b64499f57b/e77bfad5ee2fe342?lnk=st&q=javascript+pseudo+url+images+not+loading+group%3Acomp.lang.javascript&rnum=2&hl=en#e77bfad5ee2fe342 Since the javascript: url seems to work fine in plugin based browsers (Mozilla, Opera, Safari), and just doesn't work in ActiveX (IE) you could check the plugin type in Actionscript (System.capabilities.playerType == "PlugIn"), and use fscommand for ActiveX and use getURL for plugin. You would just need to add a vbscript to catch the fscommand and route it to the javascript call. Something along these lines should work (untested - probably needs work): Actionscript: if (System.capabilities.playerType == "PlugIn") { getURL("javascript:setFlashHeight('wrapper','"+h+"');return false;"); } else { fscommand("setFlashHeight", "wrapper,"+h); } HTML: On Error Resume Next Sub <YourMovieName>_FSCommand(ByVal command, ByVal args) Call yahooMap_DoFSCommand(command, args) End Sub function <YourMovieName>_DoFSCommand(command, args) { var args = args.split(','); window[command](args[0], args[1]); } :NOTE: You could probably do everything from the VBScript, but I don't know VBScript well. Also, if you are publishing to Flash 8 then you can save yourself some headache by using ExternalInterface. BTW, I'm pretty sure this is an IE problem, not a Flash one. ;-) Kevin N. Phil Glatz wrote: I've been experiencing an intermittent problem with a getURL call back to a javascript function on the page calling an SWF. I'm using Flash 8, and testing on XP. With Firefox, there is no issue. With IE 6, I experience the problem about 80% of the time. This issue is that I have my SWF in a div, with some divs below it containing some gif images. When I flush the browser's cache, the images always display. After subsequent page refreshes (F5), the images usually don't appear (but sometimes do). I'm using the SWF to display some variable content, filling dynamic text fields from passed variables. I can also select from a number of fonts via a passed var. When the font changes, the div height needed to contain the stage changes. I created an actionscript function that passes the new calculated height back to the page via a javascript call: function resize() { if (allowResize == "true") { h = Math.ceil(pBody._y+pBody._height)+10; getURL("javascript:setFlashHeight('wrapper','"+h+"');"); } } The HTML page has the javascript function setFlashHeight() that resizes the enclosing division for the SWF, via DOM. Like I say, it all works fine with Firefox, and the HTML and CSS are both correct. I first suspected a DOM issue, but I later discovered that if I added a return statement as the first line of the javascript function, the problem persisted. If I comment out the getURL call in the actionscript, my disappearing image problem goes away. So it appears to be a Flash issue of some sort, which I'm not understanding. I've Googled around a bit and can't find anything remotely related to this problem. I'm on a tight project deadline and am about to send $99 to Macromedia for a support call. I thought I'd check with this wise group first to see if this rings any bells. Is this some sort of known issue with Flash/IE? Driving me nuts! thanks, Phil _______ 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 -- _ Marcelo Volmaro ___ 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] Alpha Masking Weirdness
Stage.scaleMode="noscale"; Stage.align="TL"; mainClass = new Main(rootMC); } } End test 3- On Tue, 23 May 2006 23:31:45 -0300, Nehal <[EMAIL PROTECTED]> wrote: I already reported that to MM (with very simple and small test cases) Can you share test case? Neh -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Marcelo Volmaro Sent: Tuesday, May 23, 2006 8:31 AM To: Flashcoders mailing list Subject: Re: [Flashcoders] Alpha Masking Weirdness Indeed, it´s a buggy flash player behavior. When you mix TextFields with Masks and FX, all goes wrong. It has nothing to do with MTASC. I already reported that to MM (with very simple and small test cases) Maybe in the next update? Or maybe we need to wait for the V9 player. On Tue, 23 May 2006 11:42:35 -0300, Rifled Cloaca <[EMAIL PROTECTED]> wrote: I've embedded the font, naturally. I'm getting extremely buggy behavior. Sometimes the textfield will appear partially... only the right half of the textfield, but most of the time, not at all. At one point, I found that removing the dropshadow filter from the textfield, and then adding it back later programmatically helped the problem. But, now that I've added the alpha mask, it doesn't behave right, and it's very slow. The only thing I can think of is that it has something to do with the combination of movies compiled with MTASC versus the Flash IDE. The shell is all code, compiled in MTASC, and it loads in modules created in the Flash IDE. On 5/22/06, Vivek lakhanpal <[EMAIL PROTECTED]> wrote: Try embedding font for the textfield. Thanks, Vivek On 5/23/06, Rifled Cloaca <[EMAIL PROTECTED]> wrote: > > All, > > I'm masking a MovieClip with an alpha mask using cacheAsBitmap. The > MovieClip has a dynamic text field inside it that I populate at a later > time. When I play the movie, the area where the textfield is remains > empty. If I drag the corner of the player to resize the movie, the text > magically appears. Anyone run into this sort of weird behavior? > ___ > 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 -- _ Marcelo Volmaro ___ 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] Alpha Masking Weirdness
Indeed, it´s a buggy flash player behavior. When you mix TextFields with Masks and FX, all goes wrong. It has nothing to do with MTASC. I already reported that to MM (with very simple and small test cases) Maybe in the next update? Or maybe we need to wait for the V9 player. On Tue, 23 May 2006 11:42:35 -0300, Rifled Cloaca <[EMAIL PROTECTED]> wrote: I've embedded the font, naturally. I'm getting extremely buggy behavior. Sometimes the textfield will appear partially... only the right half of the textfield, but most of the time, not at all. At one point, I found that removing the dropshadow filter from the textfield, and then adding it back later programmatically helped the problem. But, now that I've added the alpha mask, it doesn't behave right, and it's very slow. The only thing I can think of is that it has something to do with the combination of movies compiled with MTASC versus the Flash IDE. The shell is all code, compiled in MTASC, and it loads in modules created in the Flash IDE. On 5/22/06, Vivek lakhanpal <[EMAIL PROTECTED]> wrote: Try embedding font for the textfield. Thanks, Vivek On 5/23/06, Rifled Cloaca <[EMAIL PROTECTED]> wrote: > > All, > > I'm masking a MovieClip with an alpha mask using cacheAsBitmap. The > MovieClip has a dynamic text field inside it that I populate at a later > time. When I play the movie, the area where the textfield is remains > empty. If I drag the corner of the player to resize the movie, the text > magically appears. Anyone run into this sort of weird behavior? > ___ > 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 -- _ Marcelo Volmaro ___ 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] Text editor - Selection trouble.
That´s right, because once you hitted the button, the selection is the button. You need to store the start/end index somewere and then, on the button, use that indexes instead of the Selection functions. An easy way could be to assign into an onEnterFrame a function that checks if the selected item is the textfield and if is, store the start/end positions of the selection. Then, the button code should look like (assuming you stored the start/end indexes in startIndex and endIndex) boldButton.onRelease = function () { my_txt.setTextFormat(startIndex, endIndex, arialBold); } Hope it helps... On Wed, 12 Apr 2006 09:46:55 -0300, Magnus Askenbäck <[EMAIL PROTECTED]> wrote: Hi all, I'm trying to build a quite simple text editor in f8 and are currently having some problems with the Selecton class. If anyone can give me some pointers it would be much apreciated. Problem is that whenever I try to use my buttons I loose focus of the textField and the Selection doesn't trigger. Like so: boldButton.onRelease = function () { my_txt.setTextFormat(Selection.getBeginIndex(), Selection.getEndIndex(), arialBold); } Selection.getBeginIndex() and Selection.getEndIndex() only returns -1 And if someone has a live exemple (with code) that would be awesome. A component is not an option tho. Tnx .magnus ___ 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 -- _____ Marcelo Volmaro ___ 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] Radiobutton - Dispatch event on code selected?
Thank you both... I found another way (not an elegant one, but it works): radioButton.onRelease(); Regards, On Thu, 30 Mar 2006 05:40:34 -0300, Aaron Smith <[EMAIL PROTECTED]> wrote: Sure its possible!!! Marcelo, here is a solution: put two radio buttons on the stage and call it rb1 / rb2. then in the actions layer put: import mx.controls.RadioButton; import mx.utils.Delegate; import mx.events.EventDispatcher; var dispatchEvent:Function; EventDispatcher.initialize(this); //create prototype reference for RadioButton var osv = _global.mx.controls.RadioButton.prototype; //hold onto the old setSelected method ( The intrinsic set Selected method is in SimpleButton, RadioButton inherits from that. the set method simply calls setSelected. ) osv.oldSetSelected = osv.setSelected; osv.oldOnRelease = osv.onRelease; //overwrite onrelease to deal with multiple events being dispatched. osv.onRelease = function():Void { this['wasReleased'] = true; this.oldOnRelease.apply(this,[]); } //overwrite the old method with new method. osv.setSelected = function(val:Boolean):Void { if( !this['wasReleased'] ) { if( val == true ) { this.dispatchEvent( { type:'codeSelected' } ); this.oldSetSelected.apply( this,[ true ] ); } } else { this.oldSetSelected.apply( this,[ true ] ); } this['wasReleased'] = false; } //add listener to radio button. rb1.addEventListener('codeSelected', Delegate.create(this, handleCodeSelect)); rb1.addEventListener('click', Delegate.create(this, handleClick)); //handle code selected event function handleCodeSelect():Void { trace("codeSelected"); } //handle click event function handleClick():Void { trace("CLICK"); } //set an interval to do some testing on the codeSelected event tmpInt = setInterval(setSel,1000,true); //set the selected property function setSel():Void { //trigger the event rb1.selected = true; } test that out.. you'll see that for testing i just set an interval to change the selected property to true.. the event gets dispatched every time the selected property is set to true. Also worth mentioning you have to update the onRelease method to deal with multiple events being dispatched. Also don't name the codeSelected event as click, as that is not whats happening and would cause confusion. rb2 is never used in this example.. just use that to click back and forth between... also try commenting out the interval just for more testing.. you'll see that just the click event fires.. smith Danny Kodicek wrote: >It´s possible to make the radio button dispatch the "click" event if i select it by code? Not directly, but you could add something like this (I haven't used the rb component for a while, but I think this would work radioButton.autoClick=function() { this.selected=true linkType_cml.setType() } Then to select the radio button you just call radioButton.autoClick(), and your event should be dispatched. Danny ___ 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 -- _ Marcelo Volmaro ___ 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] Radiobutton - Dispatch event on code selected?
Hi!, It´s possible to make the radio button dispatch the "click" event if i select it by code? The following doesn´t work (but of course, if you mouse-select the radio button, works perfectly): function setType(){ trace("it works!"); } linkType_cmp = _root[_root.radioComponent.groupName]; linkType_cmp.addEventListener("click", setType); linkType_cmp.selected = true; Thanks in advance!, -- _ Marcelo Volmaro ___ 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] CSS with input text
On the SVN, under deploy... i don´t have it currently online... On Mon, 20 Mar 2006 17:34:56 -0300, Danny Kodicek <[EMAIL PROTECTED]> wrote: Take a look at FlashTextArea at osflash. I already did all that work. Ooh, I was looking for a while at text editors, but I missed that one. Got a demo up somewhere? (incidentally, I got mine working pretty well, so I'll probably not need it, but if it's more reliable, I might switch) Danny -- _____ Marcelo Volmaro ___ 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] CSS with input text
Take a look at FlashTextArea at osflash. I already did all that work. On Mon, 20 Mar 2006 09:10:46 -0300, Danny Kodicek <[EMAIL PROTECTED]> wrote: I don't know if this will help you at all, but the TextField.Stylesheet class has a transform() method which will convert _one_ of your style objects from the Stylesheet (ie. The one you maybe assigned for the or the element or element) into a TextFormat object which you can then apply to your TextField with setNewTextFormat. Hmm - I'm not sure how this works (the transform() docs are possibly the most useless I've ever seen!). As far as I can make out, transform() is the internal function used by the StyleSheet object to translate it into textFormats. But I can't quite tell what happens next... Can you give me an example of what you mean in practice? Right now I'm fairly close to dropping styleSheets altogether. My current plan is to have a parser that translates the HTML into my own internal XML format, so that the textField is really a fairly dumb container, but really this is turning into such a nasty hack that I'm not terribly happy about it. Danny ___ 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 -- _ Marcelo Volmaro ___ 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] CSS with input text
Is not possible at all. When flash parses a CSS styled html, it simply replaces all the tags with the corresponding formatting code (textformat, font, etc). And you are right about the structure: While the majority of the time the structure remains the same (in flash format, of course) it starts to change when you add images. To change the format of a CSS parsed html, you must use setTextFormat/setNewTextFormat. On Mon, 20 Mar 2006 07:19:30 -0300, Danny Kodicek <[EMAIL PROTECTED]> wrote: use textField.setNewTextFormat() Thanks, I know about that and am using it extensively. But it doesn't let me do what I want to do, which is to apply a CSS to my text editor. I've noticed that all the text editors out there suffer from the same problem, though, so perhaps I'm stuck with it. It just means that when I tell Flash to display html of one kind, it's going to change it to something else. And when it comes to parsing that back to the XML I want, this makes me nervous: can be absolutely sure it's always going to have the same structure? If not, what parameters can I expect to have to deal with? I hate being out of control in that way. Danny I've got a textField I'm trying to use for input text and I'd like to be able to style it. Unfortunately, the htmlText is being automatically set to this: a This isn't much help, because the FONT tag is appearing inside the P tag, with the result that any styling Iattach to P is being overridden (at least, I assume this is the source of the problem). Any idea how I can avoid this? Really, my ideal would be for Flash not to keep 'helping' me by adding its own HTML or changing mine: I'd like to be able to tell it exactly what HTML I want displayed. This is particularly important because I need to be able to extract the HTML at the end and return it. Danny ___ 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 -- _ Marcelo Volmaro ___ 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] Math, Maps and problems...
Hi, I have to make an app that, given a bitmap of a Map (a photo of a city), and given the georeferences of the upper-left corner and lower-right corner of that photo, take any group of latitudes/longitudes and draw on the map that coordinates. I´ve tried using the Mercator projection formula, but for some reason it doesn´t work. Probably because i need to "interpolate" the whole world size from the given map. Ideas? Formulas? Thanks in advance!, -- _____ Marcelo Volmaro ___ 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] Load external bitmap into bitmapdata?
Indeed, it works!, Also, trying this i´ve found a method to attach loaded movies as bitmaps... now i can create libraries of MCs!! Thanks! On Mon, 06 Mar 2006 19:50:24 -0300, JesterXL <[EMAIL PROTECTED]> wrote: I started to eat a cup, but it really didn't taste so good. Suddenly, my mouth really hurt trying to voraciously chew on ceramics, thus I gave up upon realising cups don't taste so good. ...however, this code in fact works: import flash.display.BitmapData; import flash.geom.Rectangle; import flash.geom.Matrix; import flash.geom.ColorTransform; function init() { Stage.align = "TL"; Stage.scaleMode = "noScale"; createEmptyMovieClip("image_mc", 0); var mcl:MovieClipLoader = new MovieClipLoader(); mcl.addListener(this); mcl.loadClip("test.jpg", image_mc); } function onLoadInit(target) { var width:Number = image_mc._width; var height:Number = image_mc._height; var transparent:Boolean = false; var fillColor:Number = 0x; var myBitmapData:BitmapData = new BitmapData(width, height, transparent, fillColor); myBitmapData.draw(image_mc, new Matrix(), new ColorTransform()); createEmptyMovieClip("copy_mc", 1); copy_mc._x = 20; copy_mc._y = 20; copy_mc.attachBitmap(myBitmapData, 0); image_mc._alpha = 20; } init() - Original Message - From: "Marcelo Volmaro" <[EMAIL PROTECTED]> To: "Flashcoders mailing list" Sent: Monday, March 06, 2006 5:38 PM Subject: Re: [Flashcoders] Load external bitmap into bitmapdata? The problem is: I need to load a bitmap. I can´t embed the bitmap inside a swf, because i have no control over the bitmaps. Any other ideas? On Mon, 06 Mar 2006 17:36:46 -0300, Adrian Park <[EMAIL PROTECTED]> wrote: Hey Marcelo, I've been playing with BitmapData for the first time this past weekend so I stand to be corrected on what I'm about to say! My understanding is that you can only load BitmapData from an existing image which is already in your library and has a linkage ID. For this reason, I don't think you can load an image and get its BitmapData. I was thinking there might be a workaround though... I was going to try embedding the jpg/png/gif in an swf and giving it a linkage id in the library, then load that swf into your master movie and attach the BitmapData from the loaded swf's library. Possible issues? I know you can't attach library assets from a loaded swf into another swf so the same limitation may apply with BitmapData. Again, I thought a workaround for this might be to attach the BitmapData into the swf you've just loaded and then clone it to a BitmapData object elsewhere? As you can see, I've been doing a lot of thinking and not a lot of doing so I'm not sure if this is of any help at all! I'd be very interested to know if any of this works. Cheers, Adrian P On 3/6/06, Marcelo Volmaro <[EMAIL PROTECTED]> wrote: Hi list!, It´s possible to load an external bitmap (jpg, png, gif) into a bitmapData? Or.. It´s possible to load an external bitmap into an MC and then render that mc into a bitmapData? All what i tried didn´t work... Thanks in advance!, -- _ Marcelo Volmaro ___ 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 -- _ Marcelo Volmaro ___ 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] Load external bitmap into bitmapdata?
The problem is: I need to load a bitmap. I can´t embed the bitmap inside a swf, because i have no control over the bitmaps. Any other ideas? On Mon, 06 Mar 2006 17:36:46 -0300, Adrian Park <[EMAIL PROTECTED]> wrote: Hey Marcelo, I've been playing with BitmapData for the first time this past weekend so I stand to be corrected on what I'm about to say! My understanding is that you can only load BitmapData from an existing image which is already in your library and has a linkage ID. For this reason, I don't think you can load an image and get its BitmapData. I was thinking there might be a workaround though... I was going to try embedding the jpg/png/gif in an swf and giving it a linkage id in the library, then load that swf into your master movie and attach the BitmapData from the loaded swf's library. Possible issues? I know you can't attach library assets from a loaded swf into another swf so the same limitation may apply with BitmapData. Again, I thought a workaround for this might be to attach the BitmapData into the swf you've just loaded and then clone it to a BitmapData object elsewhere? As you can see, I've been doing a lot of thinking and not a lot of doing so I'm not sure if this is of any help at all! I'd be very interested to know if any of this works. Cheers, Adrian P On 3/6/06, Marcelo Volmaro <[EMAIL PROTECTED]> wrote: Hi list!, It´s possible to load an external bitmap (jpg, png, gif) into a bitmapData? Or.. It´s possible to load an external bitmap into an MC and then render that mc into a bitmapData? All what i tried didn´t work... Thanks in advance!, -- _ Marcelo Volmaro ___ 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 -- _ Marcelo Volmaro ___ 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] Load external bitmap into bitmapdata?
Hi list!, It´s possible to load an external bitmap (jpg, png, gif) into a bitmapData? Or.. It´s possible to load an external bitmap into an MC and then render that mc into a bitmapData? All what i tried didn´t work... Thanks in advance!, -- _ Marcelo Volmaro ___ 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] RE: rich text box
If you don´t mind in adapting the source to use the MM components (or if you want to use it out of the box): http://osflash.org/flashtextarea On Mon, 06 Mar 2006 11:21:12 -0300, Mike Britton <[EMAIL PROTECTED]> wrote: This one looks nice: http://www.flashloaded.com/flashcomponents/flashtexteditor/ Pricey though for a component. hth, Mike ___ 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 -- _ Marcelo Volmaro ___ 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] FlashDevelop and scope
Not tested (works under ASDT) function MyClass(){ socket = new XMLSocket(); var _scope:MyClass = this; socket.onData = function(data){ _scope.parse(data); } } On Wed, 01 Mar 2006 09:20:29 -0300, Andreas Rønning <[EMAIL PROTECTED]> wrote: A quick example class class MyClass{ var socket:XMLSocket; function parse(data:String):Void{ } function MyClass(){ socket = new XMLSocket(); //interesting bit socket["creator"]=this; socket.onData = function(data){ this.creator.parse(data); } } } I know this isn't the best way to do it (hello delegate), but still. One of the big things in FlashDevelop for me is the dynamic code completion, and when i type "this." in the onData handler, it gives me a list of methods for MyClass, when it should give me methods for socket. Or am i wrong? The scope of handlers confuses me. - Andreas ___ 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 -- _ Marcelo Volmaro ___ 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] Memory leak in Flash projector
Well, just today i filled 3 bugs reports on memory leaks and things that don´t get drawn correctly, all with test cases. v8 also has problems with the new ExternalInterface under IE, if the tag is inside a form. Hope someone at Adobe fix all of this... On Fri, 24 Feb 2006 16:19:03 -0300, Andreas Rønning <[EMAIL PROTECTED]> wrote: This is very serious. The majority of my work is kiosk apps. Any more details on this, official Macromedia stance on it? Future fixes? - Andreas Marcelo Volmaro wrote: Well, unless you used a lot of the new FX, i recommend you going back to the v7 player. The v8 has a lot of errors/memory leaks, mostly of them related to the new bitmap engine. I recently had to change a lot of code that takes advantage of the new system to the old one, because a lot of things breaks badly. On Fri, 24 Feb 2006 15:32:51 -0300, Joe Cutting <[EMAIL PROTECTED]> wrote: Hello, I think I've found a memory leak in the Flash player on the PC. I made a fairly simple animation (no actionscript) and built a projector and when I run it in a loop the amount of memory needed continues to rise. (as measured using Task Manager). I'm using Flash Player version 8,0,22,0 on Windows XP professional. Has anyone else experienced this, or even better found a cure? If there is no cure then this is pretty serious for anyone using flash in a kiosk type situation. Cheers Joe ___ 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 --_____ Marcelo Volmaro ___ 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 -- _____ Marcelo Volmaro ___ 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] Memory leak in Flash projector
Well, unless you used a lot of the new FX, i recommend you going back to the v7 player. The v8 has a lot of errors/memory leaks, mostly of them related to the new bitmap engine. I recently had to change a lot of code that takes advantage of the new system to the old one, because a lot of things breaks badly. On Fri, 24 Feb 2006 15:32:51 -0300, Joe Cutting <[EMAIL PROTECTED]> wrote: Hello, I think I've found a memory leak in the Flash player on the PC. I made a fairly simple animation (no actionscript) and built a projector and when I run it in a loop the amount of memory needed continues to rise. (as measured using Task Manager). I'm using Flash Player version 8,0,22,0 on Windows XP professional. Has anyone else experienced this, or even better found a cure? If there is no cure then this is pretty serious for anyone using flash in a kiosk type situation. Cheers Joe ___ 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 -- _____ Marcelo Volmaro ___ 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] HTML text font size issue
It´s a limit of the player. And it´s a weird one. I have to write some custom function to find the maximum font site in a text field, if i found a value > 81 (empiric value) use the following function to find the divisor: function calcFSize(pSize:Number, pDiv:Number):Number { if (!pDiv) pDiv = 1; if ((pSize / pDiv) < 81) return pDiv; return calcFSize(pSize, ++pDiv); } then divide each font size by the scale, draw the text and scale the whole text block by 100 * scale. Hope that helps. Regards, On Fri, 09 Dec 2005 02:31:48 -0300, Dhiraj Girdhar <[EMAIL PROTECTED]> wrote: Hi, Does anyone know about what is the maximum font size can be given toHTML text in Flash? If I create a HTML text field and change the font size to > 127 pt, when I compare the SWF text size and text size in Flash authoring, SWF text size is smaller than what is in the authoring. When I trace textField.htmlText the size comes out to be 127, but it writes the correct HTML tags to SWF file with whatever size was given. I couldn't figure out about this type of behavior? Does anyone have clue about this? Regards: Dhiraj ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders -- _____ Marcelo Volmaro ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] scrollRect.height?
mainMenu.scrollRect.height = 50; mainMenu.scrollRect = mainMenu.scrollRect; You need to re-set the rectangle (setting it to itself do the work). On Sat, 08 Oct 2005 09:43:32 -0300, Kent Humphrey <[EMAIL PROTECTED]> wrote: Hey guys, this is my first post, so excuse me if I misbehave ;> I'm trying to come to grips with scrollRect. I have applied it to a MC, no problem, using a new Rectangle. I can see the width, height, x, and y of the scrollRect, but I can't change them. Here is my code: var rect:Rectangle = new flash.geom.Rectangle(475,41,286,as2obj.main.length*20+8); mainMenu.scrollRect = rect; And this will tell me the height of the scrollRect: trace(mainMenu.scrollRect.height); But how do I change the height? This doesn't work: mainMenu.scrollRect.height = 50; So I'm guessing it's properties can be tested but not set? The docs (http://livedocs.macromedia.com/flash/8/main/wwhelp/wwhimpl/js/html/wwhelp.htm?href=2513.html) don't list the properties of scrollRect so I'm kinda shooting in the dark here. Do I have to change the Rectangle's height? How do I access that? Thankyou for your time. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders -- Using Opera's revolutionary e-mail client: http://www.opera.com/mail/ ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders