Re: [Flashcoders] Flash C3 and Embedding resources
[Embed] is Flex only, because FlexBuilder doesn't have a library, like the Flash IDE has. regards, Muzak - Original Message - From: Smith, Philip [EMAIL PROTECTED] To: flashcoders@chattyfig.figleaf.com Sent: Friday, June 01, 2007 3:10 AM Subject: [Flashcoders] Flash C3 and Embedding resources Hi there, I was reading this article on embedding resources here: http://www.bit-101.com/blog/?p=853 and wondered if the same, or a similar technique can be achieved when compiling AS3 with the Flash C3 IDE, ie: [Embed(source=graphics.swf, symbol=box)] private var B:Class; public function Constructor() { var square:Sprite = new B(); } I'm getting an error doing this, and was wondering if this possible, or is there another alternative to 'embedding assets/creating com graphical libs' with the Flash C3 IDE? Thanks, Phil ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
RE: [Flashcoders] IE6: javascript issues w. events calling:getURL/SWFAddress/Object
Hi Sebastián, why don't you put the window target in the getURL??? getURL(javascript:urchinTracker('+__newURL.parameters.myURL+'), _self) This works fine for me. Bye Daniel Portilla Heras Dpto. Desarrollo Virtual Training TELECOR Tlfno: 915970193 Ext. 5864 (corp: 315 5864) [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] IE6: javascript issues w. events calling:getURL/SWFAddress/Object
Hello everyone, thanks for your fast responces, When I use: //AS: ExternalInterface.call (check); //JS: function check () { alert(check); } This works fine on ALL browsers. But if I use: AS: ExternalInterface.call (spawnWindow, fullString,__data.parameters.myTitle,'toolbar=+__data.parameters.toolbar+,location=+__data.parameters.location+,status=+__data.parameters.status+,menubar=+__data.parameters.menubar+,scrollbars=+__data.parameters.scrollbars+,resizable=+__data.parameters.resizeable+,width=+__data.parameters.width+,height=+__data.parameters.height+'); //JS: function spawnWindow(URL,Name,features) { alert(spawnWindow); window.open(URL,Name,features); } This works fine in FFox, Safari, IE7 etc. but in IE6 ONLY the alert is triggered. So I tried to use inline JS: //AS: getURL (javascript:NewWindow=window.open('+String(fullString)+','+__data.parameters.myTitle+','toolbar=+String(__data.parameters.toolbar)+,location=+String(__data.parameters.location)+,status=+String(__data.parameters.status)+,menubar=+String(__data.parameters.menubar)+,scrollbars=+String(__data.parameters.scrollbars)+,resizable=+String(__data.parameters.resizeable)+,width=+String(__data.parameters.width)+,height=+String(__data.parameters.height)+'); NewWindow.focus(); void(0);); This again works fine in all browsers except IE6... =( So it would seem that I can access alert; but not window.open; using either javascript inline, or via a function... As prviously mentioned, I also need to use Javascript to call the stats engine [currently Google Analytics; but we will switch to Omniture soon and this also uses javascript] - but this is also not working in IE6. I'm again out of options!!! So far it seems like a bad deal to have deeplinking/bookmarking but no IE6 support! =-( So if anyone has any further insight, your insight is greatly appreciated! For the record, I'm using SWFAddress 1.1 / SWFObject With kindness, Sebastian. ___ 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] IE6: javascript issues w. events calling:getURL/SWFAddress/Object
Hi Sebastien, Perhaps Fever can help you in your task. Fever has a built-in class named GAnalytic which is responsible to track links, outgoing and download links. ( working with swfobject script ) You can take a look at dedicated article on my blog here ( in french ) : http://www.customactions.net/webblog/index.php/2006/09/15/50-fever-a-la-rencontre-de-google-analytics Fever As2 Framework can be found on RIA site : http://fever.riaforge.org Hope it can help you ;) Bye. -- Romain Ecarnot Développeur ActionScript / Multimédia E-mail : [EMAIL PROTECTED] Web : http://www.customactions.net/webblog Fever : http://fever.riaforge.org ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] Can't set selectionColor property of List from withinclass
Component styles are set through the setStyle() method. You can do this either globally or on an instance directly. Check the docs. For the list: List component Customizing the List component function setUserList(myUserList:List) { userList = myUserList; userList.setStyle(useRollOver, false); userList.setStyle(selectionColor, 0xFF); } regards, Muzak - Original Message - From: Alistair Colling [EMAIL PROTECTED] To: flashcoders@chattyfig.figleaf.com Sent: Friday, June 01, 2007 12:27 PM Subject: [Flashcoders] Can't set selectionColor property of List from withinclass Hi there, I'm working on a class that is passed instances of components so that nearly all of the code is inside the class. I want to set the colour of selected items to white so the list always looks the same. I am trying to set the selectionColor property from within my class but I get the error message: There is no property with the name 'selectionColor' I can set this property fine from the FLA using the regular syntax: userList.selectionColor = 0xFF this is how I am doing it from my class (and it doesn't work!): function setUserList(myUserList:List) { userList = myUserList; userList.setStyle(useRollOver, false); userList.selectionColor = 0xFF; } If anyone has any ideas for the syntax of how to set this property from within a custom class I'd be really glad to hear. Thanks! Ali ___ 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] IE6: javascript issues w. events calling:getURL/SWFAddress/Object
Wow! I actually solved the issue now! And it was because of an issue in the parameters... :p Doh! [there was a space in the title name: __data.parameters.myTitle which only made an issue for IE6] PHEW!!! I'm really happy its functioning! =D again, thanks for ALL your help! wk, seb. On 6/1/07, sebastian chedal [EMAIL PROTECTED] wrote: Hello everyone, thanks for your fast responces, When I use: //AS: ExternalInterface.call (check); //JS: function check () { alert(check); } This works fine on ALL browsers. But if I use: AS: ExternalInterface.call (spawnWindow, fullString,__data.parameters.myTitle,'toolbar=+__data.parameters.toolbar+,location=+__data.parameters.location+,status=+__data.parameters.status+,menubar=+__data.parameters.menubar+,scrollbars=+__data.parameters.scrollbars+,resizable=+__data.parameters.resizeable+,width=+__data.parameters.width+,height=+__data.parameters.height+'); //JS: function spawnWindow(URL,Name,features) { alert(spawnWindow); window.open(URL,Name,features); } This works fine in FFox, Safari, IE7 etc. but in IE6 ONLY the alert is triggered. So I tried to use inline JS: //AS: getURL (javascript:NewWindow=window.open('+String(fullString)+','+__data.parameters.myTitle+','toolbar=+String(__data.parameters.toolbar)+,location=+String(__data.parameters.location)+,status=+String(__data.parameters.status)+,menubar=+String(__data.parameters.menubar)+,scrollbars=+String(__data.parameters.scrollbars)+,resizable=+String(__data.parameters.resizeable)+,width=+String(__data.parameters.width)+,height=+String(__data.parameters.height)+'); NewWindow.focus(); void(0);); This again works fine in all browsers except IE6... =( So it would seem that I can access alert; but not window.open; using either javascript inline, or via a function... As prviously mentioned, I also need to use Javascript to call the stats engine [currently Google Analytics; but we will switch to Omniture soon and this also uses javascript] - but this is also not working in IE6. I'm again out of options!!! So far it seems like a bad deal to have deeplinking/bookmarking but no IE6 support! =-( So if anyone has any further insight, your insight is greatly appreciated! For the record, I'm using SWFAddress 1.1 / SWFObject With kindness, Sebastian. ___ 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] Can't set selectionColor property of List from within class
Hi there, I'm working on a class that is passed instances of components so that nearly all of the code is inside the class. I want to set the colour of selected items to white so the list always looks the same. I am trying to set the selectionColor property from within my class but I get the error message: There is no property with the name 'selectionColor' I can set this property fine from the FLA using the regular syntax: userList.selectionColor = 0xFF this is how I am doing it from my class (and it doesn't work!): function setUserList(myUserList:List) { userList = myUserList; userList.setStyle(useRollOver, false); userList.selectionColor = 0xFF; } If anyone has any ideas for the syntax of how to set this property from within a custom class I'd be really glad to hear. Thanks! Ali ___ 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] Strange ComboBox issues when loaded in a child SWF
I have 2 movies. The main movie has all of the code, and the UI resources movie contains all of the assets, with no code and nothing on the stage. When the main movie loads it displays a loading progress bar, creates an empty movie clip and then loads the UI resources SWF into that empty clip. Once the UI resources are downloaded the UI is constructed by the code in the main movie, but doing everything within the clip that contains the UI resources (basically, treating the UI resources clip as the root, so all attachMovie and createEmpty... calls are done on the UI Resources clip, or one of its child clips). One of the reasons we do it this way is that we want to have a little as possible stored in the FLA, as it's a binary file and is a pain to use with source control. The UI resources movie is actually defined in an XML file and we use swfmill to generate the SWF. The XML file is much easier to use with source control as it's plain text (tracking changes is much easier). So the main movie's FLA is almost completely empty. -Andy On 5/31/07, Hans Wichman [EMAIL PROTECTED] wrote: Hi Andy, one more question, do you load in a clip with all the assets and actually construct an interface within that library, OR do you use runtime shared libraries to accomplish this, if and not, why not;). We are running into problems (as described in the previous post) which forces us to move to a single library as well, and I'm still pondering which option to take. greetz JC On 5/31/07, Andy Herrman [EMAIL PROTECTED] wrote: The application I'm working on gets all of its UI resources from a separate SWF. This will allow us to internationalize/brand the UI by simply providing different resource SWFs. Because the UI resources are all in the child movie I have to construct the UI within the movie clips owned by that movie. My testing shows that if the ComboBox (or any other component) is in the main movie's library I can't instantiate it any of these movie clips, so I need to have it contained in the resources clip (I prefer this anyway as it keeps everything in one place). Unfortunately I've been running into some weird issues with ComboBox when doing this. I've found workarounds for all these issues, which I thought others may find useful. I'm also interested to know if other people have run into them and how they solved them. The first bug I ran into was that the combo box would never open. Originally I set _lockroot to true on the movie clip that contained the combo box. However, in this case the dropdown would always open down, even if there wasn't enough room in the movie to do so (which normally would cause it to open up). I found that doing _lockroot on the UI resources movie fixed this. The second bug I ran into was that a focus rectangle would display around the combo box and the dropdown. This doesn't display when the combo box is simply created in the main movie (which I can't do unfortunately). Also, the focus rectangle for the dropdown does not go away when the dropdown is closed, messing up the UI. The fix I found for this was to do the following, where cbx is the ComboBox: cbx.drawFocus = null; cbx.dropdown.drawFocus = null; The last issue was a fun one. If there were enough entries in the combo box to require scrolling, clicking on the arrows in the scrollbar or dragging the scroll thingy would cause the dropdown to close (it closed on the release of the mouse). This only seems to happen when the combo box is in a child movie. By digging through the ComboBox code and doing a bunch of tests I determined that the combo box's onKillFocus() function was being called after the mouse was released (this never happened when in the main movie, only when in the child movie). onKillFocus takes a single argument, which I think is a reference to the object that was taking focus. In this case the argument was always the dropdown itself (stored in the combo box as __dropdown). The fix for this is a total hack, but seems to work in Flash 7+ (at least in windows). At the very beginning of the code for the movie I put the following: ComboBox.prototype.onKillFocus = function(n) { if(n == this.__dropdown) { /* Skip */ } else { if(this._showingDropdown n != null) { this.displayDropdown(false); } super.onKillFocus(); } } This overrides the ComboBox function to do what it normally does in all cases except for when the focus is being given to the dropdown. The only thing I've found that this breaks is changing focus using the TAB key. If the combo box is open and you hit the TAB key to change focus to something else then it won't close. This was easily fixed by adding a key listener that closes the combo box when it sees TAB is pressed. Has anyone else run into these things? Any better solutions? Any idea why ComboBox is so broken when used in a child movie (Some of
Re: [Flashcoders] Can't set selectionColor property of List from withinclass
Thanks Muzak, that works great. I am now trying to find what property controls the green glow that appears around the whole listbox when it's hi-lighted as I want to lose that too and it doesn't seem to be mentioned in the docs. Cheers! Ali On 1 Jun 2007, at 12:49, Muzak wrote: Component styles are set through the setStyle() method. You can do this either globally or on an instance directly. Check the docs. For the list: List component Customizing the List component function setUserList(myUserList:List) { userList = myUserList; userList.setStyle(useRollOver, false); userList.setStyle(selectionColor, 0xFF); } regards, Muzak - Original Message - From: Alistair Colling [EMAIL PROTECTED] To: flashcoders@chattyfig.figleaf.com Sent: Friday, June 01, 2007 12:27 PM Subject: [Flashcoders] Can't set selectionColor property of List from withinclass Hi there, I'm working on a class that is passed instances of components so that nearly all of the code is inside the class. I want to set the colour of selected items to white so the list always looks the same. I am trying to set the selectionColor property from within my class but I get the error message: There is no property with the name 'selectionColor' I can set this property fine from the FLA using the regular syntax: userList.selectionColor = 0xFF this is how I am doing it from my class (and it doesn't work!): function setUserList(myUserList:List) { userList = myUserList; userList.setStyle(useRollOver, false); userList.selectionColor = 0xFF; } If anyone has any ideas for the syntax of how to set this property from within a custom class I'd be really glad to hear. Thanks! Ali ___ 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] combo box problem
Don't use getNextHighestDepth() when using the v2 component framework. Use the DepthManager. Tried following the DepthManager syntax from the help, but can't get it to work. Can't find any references to more assitance via Google. Do you have any links to useful documentation for the DepthManager class? Thank you very much. We're ready to pull our hair out here. RT ___ 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] MVC question
Hi All I am building my first MVC (Model View Controller) and have a question about how I should set it up. I have a load of classes: BookView, ControlView (both views), Controller and PAModel. Controller holds all the other classes and sets them all up. Both views have a function - setModel: public function setModel(newModel:PAModel):Void { this.Model = newModel; this.Model.addEventListener(PagesUpdated,this); this.Model.addEventListener(currentPageUpdate,this); } that sets the model (obviously) and sets up event listeners. If I try to fire this function in the controller constructor it doesn't fire - presumably the classes haven't woken up yet so I am firing it from a function that fires when XML has loaded. This doesn't seem like the best way of doing it though. What is the best way round this? I have tried firing a onInit function from the views when they are ready but this doesn't seem to work. I assume it's because the addEventListener function doesn't work when the controller tries to register as a listener. Thanks for the help. ___ 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] combo box problem
import mx.managers.DepthManager; import mx.controls.ComboBox; var _cb:ComboBox = ComboBox(createClassChildAtDepth(ComboBox, DepthManager.kTop)); trace(_cb.getDepth()); regards, Muzak - Original Message - From: Randy Tinfow [EMAIL PROTECTED] To: flashcoders@chattyfig.figleaf.com Sent: Friday, June 01, 2007 4:50 PM Subject: RE: [Flashcoders] combo box problem Don't use getNextHighestDepth() when using the v2 component framework. Use the DepthManager. Tried following the DepthManager syntax from the help, but can't get it to work. Can't find any references to more assitance via Google. Do you have any links to useful documentation for the DepthManager class? Thank you very much. We're ready to pull our hair out here. RT ___ 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] Can't set selectionColor property of List fromwithinclass
Muzak! thanks so much this is a massive help :) Have a great weekend! On 1 Jun 2007, at 17:25, Muzak wrote: _list.drawFocus = null; ___ 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] loading AVM1 movie as AVM2 movie
I made simple loader subclass, that loads AVM1 movie as AVM2 movie. When loaded swf is AVM1 movie, it internally rewrites flags for AVM2 movie. All as2 script inside the movie will be ignored ( I think ). It may be userful in some situation :-) http://www.fladdict.net/blog-en/2007/06/avm2loader_class.html -- Takayuki Fukatsu http://www.fladdict.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] Flash C3 and Embedding resources
Muzak, thanks. If a graphical library linkage element you want to add/attach is in the host .swf library (ie 'Box' class), how you would access it from a sub-loaded .swf without throwing an error? subSWF-addChild(new Box()) --undefined. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Muzak Sent: Friday, June 01, 2007 12:01 AM To: flashcoders@chattyfig.figleaf.com Subject: Re: [Flashcoders] Flash C3 and Embedding resources [Embed] is Flex only, because FlexBuilder doesn't have a library, like the Flash IDE has. regards, Muzak - Original Message - From: Smith, Philip [EMAIL PROTECTED] To: flashcoders@chattyfig.figleaf.com Sent: Friday, June 01, 2007 3:10 AM Subject: [Flashcoders] Flash C3 and Embedding resources Hi there, I was reading this article on embedding resources here: http://www.bit-101.com/blog/?p=853 and wondered if the same, or a similar technique can be achieved when compiling AS3 with the Flash C3 IDE, ie: [Embed(source=graphics.swf, symbol=box)] private var B:Class; public function Constructor() { var square:Sprite = new B(); } I'm getting an error doing this, and was wondering if this possible, or is there another alternative to 'embedding assets/creating com graphical libs' with the Flash C3 IDE? Thanks, Phil ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ 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] textheight and embedded text
Can anyone confirm or deny that the textHeight property doesn't respond with embedded fonts? Or am I just going crazy? Thanks, --Dave I'm trying to dynamically fit text into a Dynamic TextField by repetitively adding text and checking the textHeight property (I want to add an ellipsis at the end of text which is cut off, so I can't just stuff all the text in there). This works fine, until I embed the characters, in which case the textHeight property fails to respond. Has anyone run into this? Is there a work-around? Is there a better method for trimming text to a box? Thanks, --Dave ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] Flash C3 and Embedding resources
Try this out in your sub-loaded swf var tClass:Class = getDefinitionByName(Box) as Class; addChild(new tClass()); hth, Rob On Fri, 01 Jun 2007 12:15:09 -0400, Smith, Philip [EMAIL PROTECTED] wrote: If a graphical library linkage element you want to add/attach is in the host .swf library (ie 'Box' class), how you would access it from a sub-loaded .swf without throwing an error? subSWF-addChild(new Box()) --undefined. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Muzak Sent: Friday, June 01, 2007 12:01 AM To: flashcoders@chattyfig.figleaf.com Subject: Re: [Flashcoders] Flash C3 and Embedding resources [Embed] is Flex only, because FlexBuilder doesn't have a library, like the Flash IDE has. ___ 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] Trying to understandi Live Preview
Live Preview has often been a difficult topic to understand. But a couple of very useful posts are available about it. http://readlist.com/lists/chattyfig.figleaf.com/flashcoders/0/243.html http://proalias.com/pipermail/flashcomponents_proalias.com/2005-April/000159.html But, I wonder if it is possible to include user interaction in Live Preview. I build components for people who build computer tutors and I would like to associate contextual instructions with the component that an author could reference when building a tutor with my components. I know that I could put instructional text on the stage and hide it if _global.isLivePreview = false or undefined. But, ideally, the help could be shown / hidden in the LivePreview. The file mm_livepreview.as has a stage listener. Also, in that file, it dynamically creates a movie clip and calls setSize on it. I tried adding onPress and onRelease event handlers to that movie clip but these don't seem to work. In the posts that I've read, claims are made that the LivePreview interpreter is like the flash player but has some differences. I wonder if I'm out-of-luck trying to add this kind of interactivity. mc.onRelease = function(){ trace(initHelp : infoButton_btn.onRollOver); }; mc.onPress = function(){ trace(initHelp : infoButton_btn.onRollOut); }; ___ 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: Simulate tab indents in dynamic text
Hi I have one dynamic text field that is scrollable. I'd like to import text organized into columns. Is there any way to simulate tab indents in a dynamic text field so I can keep the text columns without resorting to using multiple text boxes? Any suggestions appreciated! [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
Re: [Flashcoders] Trying to understandi Live Preview
Not sure what exactly you're having problems with. If you want the component (on stage) to be interactive, that's not going to work (AFAIK). You could create a paramater available in the Property Inspector to toggle info on and off. import mx.utils.Delegate; class LivePreviewTest extends MovieClip { private var __showInfo:Boolean = false; function LivePreviewTest() { } private function setShowInfo() { trace(LivePreviewTest ::: setShowInfo); trace(- showInfo: +__showInfo); } [Inspectable(defaultValue=false,enumeration=true,false)] function get showInfo():Boolean { return __showInfo; } function set showInfo(val:Boolean):Void { __showInfo = val; if(_global.isLivePreview) setShowInfo(); } } regards, Muzak - Original Message - From: John laPlante [EMAIL PROTECTED] To: flashcoders@chattyfig.figleaf.com Sent: Friday, June 01, 2007 7:45 PM Subject: [Flashcoders] Trying to understandi Live Preview Live Preview has often been a difficult topic to understand. But a couple of very useful posts are available about it. http://readlist.com/lists/chattyfig.figleaf.com/flashcoders/0/243.html http://proalias.com/pipermail/flashcomponents_proalias.com/2005-April/000159.html But, I wonder if it is possible to include user interaction in Live Preview. I build components for people who build computer tutors and I would like to associate contextual instructions with the component that an author could reference when building a tutor with my components. I know that I could put instructional text on the stage and hide it if _global.isLivePreview = false or undefined. But, ideally, the help could be shown / hidden in the LivePreview. The file mm_livepreview.as has a stage listener. Also, in that file, it dynamically creates a movie clip and calls setSize on it. I tried adding onPress and onRelease event handlers to that movie clip but these don't seem to work. In the posts that I've read, claims are made that the LivePreview interpreter is like the flash player but has some differences. I wonder if I'm out-of-luck trying to add this kind of interactivity. mc.onRelease = function(){ trace(initHelp : infoButton_btn.onRollOver); }; mc.onPress = function(){ trace(initHelp : infoButton_btn.onRollOut); }; ___ 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] combo box problem
We'd tried this on our own with no success. The brilliant Felix Turner gave us the simple solution: Put the main combobox in a MC and everything else on the stage in a different MC and always make sure the combobox MC is always on top. Too easy... Thanks for all the suggestions. RT -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Muzak Sent: Friday, June 01, 2007 12:36 PM To: flashcoders@chattyfig.figleaf.com Subject: Re: [Flashcoders] combo box problem import mx.managers.DepthManager; import mx.controls.ComboBox; var _cb:ComboBox = ComboBox(createClassChildAtDepth(ComboBox, DepthManager.kTop)); trace(_cb.getDepth()); regards, Muzak - Original Message - From: Randy Tinfow [EMAIL PROTECTED] To: flashcoders@chattyfig.figleaf.com Sent: Friday, June 01, 2007 4:50 PM Subject: RE: [Flashcoders] combo box problem Don't use getNextHighestDepth() when using the v2 component framework. Use the DepthManager. Tried following the DepthManager syntax from the help, but can't get it to work. Can't find any references to more assitance via Google. Do you have any links to useful documentation for the DepthManager class? Thank you very much. We're ready to pull our hair out here. RT ___ 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] Flash CS3 Prof copy: missing Tree component.
Has anyone noticed that the tree component is missing from the CS3 Web Premium prof. copy after the installation? Is there a link from Adobe site for us to download the tree component? ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
RE: [Flashcoders] Flash C3 and Embedding resources
Thank you very much! -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Rob Romanek Sent: Friday, June 01, 2007 10:39 AM To: flashcoders@chattyfig.figleaf.com Subject: Re: [Flashcoders] Flash C3 and Embedding resources Try this out in your sub-loaded swf var tClass:Class = getDefinitionByName(Box) as Class; addChild(new tClass()); hth, Rob On Fri, 01 Jun 2007 12:15:09 -0400, Smith, Philip [EMAIL PROTECTED] wrote: If a graphical library linkage element you want to add/attach is in the host .swf library (ie 'Box' class), how you would access it from a sub-loaded .swf without throwing an error? subSWF-addChild(new Box()) --undefined. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Muzak Sent: Friday, June 01, 2007 12:01 AM To: flashcoders@chattyfig.figleaf.com Subject: Re: [Flashcoders] Flash C3 and Embedding resources [Embed] is Flex only, because FlexBuilder doesn't have a library, like the Flash IDE has. ___ 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] survival off eventlisteners on class instance redeclaration?
Hi list, IfI attach e new instance of a class to a *var myClass*=new friendlyClass() and then attach an eventlistener to it classHello.*addEventLister*(greeting,sayHello) now say that, after a while I want to overwrite the myClass variable with a new and fresh instance of the same *myClass*=new friendlyClass() now my question: will the eventlistener still work or do I have to redeclare it again ? Thanks, Stijn aka Latcho ___ 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] Re: survival off eventlisteners on class instance redeclaration?
sorry, that supposed to be* _myClass_*.addEventLister(greeting,sayHello) Latcho wrote: Hi list, IfI attach e new instance of a class to a *var myClass*=new friendlyClass() and then attach an eventlistener to it classHello.*addEventLister*(greeting,sayHello) now say that, after a while I want to overwrite the myClass variable with a new and fresh instance of the same *myClass*=new friendlyClass() now my question: will the eventlistener still work or do I have to redeclare it again ? Thanks, Stijn aka Latcho ___ 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] combo box problem
Hi, cool randy, glad its fixed. Note however that that is the solution the article posted before describes:) greetz JC On 6/1/07, Randy Tinfow [EMAIL PROTECTED] wrote: We'd tried this on our own with no success. The brilliant Felix Turner gave us the simple solution: Put the main combobox in a MC and everything else on the stage in a different MC and always make sure the combobox MC is always on top. Too easy... Thanks for all the suggestions. RT -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Muzak Sent: Friday, June 01, 2007 12:36 PM To: flashcoders@chattyfig.figleaf.com Subject: Re: [Flashcoders] combo box problem import mx.managers.DepthManager; import mx.controls.ComboBox; var _cb:ComboBox = ComboBox(createClassChildAtDepth(ComboBox, DepthManager.kTop)); trace(_cb.getDepth()); regards, Muzak - Original Message - From: Randy Tinfow [EMAIL PROTECTED] To: flashcoders@chattyfig.figleaf.com Sent: Friday, June 01, 2007 4:50 PM Subject: RE: [Flashcoders] combo box problem Don't use getNextHighestDepth() when using the v2 component framework. Use the DepthManager. Tried following the DepthManager syntax from the help, but can't get it to work. Can't find any references to more assitance via Google. Do you have any links to useful documentation for the DepthManager class? Thank you very much. We're ready to pull our hair out here. RT ___ 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] Trying to understandi Live Preview
Thank you for that fine idea to set a parameter and turn the instruction on and off that way. I suspected that it is not possible to interact with a Live Preview movie but I've never seen any documentation to that affect. Muzak wrote: Not sure what exactly you're having problems with. If you want the component (on stage) to be interactive, that's not going to work (AFAIK). You could create a paramater available in the Property Inspector to toggle info on and off. import mx.utils.Delegate; class LivePreviewTest extends MovieClip { private var __showInfo:Boolean = false; function LivePreviewTest() { } private function setShowInfo() { trace(LivePreviewTest ::: setShowInfo); trace(- showInfo: +__showInfo); } [Inspectable(defaultValue=false,enumeration=true,false)] function get showInfo():Boolean { return __showInfo; } function set showInfo(val:Boolean):Void { __showInfo = val; if(_global.isLivePreview) setShowInfo(); } } regards, Muzak - Original Message - From: John laPlante [EMAIL PROTECTED] To: flashcoders@chattyfig.figleaf.com Sent: Friday, June 01, 2007 7:45 PM Subject: [Flashcoders] Trying to understandi Live Preview Live Preview has often been a difficult topic to understand. But a couple of very useful posts are available about it. http://readlist.com/lists/chattyfig.figleaf.com/flashcoders/0/243.html http://proalias.com/pipermail/flashcomponents_proalias.com/2005-April/000159.html But, I wonder if it is possible to include user interaction in Live Preview. I build components for people who build computer tutors and I would like to associate contextual instructions with the component that an author could reference when building a tutor with my components. I know that I could put instructional text on the stage and hide it if _global.isLivePreview = false or undefined. But, ideally, the help could be shown / hidden in the LivePreview. The file mm_livepreview.as has a stage listener. Also, in that file, it dynamically creates a movie clip and calls setSize on it. I tried adding onPress and onRelease event handlers to that movie clip but these don't seem to work. In the posts that I've read, claims are made that the LivePreview interpreter is like the flash player but has some differences. I wonder if I'm out-of-luck trying to add this kind of interactivity. mc.onRelease = function(){ trace(initHelp : infoButton_btn.onRollOver); }; mc.onPress = function(){ trace(initHelp : infoButton_btn.onRollOut); }; ___ 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] MVC question
I think you made an error in the use off the eventlistener maybe this will explain http://www.actionscript.org/resources/articles/205/1/The-Delegate-Class/Page1.html var FUNC=function(){trace(funky)} var SCOPE=this; var MYDELEGATE=mx.utils.Delegate.create(SCOPE,FUNC) this.Model.addEventListener(EVENTNAME,FUNC); or this.Model.addEventListener(EVENTNAME,MYDELEGATE); Latcho Giles Roadnight wrote: Hi All I am building my first MVC (Model View Controller) and have a question about how I should set it up. I have a load of classes: BookView, ControlView (both views), Controller and PAModel. Controller holds all the other classes and sets them all up. Both views have a function - setModel: public function setModel(newModel:PAModel):Void { this.Model = newModel; this.Model.addEventListener(PagesUpdated,this); this.Model.addEventListener(currentPageUpdate,this); } that sets the model (obviously) and sets up event listeners. If I try to fire this function in the controller constructor it doesn't fire - presumably the classes haven't woken up yet so I am firing it from a function that fires when XML has loaded. This doesn't seem like the best way of doing it though. What is the best way round this? I have tried firing a onInit function from the views when they are ready but this doesn't seem to work. I assume it's because the addEventListener function doesn't work when the controller tries to register as a listener. Thanks for the help. ___ 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] MVC question
my info in last mail bight be short-sightened if you refered to a function in the classobject itself with the second this this.Model.addEventListener(PagesUpdated,this); Giles Roadnight wrote: Hi All I am building my first MVC (Model View Controller) and have a question about how I should set it up. I have a load of classes: BookView, ControlView (both views), Controller and PAModel. Controller holds all the other classes and sets them all up. Both views have a function - setModel: public function setModel(newModel:PAModel):Void { this.Model = newModel; this.Model.addEventListener(PagesUpdated,this); this.Model.addEventListener(currentPageUpdate,this); } that sets the model (obviously) and sets up event listeners. If I try to fire this function in the controller constructor it doesn't fire - presumably the classes haven't woken up yet so I am firing it from a function that fires when XML has loaded. This doesn't seem like the best way of doing it though. What is the best way round this? I have tried firing a onInit function from the views when they are ready but this doesn't seem to work. I assume it's because the addEventListener function doesn't work when the controller tries to register as a listener. Thanks for the help. ___ 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] combo box problem
Then the REAL problem is that we can't read well! Thanks, RT -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Hans Wichman Sent: Friday, June 01, 2007 4:35 PM To: flashcoders@chattyfig.figleaf.com Subject: Re: [Flashcoders] combo box problem Hi, cool randy, glad its fixed. Note however that that is the solution the article posted before describes:) greetz JC On 6/1/07, Randy Tinfow [EMAIL PROTECTED] wrote: We'd tried this on our own with no success. The brilliant Felix Turner gave us the simple solution: Put the main combobox in a MC and everything else on the stage in a different MC and always make sure the combobox MC is always on top. Too easy... Thanks for all the suggestions. RT -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Muzak Sent: Friday, June 01, 2007 12:36 PM To: flashcoders@chattyfig.figleaf.com Subject: Re: [Flashcoders] combo box problem import mx.managers.DepthManager; import mx.controls.ComboBox; var _cb:ComboBox = ComboBox(createClassChildAtDepth(ComboBox, DepthManager.kTop)); trace(_cb.getDepth()); regards, Muzak - Original Message - From: Randy Tinfow [EMAIL PROTECTED] To: flashcoders@chattyfig.figleaf.com Sent: Friday, June 01, 2007 4:50 PM Subject: RE: [Flashcoders] combo box problem Don't use getNextHighestDepth() when using the v2 component framework. Use the DepthManager. Tried following the DepthManager syntax from the help, but can't get it to work. Can't find any references to more assitance via Google. Do you have any links to useful documentation for the DepthManager class? Thank you very much. We're ready to pull our hair out here. RT ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
[Flashcoders] Best Practices question...
Hi all, this should be kind of a simple one. I have been creating my Private variables as simple camelCased names. private var variableName:VariableType; I have seen other people creating them as underscore camelCased names and recently I was challenged that the underscore was the correct and best practice. private var _variableName:VariableType; I'm not convinced. Does any one have any definative information or experience of this from an OO best practices perspective and an explanation of why the right answer is right? Thanks all S. ___ 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] Best Practices question...
I only use underscore for private variables if I have a public getter and/or setter for that private variable. Otherwise, I don't use underscore. It's also a easy way to see, at a glance, which private variables are private and which are public but private. private var _title:String; public function get title():String { return _title; } ___ 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] MVC question
In an ARP type application, most of the setup is done in the onLoad method of the Application view (which is a container for all views). In other words, BookView, ControlView, etc are children of Application. Also make sure to initialize the EventDispatcher outside the class constructor, through a static variable. Static class properties are run before the constructor ;-) I use a base Form class which all views extend, which looks something like this: import mx.events.EventDispatcher; class com.muzakdeezign.view.Form extends MovieClip { // allow class to broadcast events private static var dispatcherInit = EventDispatcher.initialize(Object(com.muzakdeezign.core.Form.prototype)); // mix-in from EventDispatcher var addEventListener:Function; var removeEventListener:Function; var dispatchEvent:Function; } Then the Application could look like this: import com.muzakdeezign.view.Form; class Application extends Form { private var bookView:BookView; private function onLoad():Void { bookView.setModel(new PAModel()); } } import com.muzakdeezign.view.Form class BookView extends Form { private var __model:PAModel; public function setModel(newModel:PAModel):Void { this.__model = newModel; this.__model.addEventListener(pagesUpdated,this); this.__model.addEventListener(currentPageUpdate,this); } } Now, with all that said, you might wanna look into a ModelLocator Singleton so that view get the required model through the ModelLocator rather then setting it from somewhere (Application in the above example). You can google ARP ModelLocator for more on that. In short, instead of the setModel() method, the BookView would call: ModelLocator.getInstance().getModel(PAModal); which would return a reference to the PAModel (usually also a Singleton). Does that make sense?? regards, Muzak - Original Message - From: Giles Roadnight [EMAIL PROTECTED] To: flashcoders@chattyfig.figleaf.com Sent: Friday, June 01, 2007 4:53 PM Subject: [Flashcoders] MVC question Hi All I am building my first MVC (Model View Controller) and have a question about how I should set it up. I have a load of classes: BookView, ControlView (both views), Controller and PAModel. Controller holds all the other classes and sets them all up. Both views have a function - setModel: public function setModel(newModel:PAModel):Void { this.Model = newModel; this.Model.addEventListener(PagesUpdated,this); this.Model.addEventListener(currentPageUpdate,this); } that sets the model (obviously) and sets up event listeners. If I try to fire this function in the controller constructor it doesn't fire - presumably the classes haven't woken up yet so I am firing it from a function that fires when XML has loaded. This doesn't seem like the best way of doing it though. What is the best way round this? I have tried firing a onInit function from the views when they are ready but this doesn't seem to work. I assume it's because the addEventListener function doesn't work when the controller tries to register as a listener. Thanks for the help. ___ 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] Best Practices question...
Also, when it comes to flags, I use the isSomething naming convention regardless of private/public status. If it's a private flag with a public getter, I make the public getter the name of the flag without the is. private var isActive:Boolean; public function get active():Boolean { return isActive; } Steven Sacks wrote: I only use underscore for private variables if I have a public getter and/or setter for that private variable. Otherwise, I don't use underscore. It's also a easy way to see, at a glance, which private variables are private and which are public but private. private var _title:String; public function get title():String { return _title; } ___ 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] Best Practices question...
[EMAIL PROTECTED] wrote: this should be kind of a simple one. I have been creating my Private variables as simple camelCased names. private var variableName:VariableType; I have seen other people creating them as underscore camelCased names and recently I was challenged that the underscore was the correct and best practice. private var _variableName:VariableType; I'm not convinced. Does any one have any definative information or experience of this from an OO best practices perspective and an explanation of why the right answer is right? When it comes to best practices, the best thing you can do is be consistent. Whether that means consistent with your other library of work or consistent with the rest of the code in a project you have joined, making your code as reliably similar to other associated code should probably be your highest priority. Thus, if you are editing a class that uses underscores for instance variables, you should too. If they don't, then you probably shouldn't either - it gets confusing fast. Personally, I do lean toward using underscores for my instance variables if I can get away with it. This allows for a clean distinction between instance and local variables and is a very easy habit to get into. It's certainly a whole lot nicer and easier to parse visually than having bunches of myThis and myThat ;) It is especially handy to use underscores when you are writing getters and setters for those variables to further distinguish them - you don't have to pick a different name for your public property. And since we're talking best practices, you don't have any public instance variables anyhow, hmm? :) Some people will use two underscores for private vars and one for protected or will come up with some other way to use more underscores. I would recommend against mixing and matching - that degrades readability and gets confusing. You should use either one or two... and two doesn't really gain you anything. I don't know when the last time I used two underscores before a variable name was. Probably in another language when I'm not camel casing things, private instance vars might be named __core_temperature, or something like that. But it's been a while, and since the AS convention is camel casing... consistency above all else ;) Ammon ___ 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] Best Practices question...
There is no right answer ;-) When the first Flash component framework was released, private variables had a double underscore. __width __height etc.. Basically because they usually replaced existing built-in properties, like _width, _height, etc.. So what we ended up with was: Built-in _width _height Private __width __heigth Public width height Personally, I wouldn't use single underscores, because built-in properties use them (in AS1 and AS2). A component that needs its own sizing capabilities would then look something like this: class MyComponent extends MovieClip { private var __width:Number; private var __height:Number; function MyComponent() { __width = _width; __height = _height; // remove scaling that occured on stage _xscale = _yscale = 100; } private funcion size():Void { //use __width and __height for sizing.. } public function setSize(w:Number, h:Number):Void { __width = w; __height = h; size(); } public function get width():Number { return __width; } public function get height():Number { return __height; } } Might be some errors in the above code as I quickly wrote it down. regards, Muzak - Original Message - From: [EMAIL PROTECTED] To: flashcoders@chattyfig.figleaf.com Sent: Saturday, June 02, 2007 12:25 AM Subject: [Flashcoders] Best Practices question... Hi all, this should be kind of a simple one. I have been creating my Private variables as simple camelCased names. private var variableName:VariableType; I have seen other people creating them as underscore camelCased names and recently I was challenged that the underscore was the correct and best practice. private var _variableName:VariableType; I'm not convinced. Does any one have any definative information or experience of this from an OO best practices perspective and an explanation of why the right answer is right? Thanks all S. ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
RE: [Flashcoders] Flash CS3 Prof copy: missing Tree component.
Thats funny. Adobe has put the axe to the tree component and many other components requiring you to use Flex if you want to use them. Adobe's reign of terror and the rise of the Anti-Flash...Flex. First they came for the Accordion and I did not speak out because I did not use the Accordion. Then they came for the Menu MenuBar and I did not speak out because I did not use them. Then they came for the Alert, DateChooser, DateField, and Window and I did not speak out because I was didn't use them very much Then they came for my Tree and there was no one left to speak out for me. http://www.gskinner.com/blog/archives/2007/04/flash_cs3_compo.html (read comments) -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Ung, Seng Sent: Friday, June 01, 2007 12:17 PM To: flashcoders@chattyfig.figleaf.com Subject: [Flashcoders] Flash CS3 Prof copy: missing Tree component. Has anyone noticed that the tree component is missing from the CS3 Web Premium prof. copy after the installation? Is there a link from Adobe site for us to download the tree component? ___ 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] Best Practices question...
And since we're talking best practices, you don't have any public instance variables anyhow, hmm? :) I don't know what best practice you're referring to that claims that you shouldn't have public instance variables. The Wikipedia says NEED CITATION. Which I will promptly ignore as rubbish. ;) ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] Flash CS3 Prof copy: missing Tree component.
That's not the only things *missing*.. No Flash Remoting No Webservices - Original Message - From: Kalani Bright [EMAIL PROTECTED] To: flashcoders@chattyfig.figleaf.com Sent: Saturday, June 02, 2007 1:11 AM Subject: RE: [Flashcoders] Flash CS3 Prof copy: missing Tree component. Thats funny. Adobe has put the axe to the tree component and many other components requiring you to use Flex if you want to use them. Adobe's reign of terror and the rise of the Anti-Flash...Flex. First they came for the Accordion and I did not speak out because I did not use the Accordion. Then they came for the Menu MenuBar and I did not speak out because I did not use them. Then they came for the Alert, DateChooser, DateField, and Window and I did not speak out because I was didn't use them very much Then they came for my Tree and there was no one left to speak out for me. http://www.gskinner.com/blog/archives/2007/04/flash_cs3_compo.html (read comments) -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Ung, Seng Sent: Friday, June 01, 2007 12:17 PM To: flashcoders@chattyfig.figleaf.com Subject: [Flashcoders] Flash CS3 Prof copy: missing Tree component. Has anyone noticed that the tree component is missing from the CS3 Web Premium prof. copy after the installation? Is there a link from Adobe site for us to download the tree component? ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] Flash CS3 Prof copy: missing Tree component.
I think it's kind of odd actually. Remove functionality in the newest version... I know they have to convert all the components to as3 - seems kind of odd though. The web service removal is a major problem though as this is kind of a basic. ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] Flash CS3 Prof copy: missing Tree component.
Flash Remoting has always been a separate download, but I would think that they would have shipped it with CS3 considering. I assume it's on their site as a separate download? Muzak wrote: That's not the only things *missing*.. No Flash Remoting No Webservices - Original Message - From: Kalani Bright [EMAIL PROTECTED] To: flashcoders@chattyfig.figleaf.com Sent: Saturday, June 02, 2007 1:11 AM Subject: RE: [Flashcoders] Flash CS3 Prof copy: missing Tree component. Thats funny. Adobe has put the axe to the tree component and many other components requiring you to use Flex if you want to use them. Adobe's reign of terror and the rise of the Anti-Flash...Flex. First they came for the Accordion and I did not speak out because I did not use the Accordion. Then they came for the Menu MenuBar and I did not speak out because I did not use them. Then they came for the Alert, DateChooser, DateField, and Window and I did not speak out because I was didn't use them very much Then they came for my Tree and there was no one left to speak out for me. http://www.gskinner.com/blog/archives/2007/04/flash_cs3_compo.html (read comments) -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Ung, Seng Sent: Friday, June 01, 2007 12:17 PM To: flashcoders@chattyfig.figleaf.com Subject: [Flashcoders] Flash CS3 Prof copy: missing Tree component. Has anyone noticed that the tree component is missing from the CS3 Web Premium prof. copy after the installation? Is there a link from Adobe site for us to download the tree component? ___ 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] Best Practices question...
On 6/1/07, Steven Sacks [EMAIL PROTECTED] wrote: And since we're talking best practices, you don't have any public instance variables anyhow, hmm? :) I don't know what best practice you're referring to that claims that you shouldn't have public instance variables. Grin. Well, he said OO best practices, not ActionScript ;) Traditional OO design rules state that you should always encapsulate your instance data in getters and setters. The general idea being that external classes should never have the ability or need to manipulate your data for you - they should have to ask nicely and then accept whatever you're willing to do in stead. And I agree with that for the most part. While I can understand the use of public instance variables in AS2 and AS3 them because of backwards mental compatibility with AS1... I only use them in AS2 when the project already does - which is often since most of the AS2 I work with was written by former AS1 devs ;) It's also kind of unreasonable to expect people to use private properties in such a weakly typed language anyway. I find this regrettable in AS2 but acceptable in AS3 since you can still just hook into the property and listen for changes and respond accordingly. That gives you the control you need to safeguard your internal data. Ammon ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] Flash CS3 Prof copy: missing Tree component.
I know it's a seperate download and have been checking the Adobe site now and then for a new release, but nothing.. One would think that they'd learn from previous *mistakes*. Every new release people ask where's Flash Remoting? IIRC it took Macromedia six months to come up with the first AS2 Remoting version. And they repeated that with Flash 8.. Now in all fairness, Remoting is not rocket science and it's not that hard to come up with your own version using NetConnection. Or maybe we can just grab the Flex version and use that (haven't tried yet). regards, Muzak - Original Message - From: Steven Sacks [EMAIL PROTECTED] To: flashcoders@chattyfig.figleaf.com Sent: Saturday, June 02, 2007 1:50 AM Subject: Re: [Flashcoders] Flash CS3 Prof copy: missing Tree component. Flash Remoting has always been a separate download, but I would think that they would have shipped it with CS3 considering. I assume it's on their site as a separate download? Muzak wrote: That's not the only things *missing*.. No Flash Remoting No Webservices - Original Message - From: Kalani Bright [EMAIL PROTECTED] To: flashcoders@chattyfig.figleaf.com Sent: Saturday, June 02, 2007 1:11 AM Subject: RE: [Flashcoders] Flash CS3 Prof copy: missing Tree component. Thats funny. Adobe has put the axe to the tree component and many other components requiring you to use Flex if you want to use them. Adobe's reign of terror and the rise of the Anti-Flash...Flex. First they came for the Accordion and I did not speak out because I did not use the Accordion. Then they came for the Menu MenuBar and I did not speak out because I did not use them. Then they came for the Alert, DateChooser, DateField, and Window and I did not speak out because I was didn't use them very much Then they came for my Tree and there was no one left to speak out for me. http://www.gskinner.com/blog/archives/2007/04/flash_cs3_compo.html (read comments) -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Ung, Seng Sent: Friday, June 01, 2007 12:17 PM To: flashcoders@chattyfig.figleaf.com Subject: [Flashcoders] Flash CS3 Prof copy: missing Tree component. Has anyone noticed that the tree component is missing from the CS3 Web Premium prof. copy after the installation? Is there a link from Adobe site for us to download the tree component? ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] Flash CS3 Prof copy: missing Tree component.
Adobe has put the axe to the tree component and many other components requiring you to use Flex if you want to use them. Hmm, maybe third-party component set is a good choice too, like AsWinghttp://www.aswing.org, it has Tree, Accordion, Menu MenuBar ... :) -- iiley AsWing http://www.aswing.org Personal http://www.iiley.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] Flash CS3 Prof copy: missing Tree component.
And I'll bet that not even half this list knows how to get them to work (no offense anyone). regards, Muzak - Original Message - From: iiley [EMAIL PROTECTED] To: flashcoders@chattyfig.figleaf.com Sent: Saturday, June 02, 2007 4:10 AM Subject: Re: [Flashcoders] Flash CS3 Prof copy: missing Tree component. Adobe has put the axe to the tree component and many other components requiring you to use Flex if you want to use them. Hmm, maybe third-party component set is a good choice too, like AsWinghttp://www.aswing.org, it has Tree, Accordion, Menu MenuBar ... :) -- iiley ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] Flash CS3 Prof copy: missing Tree component.
I agree with you Muzak, i guess so too. But for a new framework, yes you need time to study, but i'll bet AsWing is worth to spent minutes to try. There are Tutorials : http://www.aswing.org/?page_id=6 There are Showcase : http://www.aswing.org/?page_id=7 Component Set Demo : http://demo.aswing.org/ComSet.swf , http://demo.aswing.org/ComSetSkin.swf If you think it useful or interesting in minutes, then study it. Maybe its new, maybe you are already familiar with it(If you know Swing). Just, another choice of components. Regards~~ 2007/6/2, Muzak [EMAIL PROTECTED]: And I'll bet that not even half this list knows how to get them to work (no offense anyone). regards, Muzak - Original Message - From: iiley [EMAIL PROTECTED] To: flashcoders@chattyfig.figleaf.com Sent: Saturday, June 02, 2007 4:10 AM Subject: Re: [Flashcoders] Flash CS3 Prof copy: missing Tree component. Adobe has put the axe to the tree component and many other components requiring you to use Flex if you want to use them. Hmm, maybe third-party component set is a good choice too, like AsWinghttp://www.aswing.org, it has Tree, Accordion, Menu MenuBar ... :) -- iiley ___ 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 -- iiley AsWing http://www.aswing.org Personal http://www.iiley.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] Flash CS3 Prof copy: missing Tree component.
ASWing is a nice alternative, but not a replacement for the Flash components. Meaning, if Adobe wanted people to use other components, why did they even bother with a crippled set in the first place. ASWing components are code only, there's no visual representation on stage, no representation in the Components Panel that you can drag and drop from. That alone will make most Flash users run away screaming (or something like that) ;-). And I'm not a big fan of the API (sorry).. isEditable() setEditable() should (IMO) just be a property: editable Anyway, we're kinda hijacking the thread now, so I'll leave it at that.. regards, Muzak - Original Message - From: iiley [EMAIL PROTECTED] To: flashcoders@chattyfig.figleaf.com Sent: Saturday, June 02, 2007 5:33 AM Subject: Re: [Flashcoders] Flash CS3 Prof copy: missing Tree component. I agree with you Muzak, i guess so too. But for a new framework, yes you need time to study, but i'll bet AsWing is worth to spent minutes to try. There are Tutorials : http://www.aswing.org/?page_id=6 There are Showcase : http://www.aswing.org/?page_id=7 Component Set Demo : http://demo.aswing.org/ComSet.swf , http://demo.aswing.org/ComSetSkin.swf If you think it useful or interesting in minutes, then study it. Maybe its new, maybe you are already familiar with it(If you know Swing). Just, another choice of components. Regards~~ 2007/6/2, Muzak [EMAIL PROTECTED]: And I'll bet that not even half this list knows how to get them to work (no offense anyone). regards, Muzak - Original Message - From: iiley [EMAIL PROTECTED] To: flashcoders@chattyfig.figleaf.com Sent: Saturday, June 02, 2007 4:10 AM Subject: Re: [Flashcoders] Flash CS3 Prof copy: missing Tree component. Adobe has put the axe to the tree component and many other components requiring you to use Flex if you want to use them. Hmm, maybe third-party component set is a good choice too, like AsWinghttp://www.aswing.org, it has Tree, Accordion, Menu MenuBar ... :) -- iiley ___ 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