[Flashcoders] targeting classes in a loaded swf
what is the best oop way to do this: after I init a controller class the controller class loads in a swf. loaded swf initiates it's own class to handle it's ui. now I want to reference public functions and properties in that loaded swf's initiated ui class from the controller. I will use event listeners for the big events. but I want to have pointers in the controller for other stuff. in theory classes/objects could ref each other via these pointers in the controller. ok. so currently controller can target the swf. it knows that path cause it created / loaded it. but at this point the controller does not know the name of the ui class in the loaded swf. it does not know that swf 1, for example, was initiated by saying ... var ui = new UI() on frame 1. solution? 1) I could have an agreed upon object name in the loaded swf so the controller knows it can say: loadedMovie.ui.someValue and it will be targeting the correct object? but that seems wack. and not very oop. 2) I could have the swf load, init and then call back to the controller passing a ref to itself. and then do something in the controller. all of the above is easy for me with mc's but I am not figuring it out with swfs. damn. I hope the above makes sense. you are the best! thanks cp ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] can we cancel Up/Downloads of flash.net.FileReference.*
Ryan Matsikas schrieb: Look harder? fileRef.cancel(); On 11/9/05, Michael Stuhr [EMAIL PROTECTED] wrote: the subject says it all. i've looked in the man but didn't find anything ... ouch ... but it seems 3 months to look it up was worth a qeuestion, don't you think? :-) thanks --- now, what was the job i needed THAT for ... ::grumble:: micha ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Why didn't I listen in maths class...
x = r * sinA / (1 - sinA) (Math teachers told my daughter yesterday she'd need sin and cos someday so she came home and made me give her three examples of how/why I've used it with flash -- if anyone has any good ones besides eyes following mouse, moving object on a line relative to horizon, 3d, making a dial spin, I'd be happy to have more to pass on to her) Helen David Peek wrote: Hi List, I'm trying to figure out what radius to make n number of circles fit around a circle of radius r. Several diagrams later I'd got it down to: sinA = x / (x + r) Where A is half the angle required by each circle ((360/n)/2), x is the radius we're looking for and r is the radius of the circle in the middle. Sadly my maths just aren't up to solving for x... Maths teachers are always teeling you you'll need algebra one day... Luckily there's a Flashcoders :P Many thanks, David ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
[Flashcoders] Accessibility
Hi there I have developed a childrens entertainment site in Flash MX 2004 and now the client has just asked whether the site is priority 12 accessible Anyone have any idea what this involves and what I need to do to ensure this. Many thanks Paul ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Accessibility
Hi, i think u can find more about it here: http://www.w3.org/TR/WCAG10/ http://www.accessibility.nl/internet/ebrochure/brochure/contents.htm The table of contents lists priorities, but they refer to the other guidelines. I think it might involve a lot of work if your site is already finished ;). greetz Hans At 03:25 PM 12/3/2005, you wrote: Hi there I have developed a childrens entertainment site in Flash MX 2004 and now the client has just asked whether the site is priority 12 accessible Anyone have any idea what this involves and what I need to do to ensure this. Many thanks Paul ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
[Flashcoders] FLAMES wine and coffee, leaving no trace
Hi there, Just getting into authoring swf on linux. setup Fedora core 4, eclipse 3.1, latest mtasc, asdt and wine to run the flashplayer 8. I don't get flashout working, gives me an error when I click on a flashout file in eclipse (maybe due my java 1.4 version ?). So I was trying the asdt logger which I instruct to log via mtasc - ant-- mtasc -trace=Log.addMessage. I first got some security warnings on the flashplayer (which prooves there is commincation going on) till I used the -version = 8 tag in mtasc. Started the AS logger and inmplemented in the main function trace(message,Log.INFO). I just don't get anything to log. Is it mallfunctioning trough my wine setup, communicating as the sequrity message said from virtual wine-drive Z:/root/workspace/MyApp/build/new.SWF with 127.0.0.1. ( I also included the allowdomain(*) stuff to be sure) or is it possibly something else ? I'd love to make and see flash 8 content on NIX, including tracing. Any ideas what i couldd do or dubbelcheck ? thanx, Stijn aka Latcho www . greencollective . nl ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
[Flashcoders] Microsoft tweaks browser to avoid liability
Can anyone clarify please what changes will now need to be made by Flash authors ? CNET article yesterday: -- Microsoft tweaks browser to avoid liability -- Microsoft is changing the way its Web browser handles certain controls in an effort to shield itself from liability in an ongoing patent spat with a start-up backed by the University of California. see the full text article here: http://news.com.com/Microsoft+tweaks+browser+to+avoid+liability/2100-1012_3-5980658.html thanks ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
[Flashcoders] Loading a compressed movie
Hi folks, Can someone explain me how do Flash behave when it loads a compressed external flash. He is still able to play the first frames, eventhough he don't get the whole file. Do that mean that the compression algorithm is used directly when receiving data ? Do this algo (ZLib I presume) can be launch on portions ? Thanks for your enlightments, guys and gals. --- erixtekila http://blog.v-i-a.net/ ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
R: [Flashcoders] iRiver U10
Hi Eric, join and ask this to FlashLite Yahoo list. iRiver U10 has the FalshLite player embedded :) Have also a read on Macromedia Dev Net section; there is an article by Johnathan Duran. regards marco casario http://casario.blogs.com Messaggio originale Da: [EMAIL PROTECTED] Data: 2-dic-2005 14.56 A: Flashcoders mailing list flashcoders@chattyfig.figleaf.com Ogg: [Flashcoders] iRiver U10 Has anyone developed anything for the U10 yet? What I am wondering about is how the default functionality is playing audio/etc. Is the Flash OS wrapped in something with makes calls to the default music player/video player, etc? Does the Flash OS get the list of available tracks/videos/etc from something, through a wrapper, into the SWF? I am looking into how to develop things other than standalone games on the U10. Is there a CDK coming soon for the U10? I heard rumor there is one in the works. Or maybe its out and I don't know about it yet? BTW - parts of the U10 are nice, but if you got at all lost on an iPod, you'll really get lost in the UI of this device - a pretty bad UI in my opinion. - edolecki ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http: //chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] targeting classes in a loaded swf
I'd look into LocalConnection. It sounds like you're trying to figure out how to avoid dependencies between objects, which (to me) makes sense. Rather than over-design and make things work in a complicated way, you can use LocalConnection to init your child clips from your controller: receiving_lc = new LocalConnection; receiving_lc.init = function() { this.c.init(); // Calls your clip's init }; receiving_lc.connect(lc_name); In your main application: var sending_lc2:LocalConnection = new LocalConnection(); sending_lc2.send(lc_name, init); hth, Mike ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
[Flashcoders] IE and EOLAS to no end
http://msdn.microsoft.com/ieupdate/default.asp (german news: http://www.heise.de/newsticker/meldung/66936) thanks to MS - i don't support IE anymore - micha ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
[Flashcoders] Disabling Buttons / Actions - FLASH 6
Hello, Here is my need. I have a rectangular clip (clipA) on the stage that does not move. I have a scrollable mc (clipB) that lays underneath clipA but is much longer and scrolls up and down underneath clipA. When someone clicks on clipA, I do not want ANY button or mc actions beneath it to be activated. However, if they click on clipB outside the clipA bounds, such actions should occur. I have tried many combinations of enable=false, fake shields beneath and so on to no avail. Anybody got a good suggestion on this? What sayeth the group? Jay FlashBOMB.com ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Microsoft tweaks browser to avoid liability
Watch this space: http://www.macromedia.com/devnet/activecontent/ JD reported on it here: http://weblogs.macromedia.com/jd/archives/2005/12/eolas_re-re-re-.cfm Jeffrey Zeldman has a fallout article from 2 years ago about it. This was the time when the FUD was reaching its apex: Eolas: first fallout http://www.zeldman.com/daily/0903c.shtml If you followed the link, through the plethora of discussions, it all falls down to controls don't work until you click on them. They still respond to JavaScript on the page, such as: myFlashMovie.focus(); To allow them to be immediately available, you simply use JavaScript to dynamically write the code, such as FlashObject.js. While technically this is a minute change, it has far reaching implications on existing content where the simple suggestion above doesn't work as intended, or at all. Even worse is this is Microsoft taking the initiaitive, to pretty much protect themselves now, so if things do NOT go their way, they are already technical compliant. They feel that their changes do 2 things, first, quell the uneasiness that this lawsuit has caused over the past 2 years, and second, protects the for the future. They are wrong on both accounts. The first, revives ALL the email threads, forum posts, and technical articles put out by large companies such as Real, Apple, Macromedia, etc. on how to ensure your existing and new content works with the changes. It does little to quell anything, and rather makes all of this resurface. Secondly, there is no guarentee that EOLAS won't sue on their current implementation. I couldn't find the link, but basically I think ICANN pleaded with the US government that if they didn't take action on this patent case, it would negatively affect the way the internet works. That got their attention, and slowed the case to a crawl. Anyway, Jeffrey's final comments eximplfy the FUD: ...Few of Happy Cog's commercial sites have used embedded media. We are reluctant to wake old clients from their dream that all is well, and convince them to let us recode old sites, only to discover in another few weeks that Eolas is suing again. - Original Message - From: Jason Cunliffe [EMAIL PROTECTED] To: Flashcoders Mailing List flashcoders@chattyfig.figleaf.com Sent: Saturday, December 03, 2005 10:59 AM Subject: [Flashcoders] Microsoft tweaks browser to avoid liability Can anyone clarify please what changes will now need to be made by Flash authors ? CNET article yesterday: -- Microsoft tweaks browser to avoid liability -- Microsoft is changing the way its Web browser handles certain controls in an effort to shield itself from liability in an ongoing patent spat with a start-up backed by the University of California. see the full text article here: http://news.com.com/Microsoft+tweaks+browser+to+avoid+liability/2100-1012_3-5980658.html thanks ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
[Flashcoders] Split String
Can anyone point me in the right direction on how to split a string using a special character(/). this is my first line / this is my second line / etc... Thanks! ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Split String
str = hello/this is a new line/and so is this; str = str.split(/).join(\n); - Original Message - From: [EMAIL PROTECTED] To: Flashcoders@chattyfig.figleaf.com Sent: Saturday, December 03, 2005 2:15 PM Subject: [Flashcoders] Split String Can anyone point me in the right direction on how to split a string using a special character(/). this is my first line / this is my second line / etc... Thanks! ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Microsoft tweaks browser to avoid liability
Digg.com's link has a better write up of the interaction changes: http://www.eweek.com/article2/0,1895,1895907,00.asp However, the quote: ...Instead of non-stop dialog boxes, the page will load normally now and won't be as disruptive. It will only require a click to activate [the control] if the user wants to interact with it,... Doesn't explain if Flash movie's need to have the user click on them before they can play, like FlashBlock. - Original Message - From: JesterXL [EMAIL PROTECTED] To: Flashcoders mailing list flashcoders@chattyfig.figleaf.com Sent: Saturday, December 03, 2005 1:53 PM Subject: Re: [Flashcoders] Microsoft tweaks browser to avoid liability Watch this space: http://www.macromedia.com/devnet/activecontent/ JD reported on it here: http://weblogs.macromedia.com/jd/archives/2005/12/eolas_re-re-re-.cfm Jeffrey Zeldman has a fallout article from 2 years ago about it. This was the time when the FUD was reaching its apex: Eolas: first fallout http://www.zeldman.com/daily/0903c.shtml If you followed the link, through the plethora of discussions, it all falls down to controls don't work until you click on them. They still respond to JavaScript on the page, such as: myFlashMovie.focus(); To allow them to be immediately available, you simply use JavaScript to dynamically write the code, such as FlashObject.js. While technically this is a minute change, it has far reaching implications on existing content where the simple suggestion above doesn't work as intended, or at all. Even worse is this is Microsoft taking the initiaitive, to pretty much protect themselves now, so if things do NOT go their way, they are already technical compliant. They feel that their changes do 2 things, first, quell the uneasiness that this lawsuit has caused over the past 2 years, and second, protects the for the future. They are wrong on both accounts. The first, revives ALL the email threads, forum posts, and technical articles put out by large companies such as Real, Apple, Macromedia, etc. on how to ensure your existing and new content works with the changes. It does little to quell anything, and rather makes all of this resurface. Secondly, there is no guarentee that EOLAS won't sue on their current implementation. I couldn't find the link, but basically I think ICANN pleaded with the US government that if they didn't take action on this patent case, it would negatively affect the way the internet works. That got their attention, and slowed the case to a crawl. Anyway, Jeffrey's final comments eximplfy the FUD: ...Few of Happy Cog's commercial sites have used embedded media. We are reluctant to wake old clients from their dream that all is well, and convince them to let us recode old sites, only to discover in another few weeks that Eolas is suing again. - Original Message - From: Jason Cunliffe [EMAIL PROTECTED] To: Flashcoders Mailing List flashcoders@chattyfig.figleaf.com Sent: Saturday, December 03, 2005 10:59 AM Subject: [Flashcoders] Microsoft tweaks browser to avoid liability Can anyone clarify please what changes will now need to be made by Flash authors ? CNET article yesterday: -- Microsoft tweaks browser to avoid liability -- Microsoft is changing the way its Web browser handles certain controls in an effort to shield itself from liability in an ongoing patent spat with a start-up backed by the University of California. see the full text article here: http://news.com.com/Microsoft+tweaks+browser+to+avoid+liability/2100-1012_3-5980658.html thanks ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
SV: [Flashcoders] Split String
This is true but beware of a bug in 7.0.14 player which causes a replace at the very end of the string to fail when doing it this way. The bug is related to a different behaviour in thesplit method which fails to divide the string into ie. two pieces when the phrase is at the very end of the string. I solved it by allways add an extra unique char sequence to every string that I wanted to do a replaceon. Below is my bullet proof version:-) /** Searches a sTxt for sFind and replaces sFind with sReplace */ public static function replace(sTxt:String,sFind:String,sReplace:String, b:Boolean) { //Fix bug in fp 7.0.14 by adding a random char sequence in the end //of the string and then remove it again before returning sTxt += |?*; var sChanged:String = sTxt.split(sFind).join(sReplace); return sChanged.substr(0, sChanged.length - 3); } If you don't support player 7 you don't need to worry ;-) /Martin Baltzer Fra: [EMAIL PROTECTED] på vegne af JesterXL Sendt: lø 03-12-2005 20:12 Til: Flashcoders mailing list Emne: Re: [Flashcoders] Split String str = hello/this is a new line/and so is this; str = str.split(/).join(\n); - Original Message - From: [EMAIL PROTECTED] To: Flashcoders@chattyfig.figleaf.com Sent: Saturday, December 03, 2005 2:15 PM Subject: [Flashcoders] Split String Can anyone point me in the right direction on how to split a string using a special character(/). this is my first line / this is my second line / etc... Thanks! ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Split String
Nice! I forgot all about that, but remember getting bitten. Cool function! - Original Message - From: Martin Baltzer [EMAIL PROTECTED] To: Flashcoders mailing list flashcoders@chattyfig.figleaf.com; Flashcoders mailing list flashcoders@chattyfig.figleaf.com Sent: Saturday, December 03, 2005 2:25 PM Subject: SV: [Flashcoders] Split String This is true but beware of a bug in 7.0.14 player which causes a replace at the very end of the string to fail when doing it this way. The bug is related to a different behaviour in thesplit method which fails to divide the string into ie. two pieces when the phrase is at the very end of the string. I solved it by allways add an extra unique char sequence to every string that I wanted to do a replaceon. Below is my bullet proof version:-) /** Searches a sTxt for sFind and replaces sFind with sReplace */ public static function replace(sTxt:String,sFind:String,sReplace:String, b:Boolean) { //Fix bug in fp 7.0.14 by adding a random char sequence in the end //of the string and then remove it again before returning sTxt += |?*; var sChanged:String = sTxt.split(sFind).join(sReplace); return sChanged.substr(0, sChanged.length - 3); } If you don't support player 7 you don't need to worry ;-) /Martin Baltzer Fra: [EMAIL PROTECTED] på vegne af JesterXL Sendt: lø 03-12-2005 20:12 Til: Flashcoders mailing list Emne: Re: [Flashcoders] Split String str = hello/this is a new line/and so is this; str = str.split(/).join(\n); - Original Message - From: [EMAIL PROTECTED] To: Flashcoders@chattyfig.figleaf.com Sent: Saturday, December 03, 2005 2:15 PM Subject: [Flashcoders] Split String Can anyone point me in the right direction on how to split a string using a special character(/). this is my first line / this is my second line / etc... Thanks! ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Disabling Buttons / Actions - FLASH 6
myButton.enabled=false not enable MW - Original Message - From: Jay Lepore [EMAIL PROTECTED] To: 'Flashcoders Mailing List' flashcoders@chattyfig.figleaf.com Sent: Saturday, December 03, 2005 7:26 PM Subject: [Flashcoders] Disabling Buttons / Actions - FLASH 6 Hello, Here is my need. I have a rectangular clip (clipA) on the stage that does not move. I have a scrollable mc (clipB) that lays underneath clipA but is much longer and scrolls up and down underneath clipA. When someone clicks on clipA, I do not want ANY button or mc actions beneath it to be activated. However, if they click on clipB outside the clipA bounds, such actions should occur. I have tried many combinations of enable=false, fake shields beneath and so on to no avail. Anybody got a good suggestion on this? What sayeth the group? Jay FlashBOMB.com ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
SV: [Flashcoders] Disabling Buttons / Actions - FLASH 6
One easy solution is to add a transparent movieclip (cover) at a depth between between Clip A and Clip B which is big enough to cover clip B fully . Give the cover clip an onRelease handler and clip B is no longer clickable. Finally set the handCursor to false to remove it ;-) /Martin Baltzer Fra: [EMAIL PROTECTED] på vegne af Jay Lepore Sendt: lø 03-12-2005 19:26 Til: 'Flashcoders Mailing List' Emne: [Flashcoders] Disabling Buttons / Actions - FLASH 6 Hello, Here is my need. I have a rectangular clip (clipA) on the stage that does not move. I have a scrollable mc (clipB) that lays underneath clipA but is much longer and scrolls up and down underneath clipA. When someone clicks on clipA, I do not want ANY button or mc actions beneath it to be activated. However, if they click on clipB outside the clipA bounds, such actions should occur. I have tried many combinations of enable=false, fake shields beneath and so on to no avail. Anybody got a good suggestion on this? What sayeth the group? Jay FlashBOMB.com ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Split String
string.split(/)? Can anyone point me in the right direction on how to split a string using a special character(/). this is my first line / this is my second line / etc... Thanks! ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
SV: [Flashcoders] Split String
Yes...but just ignore the boolean arg which has no purpose at all - somekind of leftover ;-) Fra: [EMAIL PROTECTED] på vegne af JesterXL Sendt: lø 03-12-2005 20:28 Til: Flashcoders mailing list Emne: Re: [Flashcoders] Split String Nice! I forgot all about that, but remember getting bitten. Cool function! - Original Message - From: Martin Baltzer [EMAIL PROTECTED] To: Flashcoders mailing list flashcoders@chattyfig.figleaf.com; Flashcoders mailing list flashcoders@chattyfig.figleaf.com Sent: Saturday, December 03, 2005 2:25 PM Subject: SV: [Flashcoders] Split String This is true but beware of a bug in 7.0.14 player which causes a replace at the very end of the string to fail when doing it this way. The bug is related to a different behaviour in thesplit method which fails to divide the string into ie. two pieces when the phrase is at the very end of the string. I solved it by allways add an extra unique char sequence to every string that I wanted to do a replaceon. Below is my bullet proof version:-) /** Searches a sTxt for sFind and replaces sFind with sReplace */ public static function replace(sTxt:String,sFind:String,sReplace:String, b:Boolean) { //Fix bug in fp 7.0.14 by adding a random char sequence in the end //of the string and then remove it again before returning sTxt += |?*; var sChanged:String = sTxt.split(sFind).join(sReplace); return sChanged.substr(0, sChanged.length - 3); } If you don't support player 7 you don't need to worry ;-) /Martin Baltzer Fra: [EMAIL PROTECTED] på vegne af JesterXL Sendt: lø 03-12-2005 20:12 Til: Flashcoders mailing list Emne: Re: [Flashcoders] Split String str = hello/this is a new line/and so is this; str = str.split(/).join(\n); - Original Message - From: [EMAIL PROTECTED] To: Flashcoders@chattyfig.figleaf.com Sent: Saturday, December 03, 2005 2:15 PM Subject: [Flashcoders] Split String Can anyone point me in the right direction on how to split a string using a special character(/). this is my first line / this is my second line / etc... Thanks! ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Split String
try this: var yourString = string; var temp = yourString .split(§); var firstLine = temp[0]; var secondLine = temp[1]; var thirdLine = temp[2]; etc. etc... Enrico Tomaselli + web designer + [EMAIL PROTECTED] http://www.metatad.it ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Microsoft tweaks browser to avoid liability
More Flash technical discussion on what you can do: http://www.rewindlife.com/archives/86.cfm - Original Message - From: JesterXL [EMAIL PROTECTED] To: Flashcoders mailing list flashcoders@chattyfig.figleaf.com Sent: Saturday, December 03, 2005 2:19 PM Subject: Re: [Flashcoders] Microsoft tweaks browser to avoid liability Digg.com's link has a better write up of the interaction changes: http://www.eweek.com/article2/0,1895,1895907,00.asp However, the quote: ...Instead of non-stop dialog boxes, the page will load normally now and won't be as disruptive. It will only require a click to activate [the control] if the user wants to interact with it,... Doesn't explain if Flash movie's need to have the user click on them before they can play, like FlashBlock. - Original Message - From: JesterXL [EMAIL PROTECTED] To: Flashcoders mailing list flashcoders@chattyfig.figleaf.com Sent: Saturday, December 03, 2005 1:53 PM Subject: Re: [Flashcoders] Microsoft tweaks browser to avoid liability Watch this space: http://www.macromedia.com/devnet/activecontent/ JD reported on it here: http://weblogs.macromedia.com/jd/archives/2005/12/eolas_re-re-re-.cfm Jeffrey Zeldman has a fallout article from 2 years ago about it. This was the time when the FUD was reaching its apex: Eolas: first fallout http://www.zeldman.com/daily/0903c.shtml If you followed the link, through the plethora of discussions, it all falls down to controls don't work until you click on them. They still respond to JavaScript on the page, such as: myFlashMovie.focus(); To allow them to be immediately available, you simply use JavaScript to dynamically write the code, such as FlashObject.js. While technically this is a minute change, it has far reaching implications on existing content where the simple suggestion above doesn't work as intended, or at all. Even worse is this is Microsoft taking the initiaitive, to pretty much protect themselves now, so if things do NOT go their way, they are already technical compliant. They feel that their changes do 2 things, first, quell the uneasiness that this lawsuit has caused over the past 2 years, and second, protects the for the future. They are wrong on both accounts. The first, revives ALL the email threads, forum posts, and technical articles put out by large companies such as Real, Apple, Macromedia, etc. on how to ensure your existing and new content works with the changes. It does little to quell anything, and rather makes all of this resurface. Secondly, there is no guarentee that EOLAS won't sue on their current implementation. I couldn't find the link, but basically I think ICANN pleaded with the US government that if they didn't take action on this patent case, it would negatively affect the way the internet works. That got their attention, and slowed the case to a crawl. Anyway, Jeffrey's final comments eximplfy the FUD: ...Few of Happy Cog's commercial sites have used embedded media. We are reluctant to wake old clients from their dream that all is well, and convince them to let us recode old sites, only to discover in another few weeks that Eolas is suing again. - Original Message - From: Jason Cunliffe [EMAIL PROTECTED] To: Flashcoders Mailing List flashcoders@chattyfig.figleaf.com Sent: Saturday, December 03, 2005 10:59 AM Subject: [Flashcoders] Microsoft tweaks browser to avoid liability Can anyone clarify please what changes will now need to be made by Flash authors ? CNET article yesterday: -- Microsoft tweaks browser to avoid liability -- Microsoft is changing the way its Web browser handles certain controls in an effort to shield itself from liability in an ongoing patent spat with a start-up backed by the University of California. see the full text article here: http://news.com.com/Microsoft+tweaks+browser+to+avoid+liability/2100-1012_3-5980658.html thanks ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
[Flashcoders] Applying tween class to textfields
I am trying to apply a tween class to a textfield. Nothing I do to it seems to work. Ive tried using the class on the textfield itself as well as placing it in a movieclip first and applying the class to that. Is there something im missing? ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Applying tween class to textfields
I am trying to apply a tween class to a textfield. Nothing I do to it seems to work. Ive tried using the class on the textfield itself as well as placing it in a movieclip first and applying the class to that. Is there something im missing? It depends on the class. No one can tell you in advance without knowing what you're using and how. - zeh ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Applying tween class to textfields
Sorry its still early ;) This is the movieclip tweening prototype I am using. It says it works with textfields as well but no luck so far. http://laco.wz.cz/tween/ Thanks ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] targeting classes in a loaded swf
Of course you want to retain a synchronous relationship (much faster than LocalConnection). I'm not sure if this UI object you create is a singleton but the best way to handle this situation is to use it's class to hold a static pointer to the instance. for example class UI { private static var instance:UI; public static function getInstance():UI { if (instance == undefined) { instance = new UIController; } return instance; } } on frame 1 of the swf: var ui = UI.getInstance(); same thing in your controller: UI.getInstance(); even if it's not a singleton you can use a similar method with only some minor tweaks. class UI { public static var instance:UI; function UI() { if (instance == undefined) { instance = this; } } } this way your class will hold a reference to the first instance created, and you'd still have on your timeline: var ui = new UI() This is the perfect way of getting a reference to a major object because now the instance and class are always shipped together, one nice little package. Your AS 2.0 classes are defined on the _global object so everyone has reference to them, and you're not making some extra (non-oop) reference floating on the _global object that you can't track where it came from or who's using it. hope this helps! Tyler On 12/3/05, Mike Britton [EMAIL PROTECTED] wrote: I'd look into LocalConnection. It sounds like you're trying to figure out how to avoid dependencies between objects, which (to me) makes sense. Rather than over-design and make things work in a complicated way, you can use LocalConnection to init your child clips from your controller: receiving_lc = new LocalConnection; receiving_lc.init = function() { this.c.init(); // Calls your clip's init }; receiving_lc.connect(lc_name); In your main application: var sending_lc2:LocalConnection = new LocalConnection(); sending_lc2.send(lc_name, init); hth, Mike ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
[Flashcoders] where and how can I learn actionscript bytecode
Is there any tools or documentation out there that will aid in learning actionscript bytecode? I ran into this the other day, and it seems like only reading the bytecode can help me understand why it doesn't work? class A { function destroy() { delete this; // doesn't delete itself } } var a = new A(); delete a; // delete works here - boon __ Start your day with Yahoo! - Make it your home page! http://www.yahoo.com/r/hs ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] where and how can I learn actionscript bytecode
At 12:40 PM 12/3/2005 -0800, you wrote: Is there any tools or documentation out there that will aid in learning actionscript bytecode? Flasm is a good start, http://flasm.sourceforge.net/ have fun! - jim 2112 FX :: Singularity [Business Intelligence][Custom Programming] Flash Math Blog :: www.2112fx.com/blog ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] List Component
I'm not saying the components aren't good, I've not used them myself, but maybe he can't afford it. They do cost money. Also if we let the components do everything for us, it makes us lazy developers. What he needs to do can easily be accomplished in a short amount of time (depending on skill). At the end of the day it's his call (or his bosses), I was just giving him another option. Cheers, Ryan On 12/2/05, Al Veldhuis [EMAIL PROTECTED] wrote: Hey Ryan, I know. I know. Its not a hard thing to write but what I generally work on is an Intranet where bandwidth isn't an issue, but developing speed is. So the components are a simple and quick way to get the job done effectively. And to be honest, as far as components go, Ghostwire components are top-notch. Al Ryan Matsikas wrote: or instead of buying another component set why not just write a more capable row renderer.. there's plenty of tutorials. On 12/2/05, Al Veldhuis [EMAIL PROTECTED] wrote: Hey John, Just as a suggestion, check out the ghostwire components at http://ghostwire.com They have a list component that I believe is capable of what you are looking to do. I believe you can use either symbols or external files with their list component. Just a possible suggestion. Note: I do not work for them, I just use their components regularily. Al John Giotta wrote: The List Component allows you to set linked symbols as Icons for each list item. I'm looking to use external thumbnails as my icons, but it tends to prove difficult due to the nature of how these symbols are attached. Does anyone know if I'm able to retrieve the 'icon' path and perhaps with some class registration set the content to load a thumbnail? Ideally, I'd like to able to say List.ListItem.icon.loadThumbNailSrc(), just of course not in so many dot notations. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
[Flashcoders] Creating an OS X app with a Flash Projector
Hi all, if you are an OS X user this may be of interest to you. It's a small tutorial on creating a Mac OS X application and using your Flash Projector as the runtime engine. It's an OS X only solution but the advantage is that you're delivering a single executable to your client with all the content neatly hidden from view inside the .app package. I spent a day figuring it out, so I thought I'd share the experience. http://www.karbonized.com/flash2app/ ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Creating an OS X app with a Flash Projector
Very interesting point. Thanks. Le 3 déc. 05, à 22:07, Simon Lord a écrit : Hi all, if you are an OS X user this may be of interest to you. It's a small tutorial on creating a Mac OS X application and using your Flash Projector as the runtime engine. It's an OS X only solution but the advantage is that you're delivering a single executable to your client with all the content neatly hidden from view inside the .app package. I spent a day figuring it out, so I thought I'd share the experience. http://www.karbonized.com/flash2app/ ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders --- erixtekila http://blog.v-i-a.net/ ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
[Flashcoders] How to make a class instance self-destructible?
I am trying to get a class to destroy itself, calling delete obj looks too unnatural, amidst all OO code. Could someone explain why the following doesn't work? The following code doesn't work, is there another way to achieve this? Also, class A { function destroy() { delete this; // doesn't delete itself } } var a = new A(); delete a; // delete works here - Yahoo! DSL Something to write home about. Just $16.99/mo. or less ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
[Flashcoders] How to update components on stage?
Hi, I created a component today, subclassing it from MovieClip (it's my first component, so excuse me for my newbie question). I realize that everytime I update the Inspectable( ) in the AS file, I have to reopen the movieclip component, click OK to have it updated with the new change. But the components already on stage don't pick up the update. And I can't find a way for them to pick up the update, short of putting the component on stage again. Could someone help? - boon - Yahoo! Personals Let fate take it's course directly to your email. See who's waiting for you Yahoo! Personals ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] How to make a class instance self-destructible?
On 12/3/05, Boon Chew [EMAIL PROTECTED] wrote: I am trying to get a class to destroy itself, calling delete obj looks too unnatural, amidst all OO code. Could someone explain why the following doesn't work? The following code doesn't work, is there another way to achieve this? Also, class A { function destroy() { delete this; // doesn't delete itself } } var a = new A(); delete a; // delete works here 'delete' only removes the reference, not the actual object. There is no way to actually destroy an object. All you can do is remove all references to it, and wait for the GC to remove it from memory at some unspecified time. var obj = {data:5}; var obj_ref = obj; obj_ref.data = 6; // this proves that it's a reference, and not a copy: both show the same // value, even though I only changed one trace(obj.data); // 6 trace(obj_ref.data); // 6 // delete the reference delete obj; // as you can see, the object itself was not deleted, only that // particular reference. trace(obj.data); // undefined trace(obj_ref.data); // 6 -David R ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Loading a compressed movie
On 12/3/05, erixtekila [EMAIL PROTECTED] wrote: Hi folks, Can someone explain me how do Flash behave when it loads a compressed external flash. He is still able to play the first frames, eventhough he don't get the whole file. Do that mean that the compression algorithm is used directly when receiving data ? Do this algo (ZLib I presume) can be launch on portions ? Yeah, zlib can decompress as it gets the data, it doesn't need the whole data in order to start. -David R ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
[Flashcoders] Flash is a single-threaded app? Maybe it's just the AVM? or...
I have read in this forum that someone loosely coined the phrase Flash is a single thread app, it's hard to imagine something as high performance and intricate as Flash to be a single-threaded app. So I started to take the above statement to mean that the Actionscript VM executes all the code in a sequential fashion but that Flash player itself is multithreaded, is that a right assumption? And what about code that are asynchronous in nature, such as sound playing ( new Sound(), onSoundComplete), server-side call return (such as LoadVars, XML.onLoad)? Are these all happening in the single thread of code execution? Looks like a book on Flash and AVM Internal would be nice. :) - boon - Yahoo! Personals Single? There's someone we'd like you to meet. Lots of someones, actually. Try Yahoo! Personals ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Flash is a single-threaded app? Maybe it's just the AVM? or...
This is correct. There are certainly multiple threads in the flash player. But The AVM does not allow applications to spawn threads directly. However things like sound and video and probably other things execute in separate threads. I am not familiar with the flash source but it is likely that async communications is also handled by separate threads. Regards Hank On 12/3/05, Boon Chew [EMAIL PROTECTED] wrote: I have read in this forum that someone loosely coined the phrase Flash is a single thread app, it's hard to imagine something as high performance and intricate as Flash to be a single-threaded app. So I started to take the above statement to mean that the Actionscript VM executes all the code in a sequential fashion but that Flash player itself is multithreaded, is that a right assumption? And what about code that are asynchronous in nature, such as sound playing ( new Sound(), onSoundComplete), server-side call return (such as LoadVars, XML.onLoad)? Are these all happening in the single thread of code execution? Looks like a book on Flash and AVM Internal would be nice. :) - boon - Yahoo! Personals Single? There's someone we'd like you to meet. Lots of someones, actually. Try Yahoo! Personals ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
[Flashcoders] motion detection
hi i was wondering what luck people have had with motion detection. i have been doing motion detection in processing for quite some time, but haven't have too much luck in flash,because of speed issues. i can get basic difference images etc. as per guy watson's tutorial on macromedia, and then get a motion point, but am wondering what the trick is in flash to get more point specific stuff like this without killing the processor http://www.benga.li/cam_exp/cameraActivity_07.swf any hints/code would be much appreciated. thanks all the best george ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
RE: [Flashcoders] where and how can I learn actionscript bytecode
Boon, Use FLASM. It provides text output representing AS Bytecode. http://flasm.sourceforge.net/ Simply do this: // decompress the AS block using zlib flasm -x myfile.swf // read the bytecode into a text file flasm -d myfile.swf myfile.flm Open myfile.flm to see all the bytecode instructions. Flasm is still my favorite Flash tool and scripting Flasm with Python is a hell of allot of fun. Cheers, Ted ;) -Original Message- From: [EMAIL PROTECTED] [mailto:flashcoders- [EMAIL PROTECTED] On Behalf Of Boon Chew Sent: Saturday, December 03, 2005 10:41 PM To: flashcoders@chattyfig.figleaf.com Subject: [Flashcoders] where and how can I learn actionscript bytecode Is there any tools or documentation out there that will aid in learning actionscript bytecode? I ran into this the other day, and it seems like only reading the bytecode can help me understand why it doesn't work? class A { function destroy() { delete this; // doesn't delete itself } } var a = new A(); delete a; // delete works here - boon __ Start your day with Yahoo! - Make it your home page! http://www.yahoo.com/r/hs ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders -- No virus found in this incoming message. Checked by AVG Free Edition. Version: 7.1.362 / Virus Database: 267.13.11/191 - Release Date: 12/2/2005 -- No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.1.362 / Virus Database: 267.13.11/191 - Release Date: 12/2/2005 ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders