Re: [Flashcoders] help with datagrid flash 8
Hi Gustavo, I assume that myBlog is a DataGrid component. First of all dataProvider is a property, so the syntax to set it is as follows: myBlog.dataProvider = myParsedRssData; Second I think you need something in between your RSS feed and your DataGrid component. This something must parse your rss.cfm and format it so that it can be fed into your DataGrid's dataProvider property. I have no experience in binding a DataGrid to Web data, but a quick Google search turned up this: http://www.flash-db.com/Tutorials/databind/CatalogTutorial.php?page=6 . It should be applicable for your case (although its DB access and flash MX). HTH, stefan. On 4/23/07, Merrill, Jason <[EMAIL PROTECTED]> wrote: I don't know what your cfm returns, but it needs to match what dataProvider expects. See info on dataprovider in the help docs. Jason Merrill Bank of America GT&O Learning & Leadership Development eTools & Multimedia Team ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/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] attach an icon in a RSL-imported custom RButton implementation?
Flashcoders, I have a custom radiobutton component (MyRButton.as) that resides in a runtime-shared library (RSL). The component consists of an image and a textlabel, and I'm having problems implementing the image part of the component: Whereas the MyRButton code resides in the RSL.swf, the image will reside in MyWebApp.swf (which loads in RSL.swf at runtime). So how can a component from a RSL load in (attachMovie() I guess...) an image that resides in the symbol library of MyWebApp.swf? Any other proposals on how to implement this? Thanks in advance! 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
Re: [Flashcoders] Tooltip for disabled buttons: Ideas?
Thanks Andy and Hans for sharing your solutions. I like both of them and will implement one of them...not sure yet which one, though. stefan. On 1/26/07, Hans Wichman <[EMAIL PROTECTED]> wrote: 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@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/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
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] RE: Keyboard accessibility and sliders
I found a quick (and dirty?) fix to this problem: In 'onKeyDown' handler method of my custom slidebar I do Selection.setFocus(this) at the end (surrounded by an if() checking whether the pressed key was one of UP,DOWN,RIGHT,LEFT). This seems to override the default focus associated action for the arrow keys. As far as I can see, the only restriction introduced by this solution is that one cannot navigate through the tabEnabled controls anymore using the arrow keys. But I believe the TAB / SHIFT+TAB keys are sufficient for this. HTH, stefan. On 12/5/06, Dave Wood <[EMAIL PROTECTED]> wrote: Hi Andrew > Basically, once the slider gains focus, you then use keys to > control the > slider position. The tab key moves the focus away from the slider. > > Here's the shortcuts I'd recommend: > Right arrow and up arrow - increment slider (using right and up allows > the slider to be vertical or horizontal with no impact on users) > Left arrow and down arrow - decrement slider > Ctrl+up and Ctrl+right - large increment > Ctrl+down and ctrl+left - large decrement > Home/end - lowest and highest slider positions Makes perfect sense to me. How would you prevent the left/right arrow keys from moving the focus away from the current slider to the next/previous item in tab order? David ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/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] problem + workaround: mx.core.View.createEmptyMovieClip("myMc"+i, this.getNextHighestDepth())
I found that calling this.createEmptyMovieClip() several times within a class that inherits from mx.core.View causes problems. In my case the following code seems to produce only five red rectangles, and not 7 as I would expect. // NBSLOTS == 7 this.areasMask = new Array(NBSLOTS); for (var k:Number = 0; k < NBSLOTS; k++){ this.areasMask[k] = this.createEmptyMovieClip("myMask"+k, this.getNextHighestDepth()); MovieClip(this.areasMask[k]).moveTo(0,0); MovieClip(this.areasMask[k]).beginFill(0xFF, 100); MovieClip(this.areasMask[k]).lineTo(SLOTWIDTH, 0); MovieClip(this.areasMask[k]).lineTo(SLOTWIDTH, Brick.HEIGHT); MovieClip(this.areasMask[k]).lineTo(0, Brick.HEIGHT); MovieClip(this.areasMask[k]).lineTo(0, 0); MovieClip(this.areasMask[k]).endFill(); MovieClip(this.areasMask[k])._height = Brick.HEIGHT; MovieClip(this.areasMask[k])._width = SLOTWIDTH; MovieClip(this.areasMask[k])._x = k * SLOTWIDTH; MovieClip(this.areasMask[k])._y = BOTTOM_Y - (SLOTHEIGHT-Brick.HEIGHT); MovieClip(this.areasMask[k]).setDepthBelow(this.myBateau); } Am I missing something basic here? My workaround consists in doing var maskCreationGround:MovieClip = this.createEmptyMovieClip("maskCreationGround", this.getNextHighestDepth()); before the for loop. Then, instead of creating the MovieClip instances on 'this.', I create them on maskCreationGround. The corresponding line thus becomes: this.areasMask[k] = maskCreationGround.createEmptyMovieClip("myMask"+k, maskCreationGround.getNextHighestDepth()); Maybe the above workaround will save someone some time-consuming trials-and-errors in the future... 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
Re: [Flashcoders] Runtime sharing: best practice
Hi Michael, I face the same problem you're describing: most of my UI controls are in a shared SWF (source.swf), which is then used by several of my "dest.swf" files. I did some testing, and found it impossible to do a preloader with a progress bar for (or within) dest.swf that takes into account the loading time for source.swf. So what I currently do is using a metaloader.swf with two progress bars. I first load source.swf and indicate the progress on the first progress bar. Upon onLoadComplete I start loading dest.swf. The playhead then hits frame 1 and attempts to load source.swf. As this file is now already cached locally, dest.swf progresses to frame 2 with virtually no shared-library-caused delay. HTH, stefan. On 1/5/07, Mendelsohn, Michael <[EMAIL PROTECTED]> wrote: Hi list... For a swf, dest.swf posted online, what is the best way to make available all of assets it uses that are imported as runtime sharing from a source.swf? Should I do a loadMovie(source.swf) from within dest.swf? Thanks, - Michael M. ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/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] __DATE__ or similar in AS2 ?
Thanks for the proposals; especially the one involving JSFL was actually new to me :-) Another idea (which we like pretty well) is to publish the file to a different filename/path each time a new version is released, i.e., myFlashApp/myApp_v1.swf for the first release, myFlashApp/myApp_v2.swf for the second release, and so on. To avoid having to change the Flash Publish Settings each time, this could be achieved with a script that copies the SWF from the development server to the webserver. As the website that allows to launch myApp is created dynamically, it can always link to the myApp*.swf with the highest number. Within the SWF the version number could then be accessed through the globally accessible variable _url. This would furthermore have the advantage that whenever a new version got published on the webserver, clicking on the myApp link on our (dynamically created) website leads to an SWF with a new URL (i.e., one that is surely not cached in the browser or on a proxy server). stefan. On 12/1/06, Yehia Shouman <[EMAIL PROTECTED]> wrote: I think the JSFL offers a great solution if you can have a command to publish which will alter a variable __DATE__ (perhaps a counter) on the root of the swf before calling publish document. Not sure if this is possible, but thats how I'd think of it theoritically Y Shouman On 12/1/06, Michael Stuhr <[EMAIL PROTECTED]> wrote: > > Stefan Thurnherr schrieb: > > Hi flashcoders, > > > > I am looking for an easy way to indicate an SWF's version on the stage > > (i.e. via a textfield). I guess the easiest way would be if there was > > a compiler literal like __DATE__ (indicating the time/date of > > compilation) available within ActionScript. But I couldn't find any > > such thing neither in the livedocs, nor with the help of the almighty > > G. > > > > I'd prefer a solution that also works offline (i.e., not involving a > > call to a server-side script that gives the SWF access to its own > > time/date of creation). > > > > How do other flashcoders solve this problem? > > > > i've created a not-even-near-perfect serial-builder with jsfl. > > i'd always wanted to make this an os-version, but haven't had the time to > do this. > > but before offering you my crappy code, i'd like to hear what others do > have. > > > micha > > ___ > Flashcoders@chattyfig.figleaf.com > To change your subscription options or search the archive: > http://chattyfig.figleaf.com/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] __DATE__ or similar in AS2 ?
Hi flashcoders, I am looking for an easy way to indicate an SWF's version on the stage (i.e. via a textfield). I guess the easiest way would be if there was a compiler literal like __DATE__ (indicating the time/date of compilation) available within ActionScript. But I couldn't find any such thing neither in the livedocs, nor with the help of the almighty G. I'd prefer a solution that also works offline (i.e., not involving a call to a server-side script that gives the SWF access to its own time/date of creation). How do other flashcoders solve this problem? 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
Re: [Flashcoders] Problem with parsing Webservice result correctly!
Might be that you need to explicitely indicate that ArrayOfString is an array (in XML terms: a sequence), i.e.: [...] feild1 feild2 [...] In our experience Flash can only successfully populate an Array if that "sequence" indication is there. HTH, stefan. On 9/4/06, Martin Baltzer Hennelund <[EMAIL PROTECTED]> wrote: Hi Thanks for your effort but I don't think that this could help all though its really interesting :-) Cheers Martin -Oprindelig meddelelse- Fra: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] På vegne af Merrill, Jason Sendt: 1. september 2006 13:50 Til: Flashcoders mailing list Emne: RE: [Flashcoders] Problem with parsing Webservice result correctly! Also, if this helps: http://www.sephiroth.it/tutorials/flashPHP/webServiceConnector/ Here is the WSDL is uses: http://www.xmethods.net/sd/2001/BabelFishService.wsdl Jason Merrill Bank of America Learning & Organization Effectiveness - Technology Solutions >>-Original Message- >>From: [EMAIL PROTECTED] [mailto:flashcoders- >>[EMAIL PROTECTED] On Behalf Of Merrill, Jason >>Sent: Friday, September 01, 2006 7:38 AM >>To: Flashcoders mailing list >>Subject: RE: [Flashcoders] Problem with parsing Webservice result correctly! >> >>Be sure you wait for the result from the webservice and then try to >>access the data. I had the same problem in a recent thread (C# .NET >>and Webservices) and realized I needed to be sure I not only waited for >>the method to load, but also waited for the webservice method to finish. >>Was a duh moment for me. Then I could use the result as an object in >>Flash, even a very complex one: >> >>var thisEffect:String = Obj.Content.Topics[i].Images[n].Effect; >> >>So it definitely is supported and works, you may just not have waited >>long enough for the result? >> >>Jason Merrill >>Bank of America >>Learning & Organization Effectiveness - Technology Solutions >> >> >> >> >> >> -Original Message- From: [EMAIL PROTECTED] [mailto:flashcoders- [EMAIL PROTECTED] On Behalf Of Martin Baltzer Hennelund Sent: Friday, September 01, 2006 5:27 AM To: Flashcoders mailing list Subject: [Flashcoders] Problem with parsing Webservice result >>correctly! Hi, Flash apparently fails to correctly parse a webservice function that returns a class/Object/Struct (Using Csharp to create the webservice). The following is returned from the service when hitting it in IE and >>is perfectly fine. http://www.w3.org/2001/XMLSchema"; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; xmlns="http://XXX/";> ArrayOfString feild1 feild2 The reply is equal to a class/Object with the name "WsReply" with two public fields one called "type" which is of type string and the second "ArrayOfString" which is an array of strings. But when the reply is parsed by Flash (mx.services.WebService) it >>looses the values inside the array even though the array is correctly >>populated with two fields (And it is a real array). When I do a for...in trace on the onResult object I get the following ArrayOfString: undefined,undefined type: ArrayOfString Anyone know why this is happening? When I read the Webservice documentation it seems like flash should support classes/Objects as a webservice return type??? Thanks a lot in advance Martin Baltzer Heres my very simple code for reference:) / import mx.services.Log; import mx.services.WebService; class dk.xxx.test.TestWS { public function TestWS() { var wsLog:Log = new Log(Log.NONE); wsLog.onLog = function(txt) { trace("wsLog:" + txt); }; var myService:WebService = new WebService("http://.com/Service.asmx?WSDL";, wsLog); myService.onFault = function(fault) { // Your code here. var s: String = ""; for (var x:String in fault){ s += "\n" + x +": " + fault[x]; } trace("fault:" + s); }; var serviceCall = myService.getTest(); serviceCall.onResult = function(result:Object) { var s: String = ""; for (var x:String in result){ s += "\n" + x + ": " + result[x]; } trace(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 Ado
[Flashcoders] titled border around radio buttons?
I'd like to create a titled border around a variable number of radio buttons. My idea is to create a MyTitledBorder extends RectBorder which exposes methods allowing me to add/iterate over/remove the RadioButton instances that the MyTitledBorder instance currently displays. A draw method would then add/remove the radio button movieclips and adjust the border. Has anyone on this list done this before? Would that solution go into the right direction? Any thought sharing is appreciated. 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] Re: How to set fontSize of TextInput/Label ?
solved. But I can't tell you why, it just works now. Seems that sleeping made the AS compiler reconsider my instructions ;-) On 6/8/06, Stefan Thurnherr <[EMAIL PROTECTED]> wrote: Hi all, For an application that I am developing I have subclassed those UI components that I'll most commonly use (Label, Button, TextInput, CheckBox, RadioButton). Among other things I'd like to be able to set the fontSize/fontFamily/fontWeight in a single place, and I chose for this the init() method of the component subclasses (LernLabel, LernButton, LernTextInput, LernCheckBox, LernRadioButton) [1]. While I have no problem setting the fontFamily and fontWeight properties for all my subclassed components, I experience some difficulties with the fontSize property: I could set the fontSize for LernButton, LernRadioButton and LernCheckBox, but I had no success in doing the same for LernLabel and LernTextInput. I tried both this.setStyle("fontSize", 18) and this.fontSize = 18 (both of them in the subclasses init() method and also in the onLoad() method), none of them succeeded. The only "lead" that I have is that I found out that when resizing a TextInput/Label, the font gets adjusted automatically. Does that mean that one cannot set the fontSize explicitely for TextInput and Label components (or their subclasses)? I couldn't find anything helpful on google, so I am posting on this mailing list. Any help appreciated! Thanks, stefan. [1]: Is that the right place to do the "styling" of my component subclasses? Or should it be done in the createChildren() or onLoad() method ? ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/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] How to set fontSize of TextInput/Label ?
Hi all, For an application that I am developing I have subclassed those UI components that I'll most commonly use (Label, Button, TextInput, CheckBox, RadioButton). Among other things I'd like to be able to set the fontSize/fontFamily/fontWeight in a single place, and I chose for this the init() method of the component subclasses (LernLabel, LernButton, LernTextInput, LernCheckBox, LernRadioButton) [1]. While I have no problem setting the fontFamily and fontWeight properties for all my subclassed components, I experience some difficulties with the fontSize property: I could set the fontSize for LernButton, LernRadioButton and LernCheckBox, but I had no success in doing the same for LernLabel and LernTextInput. I tried both this.setStyle("fontSize", 18) and this.fontSize = 18 (both of them in the subclasses init() method and also in the onLoad() method), none of them succeeded. The only "lead" that I have is that I found out that when resizing a TextInput/Label, the font gets adjusted automatically. Does that mean that one cannot set the fontSize explicitely for TextInput and Label components (or their subclasses)? I couldn't find anything helpful on google, so I am posting on this mailing list. Any help appreciated! Thanks, stefan. [1]: Is that the right place to do the "styling" of my component subclasses? Or should it be done in the createChildren() or onLoad() method ? ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/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] createClassObject with List Class funky
On 4/27/06, August Gresens <[EMAIL PROTECTED]> wrote: > No, that didn't work. Actually, I'm doing this within a non-movieclip > extended class, so the syntax is like this: > > clip_mc.createClassObject(List, "listText_lst", clip.getNextHighestDepth() > ); > clip_mc.listText_lst.setSize(550, 150); > clip_mc.listText_lst.move(listText.x+50, listText.y+50); > > But that doesn't work either. > > Would it make a difference if this is happening outside a movieclip class? > > In the documentation, it does say that that the UIObject class "wraps" the > MovieClip class - so I'm wondering if that is the problem. The > createClassObject method does not come up in the code hinting for the > MovieClip class either. Perhaps the method does not exist in the plain old > MovieClip class? I just checked with the Macromedia livedocs, and createClassObject() indeed is a member of the UIObject class. MovieClip is the superclass of UIObject, and according to the AS2.0 Language Reference, MovieClip does not have any createClassObject() member...so now I don't understand why aMovieClip.createClassObject() works at all, eventhough I am successfully using it. Can someone else shed some light on this issue? Cheers, stefan. > > Thanks, > > August > > On 4/27/06, Stefan Thurnherr <[EMAIL PROTECTED]> wrote: > > > > On 4/27/06, August Gresens <[EMAIL PROTECTED]> wrote: > > > Trying to create a List Class instance and having trouble. The list > > shows up > > > on the stage, but the variable returned from createClassObject is null, > > so I > > > cannot change the format or reposition it. > > > > > > This code is based on an example in the Mook Essential ActionScript > > book. > > > The List composnent is in the Library and placed on frame after the > > classes > > > have loaded. > > > > > > // begin code snippet > > > > > > import mx.controls.List > > > > > > var listText:List; > > > > > > clip_mc = parent_mc.createEmptyMovieClip( "clip", > > parent.getNextHighestDepth() > > > ); > > > listText = clip_mc.createClassObject(List, "listText_lst", > > > clip.getNextHighestDepth() ); > > > > > > // these commands have no effect -- debugger shows that listText is > > null. > > > listText.setSize(550, 150); > > > listText.move(listText.x+50, listText.y+50); > > > > Have you tried > > > > listText_lst.setSize(550, 150); > > listText_lst.move(listText.x+50, listText.y+50); > > > > instead? I am not sure whether createClassObject returns the created > > class object... > > > > HTH, > > stefan. > > > > > > > > > > > Any thoughts? > > > > > > Thanks, > > > > > > August > > > > > > -- > > > - > > > > > > > > > August Gresens > > > Technical Director > > > Black Hammer Productions, NYC > > > [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 > > > > > ___ > > Flashcoders@chattyfig.figleaf.com > > To change your subscription options or search the archive: > > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders > > > > Brought to you by Fig Leaf Software > > Premier Authorized Adobe Consulting and Training > > http://www.figleaf.com > > http://training.figleaf.com > > > > > > -- > - > > > August Gresens > Technical Director > Black Hammer Productions, NYC > [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 > ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/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] createClassObject with List Class funky
On 4/27/06, August Gresens <[EMAIL PROTECTED]> wrote: > Trying to create a List Class instance and having trouble. The list shows up > on the stage, but the variable returned from createClassObject is null, so I > cannot change the format or reposition it. > > This code is based on an example in the Mook Essential ActionScript book. > The List composnent is in the Library and placed on frame after the classes > have loaded. > > // begin code snippet > > import mx.controls.List > > var listText:List; > > clip_mc = parent_mc.createEmptyMovieClip( "clip", parent.getNextHighestDepth() > ); > listText = clip_mc.createClassObject(List, "listText_lst", > clip.getNextHighestDepth() ); > > // these commands have no effect -- debugger shows that listText is null. > listText.setSize(550, 150); > listText.move(listText.x+50, listText.y+50); Have you tried listText_lst.setSize(550, 150); listText_lst.move(listText.x+50, listText.y+50); instead? I am not sure whether createClassObject returns the created class object... HTH, stefan. > > > Any thoughts? > > Thanks, > > August > > -- > - > > > August Gresens > Technical Director > Black Hammer Productions, NYC > [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 > ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/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] aStaticFunction.call(undefined) ?
Hi All, Is it possible to use call() on a Function instance that represents a static function? Since Function.call(thisObject) has a mandatory argument, what would I have to use as the argument in the case of a static function ? The bigger picture of this question is as follows: I'd like to implement a couple of exercises in a Flash application. I plan to create a Symbol backed by an AS class for each exercise. As AS does not have a fully fledged introspection framework, I plan to put all available exercises in an array in an ExerciseRegistry object (AS class, Singleton, implements mx.utils.Iterator). When the application starts, I query ExerciseRegistry for registered exercises and for every exercise I'll create a Button (aMovieClip.createClassObject(...)) with an appropriate label. The method ExerciseRegistry.instantiate(aButtonLabel) allows me to instantiate an exercise upon clicking a button. But here the issue described above comes into play: If all my Exercises implement a static Function 'instantiate()', how can I call this method programmatically, i.e., from within my ExerciseRegistry's AS code? The alternative would be to call every exercise's Constructor, but how do I do this with the call() method? I believe 'thisObject' doesn't make any sense neither in the context of a Constructor. Any help is appreciated! I am also open to completely different solutions as I am not in a very advanced stage of the project yet. Thanks a lot. 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