[Flashcoders] javascript, externalinterface and swfobject part 2
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('div id=MediaPlayerContent here/div'); 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
Re: [Flashcoders] how to tell if you're running in the ide
I'm using CustomActions, i.e. : if ( CustomActions ){ // we're in the Flash IDE } else { // we're either in a browser or in the standalone player } HTH, stefan. On 1/26/07, Josh Santangelo [EMAIL PROTECTED] wrote: Is there a way for a SWF to know if it's running in the test movie environment vs the browser or standalone players? I often have a need to compile in different settings in test-movie than I do for deployment, and have to manually remember to take them out before shipping a build. Or is there a more elegant way to handle that sort of thing? -josh ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] Fonts on a Mac not working in Flash
just for fun some of the fonts get named differently when in the dropdown where for instance a bold version of a font would be named 'B Fontname' this happens to about 10% of my fonts, good thing is that they always are named that way so it isn't random. Flash is probably picking up on the internal naming of the font I guess. When using CSS or font on OSX you will have to use the name as in the dropdown. e.g. happy hunting cheers, mario On Jan 26, 2007, at 1:59 AM, Chris W. Paterson wrote: So, I copied them to the system library and even enable them in font book but the font will now show up in my font drop down... It works fine in photoshop. I tried restarting the flash IDE over and over and even rebooting my Mac like 6 times! it's an open type font (.otf). Has anyone ever had this problem? Thanks in advance! Chris __ __ Never miss an email again! Yahoo! Toolbar alerts you the instant new Mail arrives. http://tools.search.yahoo.com/toolbar/features/mail/ ___ 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] Tooltip for disabled buttons: Ideas?
Hello flashcoders, How did/would you implement showing a tooltip over a disabled button? The onRollOver/onRollOut events seem not to fire when a button is disabled. I see two solutions right now: 1. Add an onMouseMove listener (within MyButton extends Button) and check whether _xmouse/_ymouse coincide with MyButton's area (x+width/y+height). 2. Attach an additional MovieClip to every MyButton instance, set its depth to the top and its _alpha=0, and check for the onRollOver/onRollOut events on that MovieClip instance. Any thoughts on which one is better, or any other solutions? Thanks, stefan. ___ 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] Trace the _x and _y from node of Tree component
Hello, (first of all, sorry for my english) I have the Tree component in my scene and this is generated by a xml. It's working fine. But I want to know the _x and the _y of any tree node or folder, by passing mouse over them, with the function itemRollOver. For example, the Tree shows that: FOLDER SubFolder_A SubFolder_B SubFolder_B1 SubFolder_B2 SubFolder_B3 SubFolder_C If the mouse is over SubFolder_B1 the _x and the _y are diferent than SubFolder_A... I try with a Listener, like this: var listenerObject:Object = new Object(); listenerObject.itemRollOver = function(eventObject:Object) { trace(menuTree2.selectedNode._y); }; menuTree.addEventListener(itemRollOver, listenerObject); but the tracer is undefined. Somebody knows about it? Thanks a lot! ___ 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] AS3 properties woes
Thanks Steven In AS3 you can actually put code before a super() as you can in other methods in AS2. as i admitted, clearly need a some refactoringright now its just a prototype so i'm not too concerned On 1/24/07, Steven Sacks | BLITZ [EMAIL PROTECTED] wrote: I don't know about AS3 (and I can't imagine this is different from AS2) but you cannot put any code before super() in a constructor. super() must be the first line of code in a constructor. You should pass the labelClass value to the super constructor (watch your every move, super constructor). super(date); and in your parent function ClassName(lc:String) { labelClass = lc; } -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Keith Salisbury Sent: Wednesday, January 24, 2007 6:32 AM To: Flashcoders mailing list Subject: Re: [Flashcoders] AS3 properties woes Thanks guys, its was actually my fault, the example i gave was a little simpler than my real code, and i discovered i was calling setTitle from inside the super construtor, so obviously if i dont set my subclass variable before calling super() it wont use that variable. by changing the subclass constructor to this: public function DateMarker () { labelClass = date super(); } I have the desired functionalitythink i probably need to spend some time refactoring tho. The example i've given (aside from Petro's astute comment) should actually work as expected, not as i described!! Sorry for the distractions!!! ___ 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 -- [EMAIL PROTECTED] ___ 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] Trace the _x and _y from node of Tree component
Hi, i see menuTree*2*.selectedNode and menuTree.addEventListener? Beside that, might be a scoping/reference issue, your listener doesnt have a reference to the menuTree. greetz JC On 1/26/07, Lois IN [EMAIL PROTECTED] wrote: Hello, (first of all, sorry for my english) I have the Tree component in my scene and this is generated by a xml. It's working fine. But I want to know the _x and the _y of any tree node or folder, by passing mouse over them, with the function itemRollOver. For example, the Tree shows that: FOLDER SubFolder_A SubFolder_B SubFolder_B1 SubFolder_B2 SubFolder_B3 SubFolder_C If the mouse is over SubFolder_B1 the _x and the _y are diferent than SubFolder_A... I try with a Listener, like this: var listenerObject:Object = new Object(); listenerObject.itemRollOver = function(eventObject:Object) { trace(menuTree2.selectedNode._y); }; menuTree.addEventListener(itemRollOver, listenerObject); but the tracer is undefined. Somebody knows about it? Thanks a lot! ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] Invisible re-draw
Er, I'm pretty sure it won't redraw if nothing changes... I could be wrong though. Doesn't the debug version of the Flash Player plugin have an option to outline the stuff it's redrawing in red? h. On 26/01/07, Micky Hulse [EMAIL PROTECTED] wrote: Shang wrote: But I feel the Flash redraw itself all the time. your FPS decides how many times it redraw regardless of any changes. Ah, really? Even if timeline has hit a stop action and/or no animation is happening? Interesting... hmm, re-thinking my thinking here. Thanks for reply Shang, much appreciated. :) Cheers, Micky -- Wishlist: http://snipurl.com/vrs9 Switch: http://browsehappy.com/ BCC?: http://snipurl.com/w6f8 My: http://del.icio.us/mhulse ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] 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('div id=MediaPlayerContent here/div'); 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] Trace the _x and _y from node of Tree component
I'm sorry, but when I typing the code I forget this 2. The code is the same, and the listener is working, but I can't print the the _x _y: var listenerObject:Object = new Object(); listenerObject.itemRollOver = function(eventObject:Object) { trace(menuTree2.selectedNode._y); }; menuTree2.addEventListener (itemRollOver, listenerObject); 2007/1/26, Hans Wichman [EMAIL PROTECTED]: Hi, i see menuTree*2*.selectedNode and menuTree.addEventListener? Beside that, might be a scoping/reference issue, your listener doesnt have a reference to the menuTree. greetz JC On 1/26/07, Lois IN [EMAIL PROTECTED] wrote: Hello, (first of all, sorry for my english) I have the Tree component in my scene and this is generated by a xml. It's working fine. But I want to know the _x and the _y of any tree node or folder, by passing mouse over them, with the function itemRollOver. For example, the Tree shows that: FOLDER SubFolder_A SubFolder_B SubFolder_B1 SubFolder_B2 SubFolder_B3 SubFolder_C If the mouse is over SubFolder_B1 the _x and the _y are diferent than SubFolder_A... I try with a Listener, like this: var listenerObject:Object = new Object(); listenerObject.itemRollOver = function(eventObject:Object) { trace(menuTree2.selectedNode._y); }; menuTree.addEventListener(itemRollOver, listenerObject); but the tracer is undefined. Somebody knows about it? Thanks a lot! ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] Tooltip for disabled buttons: Ideas?
For the disabled state for our buttons we actually use a different movie clip. Basically, each button consists of a Button object and a Movie Clip with the image used for the disabled state. When the button is disabled we hide the Button and show the MC, and when it's enabled we do the opposite. Both the MC and the Button have the handlers for the tooltip. -Andy On 1/26/07, Stefan Thurnherr [EMAIL PROTECTED] wrote: Hello flashcoders, How did/would you implement showing a tooltip over a disabled button? The onRollOver/onRollOut events seem not to fire when a button is disabled. I see two solutions right now: 1. Add an onMouseMove listener (within MyButton extends Button) and check whether _xmouse/_ymouse coincide with MyButton's area (x+width/y+height). 2. Attach an additional MovieClip to every MyButton instance, set its depth to the top and its _alpha=0, and check for the onRollOver/onRollOut events on that MovieClip instance. Any thoughts on which one is better, or any other solutions? Thanks, stefan. ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] Invisible re-draw
lol, I'm not sure either. Wish someone really knows what's going on there come and enlighten us. On 1/26/07, Henry Cooke [EMAIL PROTECTED] wrote: Er, I'm pretty sure it won't redraw if nothing changes... I could be wrong though. Doesn't the debug version of the Flash Player plugin have an option to outline the stuff it's redrawing in red? h. On 26/01/07, Micky Hulse [EMAIL PROTECTED] wrote: Shang wrote: But I feel the Flash redraw itself all the time. your FPS decides how many times it redraw regardless of any changes. Ah, really? Even if timeline has hit a stop action and/or no animation is happening? Interesting... hmm, re-thinking my thinking here. Thanks for reply Shang, much appreciated. :) Cheers, Micky -- Wishlist: http://snipurl.com/vrs9 Switch: http://browsehappy.com/ BCC?: http://snipurl.com/w6f8 My: http://del.icio.us/mhulse ___ 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 -- /* Bored, sometimes. */ ___ 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] Invisible re-draw
The player draws constantly what is on stage. Vector takes more horses than bitmap (in fact unless a bitmap moves or changes, its static (won't be redrawn - hence the cacheAsBitmap option). - ericd. On 1/26/07, Shang [EMAIL PROTECTED] wrote: lol, I'm not sure either. Wish someone really knows what's going on there come and enlighten us. On 1/26/07, Henry Cooke [EMAIL PROTECTED] wrote: Er, I'm pretty sure it won't redraw if nothing changes... I could be wrong though. Doesn't the debug version of the Flash Player plugin have an option to outline the stuff it's redrawing in red? h. On 26/01/07, Micky Hulse [EMAIL PROTECTED] wrote: Shang wrote: But I feel the Flash redraw itself all the time. your FPS decides how many times it redraw regardless of any changes. Ah, really? Even if timeline has hit a stop action and/or no animation is happening? Interesting... hmm, re-thinking my thinking here. Thanks for reply Shang, much appreciated. :) Cheers, Micky -- Wishlist: http://snipurl.com/vrs9 Switch: http://browsehappy.com/ BCC?: http://snipurl.com/w6f8 My: http://del.icio.us/mhulse ___ 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 -- /* Bored, sometimes. */ ___ 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 -- eric e. dolecki senior interactive engineer http://www.ericd.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
Re: [Flashcoders] Invisible re-draw
eric dolecki wrote: The player draws constantly what is on stage. Vector takes more horses than bitmap (in fact unless a bitmap moves or changes, its static (won't be redrawn - hence the cacheAsBitmap option). I would have thought the rasterizer has at least some kind of dirty rectangle setup, hence the option to view redraw rectangles. ___ 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] how to tell if you're running in the ide
I've occasionally used the trick of checking whether this._url begins with file: Doesn't exactly tell you if you're running in the IDE, but does tell you whether it's running locally on your machine or in a browser, from a web server. CHUCK HOFFMAN PROGRAMMER T8DESIGN.COM | P 319.266.7574 - x150 | 877.T8IDEAS | F 888.290.4675 This e-mail, including attachments, is covered by the Electronic Communications Privacy Act, 18 U.S.C. 2510-2521, is confidential, and may be legally privileged. If you are not the intended recipient, you are hereby notified that any retention, dissemination, distribution, or copying of this communication is strictly prohibited. Please reply to the sender that you have received the message in error, and then please delete it. Thank you. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Josh Santangelo Sent: Thursday, January 25, 2007 8:41 PM To: Flashcoders mailing list Subject: [Flashcoders] how to tell if you're running in the ide Is there a way for a SWF to know if it's running in the test movie environment vs the browser or standalone players? I often have a need to compile in different settings in test-movie than I do for deployment, and have to manually remember to take them out before shipping a build. Or is there a more elegant way to handle that sort of thing? -josh ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] Tooltip for disabled buttons: Ideas?
Hi, we use a ButtonTooltipWrapper thingy. Basicly you do: new Tooltip (myButton, myTooltip, [hitArea]) it creates an empty movieclip, with the button as hitArea. All events that are not triggered on this clip are used to show/hide tooltip and then dispatched to lower lying button. Still tweaking it, but the basic principle works ok for us. greetz JC On 1/26/07, Andy Herrman [EMAIL PROTECTED] wrote: For the disabled state for our buttons we actually use a different movie clip. Basically, each button consists of a Button object and a Movie Clip with the image used for the disabled state. When the button is disabled we hide the Button and show the MC, and when it's enabled we do the opposite. Both the MC and the Button have the handlers for the tooltip. -Andy On 1/26/07, Stefan Thurnherr [EMAIL PROTECTED] wrote: Hello flashcoders, How did/would you implement showing a tooltip over a disabled button? The onRollOver/onRollOut events seem not to fire when a button is disabled. I see two solutions right now: 1. Add an onMouseMove listener (within MyButton extends Button) and check whether _xmouse/_ymouse coincide with MyButton's area (x+width/y+height). 2. Attach an additional MovieClip to every MyButton instance, set its depth to the top and its _alpha=0, and check for the onRollOver/onRollOut events on that MovieClip instance. Any thoughts on which one is better, or any other solutions? Thanks, stefan. ___ 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] NetStream and Flash Player 9
Hi, When I have the Flash Player 9 plugin, NetStream stops working, videos don't play. It doesn't play even when I test movies within Flash. I've seen a few other people with the same problem. Am I doing something wrong or does FP9 not support NetStream? ___ 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] Transitions.as Error - The member is private and cannot be accessed.
I have a very strange error occurring when attempting to compile an FLA that utilizes the Transitions class (Transitions.as). I receive an error that states: '**Error** C:\Documents and Settings\DefaultUser\Local Settings\Application Data\Macromedia\Flash 8\en\Configuration\ Classes\mx\transitions\Transition.as: Line 160: The member is private and cannot be accessed. this._innerBounds = this.manager._innerBounds;' The only way that I have been able to resolve the issue is to change the class to a dynamic intrinsic class. That change eliminates the error, however, any objects that attempt to use the transition effects fail, that is no effects are run. In this instance, it isn't big deal as I am not using any transitions, but the Transitions Class MUST be included/imported in the FLA as it is part of a larger package. What makes this even stranger is that two co-workers can compile the FLA without any errors and they didn't have to change the type of class. Any ideas or suggestions on how to resolve this issue? Thanks for any and all replies. ___ 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] Q: Approaches to integrating existing class libraries with frameworks
Hi I'm very much interested in exploring several popular flash frameworks, especially PixLib, but am wondering if there is a way to adopt and integrate legacy class code with these new frameworks. In adopting a new flash framework, does it necessarilly mean starting 'from scratch' in developing a new class library? [e] jbach at bitstream.ca [c] 416.668.0034 [w] www.bitstream.ca ...all improvisation is life in search of a style. - Bruce Mau,'LifeStyle' ___ 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] problem moving an object
hi, this is code: this.onEnterFrame = function(){ if (this.myLoader._x eq this.myLoader._x-1){ delete onEnterFrame; } else{ this.myLoader._x-=2; } } I'm trying to move this loader created by code and it looks ok, it moves, but it doesn't stop, I hope you might know what I'm doing wrong, you are my last resource. Regards Gustavo Duenas ___ 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] problem moving an object
Hello :) 1 - eq keyword is depreciated !! don't use eq but the == operator :) if ( x == 2) { // do it } 2 - to move a movieclip, a simple example : // the speed of the move var speed = 10 ; // the max x position var xMax = 500 ; mc.onEnterFrame = function() { this._x += speed ; if ( mc._x xMax ) { delete this.onEnterFrame ; } } 3 - better solution if you use the Tween class (exist in FlashMX2004 and Flash8 with a FP7 or FP8 compiler in AS2), you can find this class in the documentation of flash 8 in the reference of the components. Example : import mx.transitions.Tween ; import mx.transitions.easing.* ; var tw:Tween = new Tween( mc , _x, Elastic.easeOut, mc._x , 500 , 24 ) : tw.stop() ; mc.onPress = function { tw.start() ; } You can use the Elastic, Bounce, Back, Expo, etc.. class to launch the interpolation with a custom easing effect :) The tween class is the work of robertpenner : http://www.robertpenner.com EKA+ :) 2007/1/26, Gustavo Duenas [EMAIL PROTECTED]: hi, this is code: this.onEnterFrame = function(){ if (this.myLoader._x eq this.myLoader._x-1){ delete onEnterFrame; } else{ this.myLoader._x-=2; } } I'm trying to move this loader created by code and it looks ok, it moves, but it doesn't stop, I hope you might know what I'm doing wrong, you are my last resource. Regards Gustavo Duenas ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] problem moving an object
I'm pretty sure this line: if (this.myLoader._x eq this.myLoader._x-1){ will never resolve to true, given that no number is equal to the same number minus one. Thus, the code in that if statement will never trigger. Should one of those this.myLoader values be a different variable? -Andy On 1/26/07, Gustavo Duenas [EMAIL PROTECTED] wrote: hi, this is code: this.onEnterFrame = function(){ if (this.myLoader._x eq this.myLoader._x-1){ delete onEnterFrame; } else{ this.myLoader._x-=2; } } I'm trying to move this loader created by code and it looks ok, it moves, but it doesn't stop, I hope you might know what I'm doing wrong, you are my last resource. Regards Gustavo Duenas ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] Q: Approaches to integrating existing class libraries with frameworks
It probably depends on how complicated the thing you're replacing is. I'm doing something similar with the VEGAS library. I have a simple logging class that I wrote as a central place to do logs, but needed to extend it a lot. The logging framework in VEGAS is just about exactly what I needed, so I'm switching to using that. In order to make it work with my old code I'm reimplementing my Logger class such that it uses the VEGAS framework under the hood, so the Logger class I have basically acts as a proxy to the VEGAS stuff. All the old code still works, since the Logger class still exists with the same interface, but it uses the new library under the hood. Then, all new code I write will just directly use the VEGAS stuff, and as I need to modify the old code (or whenever I have time), the old stuff can be slowly migrated to use the new library. -Andy On 1/26/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Hi I'm very much interested in exploring several popular flash frameworks, especially PixLib, but am wondering if there is a way to adopt and integrate legacy class code with these new frameworks. In adopting a new flash framework, does it necessarilly mean starting 'from scratch' in developing a new class library? [e] jbach at bitstream.ca [c] 416.668.0034 [w] www.bitstream.ca ...all improvisation is life in search of a style. - Bruce Mau,'LifeStyle' ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] Q: Approaches to integrating existing class libraries with frameworks
[EMAIL PROTECTED] wrote: Hi I'm very much interested in exploring several popular flash frameworks, especially PixLib, but am wondering if there is a way to adopt and integrate legacy class code with these new frameworks. absolutely. i've been doing exactly that with pixlib and documenting my progress http://relivethefuture.com/choronzon/category/development/flash/pixlib/ I've got a couple more posts in my head that I just need to type up when i get the time covering remoting and general utility stuff. I cant really comment on the other frameworks as i've not tried them, but pixlib is pretty cool and the community support is excellent. You should definitely sign up for the mailing list if you start working with pixlib. ___ 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] Invisible re-draw
Hi all, many many thanks for your responses, I really appreciate the help and input. :) eric dolecki wrote: The player draws constantly what is on stage. Vector takes more horses than bitmap (in fact unless a bitmap moves or changes, its static (won't be redrawn - hence the cacheAsBitmap option). Ah, good to know. I forgot about the outline redraw regions (or whatever it is called)... I will play with that later. I may be back with more questions... :D Thanks again folks, I really appreciate all of your help. Cheers, Micky -- Wishlist: http://snipurl.com/vrs9 Switch: http://browsehappy.com/ BCC?: http://snipurl.com/w6f8 My: http://del.icio.us/mhulse ___ 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] problem moving an object
Thanks for your help guys, It worksregards Gustavo ___ 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] Shorhand for if statement without else statement
does anybody knows if there is any short hand for if statement without the else statement? at the moment I am using object ? true : null; thanks... ___ 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] Shorhand for if statement without else statement
Usually ?: notation is used specifically for quickly choosing between 2 values (picking between 2 things inline). That's a case where you really have to have an else, otherwise you wouldn't have a value to represent the failure case of the IF part. If you're doing logic that isn't inline in a statement then you really should be using the full syntax (if(...) { ... }). So no, I don't think there is shorthand, as I don't think what you're looking for would be a good construct to have. Then again, I could be wrong. :) -Andy On 1/26/07, Helmut Granda [EMAIL PROTECTED] wrote: does anybody knows if there is any short hand for if statement without the else statement? at the moment I am using object ? true : null; thanks... ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] Shorhand for if statement without else statement
if ( condition){ } ? - Original Message - From: Helmut Granda [EMAIL PROTECTED] To: Flashcoders mailing list flashcoders@chattyfig.figleaf.com Sent: Friday, January 26, 2007 9:01 PM Subject: [Flashcoders] Shorhand for if statement without else statement does anybody knows if there is any short hand for if statement without the else statement? at the moment I am using object ? true : null; thanks... ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] Shorhand for if statement without else statement
hello :) I don't understand you question ? why you don't use the if keyword ? if ( isNaN(x) ) x = 0 ; you can use the || operator too function write ( txt ) { var message = txt || empty message ; trace(message) ; } write(hello) ; // output : hello write() ; // output : empty message if you use the cond?true:false operator to return a true value... you can use directly the condition with the object. if ( myObject ) { trace(myObject exist !!!) ; } myObject is true if is defined and false if is undefined. EKA+ :) 2007/1/26, Helmut Granda [EMAIL PROTECTED]: does anybody knows if there is any short hand for if statement without the else statement? at the moment I am using object ? true : null; thanks... ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] Shorhand for if statement without else statement
For that specific example, you can usually turn lines like return object ? true : null; into return Boolean( object ); as long as object != 0 and your code doesn't mind getting a false instead of a null. Most objects, as long as they exist, evaluate to Boolean true. Really, though, the ternary operator is confusing enough as is. It tends to be a lot easier to read and maintain plain old if-statements in the long run. -John Mark Hawley From: Helmut Granda [EMAIL PROTECTED] Date: 2007/01/26 Fri PM 03:01:25 CST To: Flashcoders mailing list flashcoders@chattyfig.figleaf.com Subject: [Flashcoders] Shorhand for if statement without else statement does anybody knows if there is any short hand for if statement without the else statement? at the moment I am using object ? true : null; thanks... ___ 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 -- John Mark Hawley The Nilbog Group 773.968.4980 (cell) ___ 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] Shorhand for if statement without else statement
thanks everyone for your comments, yes in reallity I use the regular if {}else{} statement, but I was wondering if there was something similar to when you dont need the else statement, sort of testing on the fly but i think Mark made a good comment on use a return Boolean ( object ); I dont know why i figured that the shorthand was something most people were used to and using already... ...helmut On 1/26/07, John Mark Hawley [EMAIL PROTECTED] wrote: For that specific example, you can usually turn lines like return object ? true : null; into return Boolean( object ); as long as object != 0 and your code doesn't mind getting a false instead of a null. Most objects, as long as they exist, evaluate to Boolean true. Really, though, the ternary operator is confusing enough as is. It tends to be a lot easier to read and maintain plain old if-statements in the long run. -John Mark Hawley From: Helmut Granda [EMAIL PROTECTED] Date: 2007/01/26 Fri PM 03:01:25 CST To: Flashcoders mailing list flashcoders@chattyfig.figleaf.com Subject: [Flashcoders] Shorhand for if statement without else statement does anybody knows if there is any short hand for if statement without the else statement? at the moment I am using object ? true : null; thanks... ___ 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 -- John Mark Hawley The Nilbog Group 773.968.4980 (cell) ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] Shorhand for if statement without else statement
Hello :) warning with the Boolean( o ) if your object is a number... the Boolean(0) is false but : var n = 0 ; trace(Boolean(n)) ; // false When you test a number the isNaN(n) is better i think :) EKA+ :) 2007/1/26, Helmut Granda [EMAIL PROTECTED]: thanks everyone for your comments, yes in reallity I use the regular if {}else{} statement, but I was wondering if there was something similar to when you dont need the else statement, sort of testing on the fly but i think Mark made a good comment on use a return Boolean ( object ); I dont know why i figured that the shorthand was something most people were used to and using already... ...helmut On 1/26/07, John Mark Hawley [EMAIL PROTECTED] wrote: For that specific example, you can usually turn lines like return object ? true : null; into return Boolean( object ); as long as object != 0 and your code doesn't mind getting a false instead of a null. Most objects, as long as they exist, evaluate to Boolean true. Really, though, the ternary operator is confusing enough as is. It tends to be a lot easier to read and maintain plain old if-statements in the long run. -John Mark Hawley From: Helmut Granda [EMAIL PROTECTED] Date: 2007/01/26 Fri PM 03:01:25 CST To: Flashcoders mailing list flashcoders@chattyfig.figleaf.com Subject: [Flashcoders] Shorhand for if statement without else statement does anybody knows if there is any short hand for if statement without the else statement? at the moment I am using object ? true : null; thanks... ___ 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 -- John Mark Hawley The Nilbog Group 773.968.4980 (cell) ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: RE: [Flashcoders] how to tell if you're running in the ide
You can also set up your code along these lines: var inTestMovie:Boolean = false; trace( inTestMovie = true ); if (inTestMovie) { // do wacky test movie stuff } else { // do normal stuff } Then you can just turn off trace statements when you want to see the 'normal' behavior, and leave them on when you want your 'test movie' behavior. You're probably turning off trace statements on your deliverables anyway. If you do a done of stuff like this, though, it might be best to use a preprocessor on your source and have it dump out two different code branches for you. (I don't have any recommendations on AS preprocessors; I had to throw one together in Perl at work myself.) -John Mark Hawley From: Chuck Hoffman [EMAIL PROTECTED] Date: 2007/01/26 Fri AM 08:59:59 CST To: Flashcoders mailing list flashcoders@chattyfig.figleaf.com Subject: RE: [Flashcoders] how to tell if you're running in the ide I've occasionally used the trick of checking whether this._url begins with file: Doesn't exactly tell you if you're running in the IDE, but does tell you whether it's running locally on your machine or in a browser, from a web server. CHUCK HOFFMAN PROGRAMMER T8DESIGN.COM | P 319.266.7574 - x150 | 877.T8IDEAS | F 888.290.4675 This e-mail, including attachments, is covered by the Electronic Communications Privacy Act, 18 U.S.C. 2510-2521, is confidential, and may be legally privileged. If you are not the intended recipient, you are hereby notified that any retention, dissemination, distribution, or copying of this communication is strictly prohibited. Please reply to the sender that you have received the message in error, and then please delete it. Thank you. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Josh Santangelo Sent: Thursday, January 25, 2007 8:41 PM To: Flashcoders mailing list Subject: [Flashcoders] how to tell if you're running in the ide Is there a way for a SWF to know if it's running in the test movie environment vs the browser or standalone players? I often have a need to compile in different settings in test-movie than I do for deployment, and have to manually remember to take them out before shipping a build. Or is there a more elegant way to handle that sort of thing? -josh ___ 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 -- John Mark Hawley The Nilbog Group 773.968.4980 (cell) ___ 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: RE: [Flashcoders] how to tell if you're running in the ide
Hello :) With VEGAS my openSource framework you can use my vegas.logging package : Page project : http://vegas.riaforge.org/ Example : in the souces in the AS2/trunk/bin/test/vegas/logging package 1 - use a log library to create channels to debug you application with muli external targets (trace, SOS console, Firebug, FlashInspector etc..) You can enabled or disabled you logs when you want :) My log model is based on the AS3 mx.logging framework in Flex2 SDK ( polymorphism but not the same implementation in the class, i use bubbling events to propagate the logs) 2 - use the class asgard.system.Application to determinates if you are in a web application, standalone or flash ide application etc... http://svn.riaforge.org/vegas/AS2/trunk/src/asgard/system/Application.as ASGard in an extension of VEGAS :) example : import asgard.system.Application ; if ( Application.isFlashIDE() ) { // initialize log model } else { // do nothing ! } EKA+ :) 2007/1/26, John Mark Hawley [EMAIL PROTECTED]: You can also set up your code along these lines: var inTestMovie:Boolean = false; trace( inTestMovie = true ); if (inTestMovie) { // do wacky test movie stuff } else { // do normal stuff } Then you can just turn off trace statements when you want to see the 'normal' behavior, and leave them on when you want your 'test movie' behavior. You're probably turning off trace statements on your deliverables anyway. If you do a done of stuff like this, though, it might be best to use a preprocessor on your source and have it dump out two different code branches for you. (I don't have any recommendations on AS preprocessors; I had to throw one together in Perl at work myself.) -John Mark Hawley From: Chuck Hoffman [EMAIL PROTECTED] Date: 2007/01/26 Fri AM 08:59:59 CST To: Flashcoders mailing list flashcoders@chattyfig.figleaf.com Subject: RE: [Flashcoders] how to tell if you're running in the ide I've occasionally used the trick of checking whether this._url begins with file: Doesn't exactly tell you if you're running in the IDE, but does tell you whether it's running locally on your machine or in a browser, from a web server. CHUCK HOFFMAN PROGRAMMER T8DESIGN.COM | P 319.266.7574 - x150 | 877.T8IDEAS | F 888.290.4675 This e-mail, including attachments, is covered by the Electronic Communications Privacy Act, 18 U.S.C. 2510-2521, is confidential, and may be legally privileged. If you are not the intended recipient, you are hereby notified that any retention, dissemination, distribution, or copying of this communication is strictly prohibited. Please reply to the sender that you have received the message in error, and then please delete it. Thank you. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Josh Santangelo Sent: Thursday, January 25, 2007 8:41 PM To: Flashcoders mailing list Subject: [Flashcoders] how to tell if you're running in the ide Is there a way for a SWF to know if it's running in the test movie environment vs the browser or standalone players? I often have a need to compile in different settings in test-movie than I do for deployment, and have to manually remember to take them out before shipping a build. Or is there a more elegant way to handle that sort of thing? -josh ___ 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 -- John Mark Hawley The Nilbog Group 773.968.4980 (cell) ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
RE: [Flashcoders] Shorhand for if statement without else statement
does anybody knows if there is any short hand for if statement without the else statement? 1. You can remove the braces. I always use: if (true) something(); But rarely use: if (true) something(); else somethingElse(); because it can get lost visually in code. 2. Inline conditional I use this all the time. val = (boolean) ? trueVal : falseVal; 3. Inline or conditional val = (if true) || (if not true) This one is a little different than the inline conditional. val will be set to what is left of the || if what is left of the || resolves true (i.e. not 0, undefined or null), otherwise it will be set to what's to the right of the ||. You can also use these without setting a variable. // If boolean is true, call funcA, else call funcB. (boolean) ? funcA() : funcB(); // if funcA returns false, run funcB() funcA() || funcB(); HTH, Steven ___ 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] Shorhand for if statement without else statement
Hello :) In FDT for example : cond ? methodA() : methodB() failed :) The operator cond ? true : false is used to return a value but isn't really the good solution to launch method i think :) EKA+ :) 2007/1/26, Steven Sacks | BLITZ [EMAIL PROTECTED]: does anybody knows if there is any short hand for if statement without the else statement? 1. You can remove the braces. I always use: if (true) something(); But rarely use: if (true) something(); else somethingElse(); because it can get lost visually in code. 2. Inline conditional I use this all the time. val = (boolean) ? trueVal : falseVal; 3. Inline or conditional val = (if true) || (if not true) This one is a little different than the inline conditional. val will be set to what is left of the || if what is left of the || resolves true (i.e. not 0, undefined or null), otherwise it will be set to what's to the right of the ||. You can also use these without setting a variable. // If boolean is true, call funcA, else call funcB. (boolean) ? funcA() : funcB(); // if funcA returns false, run funcB() funcA() || funcB(); HTH, Steven ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] Shorhand for if statement without else statement
On 1/26/07, Steven Sacks | BLITZ [EMAIL PROTECTED] wrote: does anybody knows if there is any short hand for if statement without the else statement? 1. You can remove the braces. I always use: if (true) something(); I like it... ___ 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] Shorhand for if statement without else statement
function foo() { trace(foo); } function bar() { trace(bar); } (true) ? foo() : bar(); -- foo (false) ? foo() : bar(); -- bar Works fine for me. Not the best practice (I would never use it), but just showing what's possible with inline conditionals. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of eka Sent: Friday, January 26, 2007 2:27 PM To: Flashcoders mailing list Subject: Re: [Flashcoders] Shorhand for if statement without else statement Hello :) In FDT for example : cond ? methodA() : methodB() failed :) The operator cond ? true : false is used to return a value but isn't really the good solution to launch method i think :) EKA+ :) ___ 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] NetStream and Flash Player 9
[EMAIL PROTECTED] wrote: When I have the Flash Player 9 plugin, NetStream stops working, videos don't play. It doesn't play even when I test movies within Flash. I've seen a few other people with the same problem. Am I doing something wrong or does FP9 not support NetStream? When I do a Google search I see a couple of different businesses called netstream. If you're asking whether others can view the Flash work at http://netstreams.com/ in Adobe Flash Player 9, then I can. jd -- John Dowdell . Adobe Developer Support . San Francisco CA USA Weblog: http://weblogs.macromedia.com/jd Aggregator: http://weblogs.macromedia.com/mxna Technotes: http://www.macromedia.com/support/ Spam killed my private email -- public record is best, thanks. ___ 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] triangle help
Given the interior angles and the length of one side (not the hypoteneuse) of a right triangle, how do I calculate (in Flash) the length of the other 2 sides? Thanks, Jason ___ 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] triangle help
h - hypoteneuse l1,l2 - the other sides a1 - angle next to l2 sin(a1) = l1/h cos(a1) = l2/h assuming you know l1, then h=l1/sin(a1) and then l2 = h* cos(a1) - Original Message From: Jason Rayles [EMAIL PROTECTED] To: flashcoders@chattyfig.figleaf.com Sent: Saturday, January 27, 2007 7:24:05 AM Subject: [Flashcoders] triangle help Given the interior angles and the length of one side (not the hypoteneuse) of a right triangle, how do I calculate (in Flash) the length of the other 2 sides? Thanks, Jason ___ 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 Have a burning question? Go to www.Answers.yahoo.com and get answers from real people who know. ___ 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] triangle help
You can also check this post : http://chattyfig.figleaf.com/pipermail/flashcoders/2006-December/177264.html where i share a class of mine called TriangleSolver ... in your case, you can use the sine rule method Sine Rule : side1/angle1 = side2/angle2 = side3/angle3 or hypotheneuse/90 = side2/angle2 = side3/(180 - (90+angle2)) angle1 for example is the angle opposite to side1 var otherSide:Number = TriangleSolver.sineRule(null, angle1, side2, angle2); // will return side1 var otherSide:Number = TriangleSolver.sineRule(side1, null, side2, angle2); // will return angle1 HTH Alain Jason Rayles wrote: Given the interior angles and the length of one side (not the hypoteneuse) of a right triangle, how do I calculate (in Flash) the length of the other 2 sides? Thanks, Jason ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com . ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] triangle help
Law of Sines will solve your problem. http://en.wikipedia.org/wiki/Law_of_sines Jason Rayles [EMAIL PROTECTED] wrote: Given the interior angles and the length of one side (not the hypoteneuse) of a right triangle, how do I calculate (in Flash) the length of the other 2 sides? Thanks, Jason ___ 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 - Food fight? Enjoy some healthy debate in the Yahoo! Answers Food Drink QA. ___ 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] Shorhand for if statement without else statement
( condition ) ( code ); Hot! I wonder how many of these shortcuts we can come up with that nobody would use unless they were trying to show off to other codemonkeys. :) ___ 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] Shorhand for if statement without else statement
you could take that a bit further : (foo) ? foo() : (bar) ? bar() : (foobar) ? foobar() : trace(sorry! no soup for you!); Steven Sacks | BLITZ wrote: function foo() { trace(foo); } function bar() { trace(bar); } (true) ? foo() : bar(); -- foo (false) ? foo() : bar(); -- bar Works fine for me. Not the best practice (I would never use it), but just showing what's possible with inline conditionals. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of eka Sent: Friday, January 26, 2007 2:27 PM To: Flashcoders mailing list Subject: Re: [Flashcoders] Shorhand for if statement without else statement Hello :) In FDT for example : cond ? methodA() : methodB() failed :) The operator cond ? true : false is used to return a value but isn't really the good solution to launch method i think :) EKA+ :) ___ 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] cell renderer load times
My cell renderer (combo box in an editable grid) works ok (tabbing etc) ...but it takes a long time to load.. i'm new to Flash.. and would appreciate any suggestions on how to speed up load times..The visible gride displays 5 X 5...the mc takes about 3 seconds to appear.. ??? thanks, _ FREE pop-up blocking with the new MSN Toolbar - get it now! http://toolbar.msn.click-url.com/go/onm00200415ave/direct/01/ ___ 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