[Flashcoders] Tracking end of movie clip stored in class?
Ok, have another quandry. I have an explosion class that, among other things creates and stores an instance of an explosion clip that runs for 5 frames. Each instance of the explosion class created is in turn attached to an array (shotExplosions[]). Explosions are added to the playfield clip by: thePlayfield.addChild(shotExplosions[num].getExplosion()); (where num is an index number) My quandry is, how do I track and remove the clip when its done playing? I tried adding parent.removeChild(this); directly to the explosion moveclip timeline in the 5th frame, which sort of works. The problem is, the explosion animation does a sudden jerky slowdown before completing and then generates the output error: TypeError: Error #1009: Cannot access a property or method of a null object reference. at explosion/::frame5() Can anyone recommend a correction, or is there just a completely simpler way to do this? To sum it up, all I want to do is have the clip removed from the thePlayfield display list when its done playing. Marty ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/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] Flashcoders [Object vars vs Component Params]
Quick Q (without testing myself yet)... I have a component that takes params via Component Params panel (inspectable meta) - cool. But I also would like one to be able to set some of those params via SWFobject javascript. like: var so = new SWFObject("movie.swf", "mymovie", "400", "200", "8", "#336699"); so.addVariable("variable1", "value1"); ... I can then have the component check a location (_root or _parent, etc) for those variables and then use those instead... I am assuming that the inspectable params are set before frame1, and then the vars passed into a SWF come in on frame1... Does this sound about right? - Eric ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/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] Depth issues...
Thats great! exactly what I was looking for. cheers, Darren On 07/08/07, Jack Doyle <[EMAIL PROTECTED]> wrote: > > I ran into the same problems a while back. I created a LevelsManager class > to get around it which you can set to "hijack" the getNextHighestDepth() > function. That way, you can run one line of code at the beginning of your > application and all your getNextHighestDepth() calls will work regardless > of > whether or not there are components on the stage. You can download the > small > class file at http://www.greensock.com/ActionScript/LevelsManager.zip. > Here > is the primary function I used in that class: > > function getNextHighestDepth(mc:Object):Number { > if (mc == undefined) {mc = this}; > var maxDepth_num:Number = mc.getNextHighestDepth(); > if (maxDepth_num != undefined && maxDepth_num < 16000) { > return maxDepth_num; > } else { > maxDepth_num = -1; > var depth_num:Number; > var obj:Object; > var tf = TextField.prototype; > for (var p in mc) { > obj = mc[p]; > if ((typeof(obj) == "movieclip" || obj.__proto__ > == > tf) && obj._parent == mc) { > depth_num = obj.getDepth(); > if (depth_num > maxDepth_num && depth_num > < > 16000) { > maxDepth_num = depth_num; > } > } > } > return maxDepth_num + 1; > } > } > > Jack > > ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/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] setStyle ComboBox (AS2)
Try the following and omit the new CSSStyleDeclaration(): _global.styles.rectBorderClass.setStyle("borderStyle", "solid"); _global.styles.rectBorderClass.setStyle("borderColor", 0xD35800); -Original Message- From: Mendelsohn, Michael [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 07, 2007 10:59 AM To: flashcoders@chattyfig.figleaf.com Subject: [Flashcoders] setStyle ComboBox (AS2) Hi list... The V2 ComboBox is made up of instances of a Button, TextInput and List. The TextInput contains an instance of RectBorder. I can't figure out how to setStyle on it. This looks intuitive, but doesn't work: _global.styles.ComboBox.TextInput.RectBorder.setStyle("borderColor", 0xB86400); This isn't working in my code either: _global.styles.RectBorder = new CSSStyleDeclaration(); _global.styles.RectBorder.setStyle("borderStyle", "solid"); _global.styles.RectBorder.setStyle("borderColor", 0xD35800); Any suggestions? - 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
RE: [Flashcoders] AS3 loader applicationDomain question
getDefinitionByName is a method of the utils package, its not gonna work from applicationDomain BLITZ | Patrick Matte - 310-551-0200 x214 -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Matt Muller Sent: Tuesday, August 07, 2007 2:49 PM To: flashcoders@chattyfig.figleaf.com Subject: Re: [Flashcoders] AS3 loader applicationDomain question try... var ClassReference:Class = event.target.applicationDomain. getDefinitionByName(className) as Class; MaTT On 8/7/07, Muzak <[EMAIL PROTECTED]> wrote: > > ClassReference is a reserved word, at least it is in Flex 2. > > regards, > Muzak > > - Original Message - > From: "Patrick Matte|BLITZ" <[EMAIL PROTECTED]> > To: > Sent: Tuesday, August 07, 2007 10:05 PM > Subject: [Flashcoders] AS3 loader applicationDomain question > > > Is this supposed to work? > Right now flash IDE crashes everytime when it reaches the line: var > instance = new ClassReference(); > I just want to add the loader.content to the stage instead of the whole > loader instance and I thought that would work.. > > function load():void{ > var loader:Loader = new Loader(); > loader.contentLoaderInfo.addEventListener(Event.COMPLETE, > completeEvent); > var request:URLRequest = new URLRequest(source); > loader.load(request); > } > > function completeEvent(event:Event):void { > var className:String = getQualifiedClassName( > event.target.content); > var ClassReference:Class = > event.target.applicationDomain.getDefinition(className) as Class; > var instance = new ClassReference(); > addChild (instance); > } > > > > ___ > Flashcoders@chattyfig.figleaf.com > To change your subscription options or search the archive: > http://chattyfig.figleaf.com/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] AS3 loader applicationDomain question
try... var ClassReference:Class = event.target.applicationDomain. getDefinitionByName(className) as Class; MaTT On 8/7/07, Muzak <[EMAIL PROTECTED]> wrote: > > ClassReference is a reserved word, at least it is in Flex 2. > > regards, > Muzak > > - Original Message - > From: "Patrick Matte|BLITZ" <[EMAIL PROTECTED]> > To: > Sent: Tuesday, August 07, 2007 10:05 PM > Subject: [Flashcoders] AS3 loader applicationDomain question > > > Is this supposed to work? > Right now flash IDE crashes everytime when it reaches the line: var > instance = new ClassReference(); > I just want to add the loader.content to the stage instead of the whole > loader instance and I thought that would work.. > > function load():void{ > var loader:Loader = new Loader(); > loader.contentLoaderInfo.addEventListener(Event.COMPLETE, > completeEvent); > var request:URLRequest = new URLRequest(source); > loader.load(request); > } > > function completeEvent(event:Event):void { > var className:String = getQualifiedClassName( > event.target.content); > var ClassReference:Class = > event.target.applicationDomain.getDefinition(className) as Class; > var instance = new ClassReference(); > addChild (instance); > } > > > > ___ > Flashcoders@chattyfig.figleaf.com > To change your subscription options or search the archive: > http://chattyfig.figleaf.com/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] 3StudioMax to Flash CS3
I haven't used the software yet, but you may want to look into Swift 3D and its 3DSMax plugin. http://www.erain.com/products/Plug-ins/ Also, you probably don't want them as bitmaps, but if you did, you could probably render each file out as a sequence of images, and I'm pretty sure if Flash sees sequential numbered files it will ask if you want to bring them in as a sequence on the timeline. You could probably write some JSFL to import, and save each sequence as a SWF, then import the SWFs back into the library as movieclips. ben Ashwan Wadhwa wrote: Hello! Here is what I am trying to do, maybe someone can point me to some resources that will help me ! I have 3D model in 3DStudio Max and I need to import some 400+ unique 3D objects into Flash and convert them to movie clips . Each 3D object is individually named, and I need to make sure the naming convention follows through into Flash. I need to do this process multiple times while using different camera angles. I don't need to preserve the 3D functionality in Flash - so I don't need to use PaperVision, Sandy etc. Are there any reference scripts, commercial plug-ins etc?? I am assuming : Writing a Script in Max -> AI File or something -> Import into Max -> Some kind of a JSFL script to convert the objects. Thanks!! Ashwan. ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/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] 3StudioMax to Flash CS3
this might be what you're after: http://www.dreammania.net/showcase/as3-geom-class-exporter-for-3ds-max-english/ though, you'd need Papervision3D to render it, still might be what you're after. On 8/7/07, Ashwan Wadhwa <[EMAIL PROTECTED]> wrote: > > Hello! > > Here is what I am trying to do, maybe someone can point me to some > resources that will help me ! > > I have 3D model in 3DStudio Max and I need to import some 400+ unique 3D > objects into Flash and convert them to movie clips . Each 3D object is > individually named, and I need to make sure the naming convention follows > through into Flash. I need to do this process multiple times while using > different camera angles. I don't need to preserve the 3D functionality in > Flash - so I don't need to use PaperVision, Sandy etc. Are there any > reference scripts, commercial plug-ins etc?? > > I am assuming : Writing a Script in Max -> AI File or something -> Import > into Max -> Some kind of a JSFL script to convert the objects. > > Thanks!! > Ashwan. > > ___ > Flashcoders@chattyfig.figleaf.com > To change your subscription options or search the archive: > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders > > Brought to you by Fig Leaf Software > Premier Authorized Adobe Consulting and Training > http://www.figleaf.com > http://training.figleaf.com > -- [ JPG ] ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] Key repeating in AS3?
Ricky - you were 100% correct and I bow to your insight. ;) Thanks for the help, worked out a version based on your example. Marty > >You shouldn't rely on the interval of the KEY_DOWN to drive your game >logic. It's not reliable, as you are seeing. If you track the state of >the keys, you can check the state in your main game loop and do the >appropriate action every time the loop updates. Here's a very basic >example of what I'm talking about: >http://www.ryoshu.com/flashcoders/SimpleGame.as > >By tracking key state in the game loop you have better control over what >your game objects do and when they do it. > >-Ricky > > ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/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] 3StudioMax to Flash CS3
Hello! Here is what I am trying to do, maybe someone can point me to some resources that will help me ! I have 3D model in 3DStudio Max and I need to import some 400+ unique 3D objects into Flash and convert them to movie clips . Each 3D object is individually named, and I need to make sure the naming convention follows through into Flash. I need to do this process multiple times while using different camera angles. I don't need to preserve the 3D functionality in Flash - so I don't need to use PaperVision, Sandy etc. Are there any reference scripts, commercial plug-ins etc?? I am assuming : Writing a Script in Max -> AI File or something -> Import into Max -> Some kind of a JSFL script to convert the objects. Thanks!! Ashwan. ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] AS3 loader applicationDomain question
ClassReference is a reserved word, at least it is in Flex 2. regards, Muzak - Original Message - From: "Patrick Matte|BLITZ" <[EMAIL PROTECTED]> To: Sent: Tuesday, August 07, 2007 10:05 PM Subject: [Flashcoders] AS3 loader applicationDomain question Is this supposed to work? Right now flash IDE crashes everytime when it reaches the line: var instance = new ClassReference(); I just want to add the loader.content to the stage instead of the whole loader instance and I thought that would work.. function load():void{ var loader:Loader = new Loader(); loader.contentLoaderInfo.addEventListener(Event.COMPLETE, completeEvent); var request:URLRequest = new URLRequest(source); loader.load(request); } function completeEvent(event:Event):void { var className:String = getQualifiedClassName(event.target.content); var ClassReference:Class = event.target.applicationDomain.getDefinition(className) as Class; var instance = new ClassReference(); addChild (instance); } ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/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] AS3 loader applicationDomain question
Is this supposed to work? Right now flash IDE crashes everytime when it reaches the line: var instance = new ClassReference(); I just want to add the loader.content to the stage instead of the whole loader instance and I thought that would work.. function load():void{ var loader:Loader = new Loader(); loader.contentLoaderInfo.addEventListener(Event.COMPLETE, completeEvent); var request:URLRequest = new URLRequest(source); loader.load(request); } function completeEvent(event:Event):void { var className:String = getQualifiedClassName(event.target.content); var ClassReference:Class = event.target.applicationDomain.getDefinition(className) as Class; var instance = new ClassReference(); addChild (instance); } ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/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] stage.stageWidth annoyance
I can't speak to AS3, but in AS2 I have to do an interval which constantly checks the stage width. Initially it's the size given at build time, then it switches to 0, then some time later it switches to the actual size. I have all my initialization wait until I see the size set to something other than 0 or 1 (I set everything to 1x1 at build time so I can detect it). I'd hope it's better in AS3, but maybe not. -Andy On 8/7/07, mario gonzalez <[EMAIL PROTECTED]> wrote: > Anyone??? > > Is using timeout for this just standard practice? > > mario gonzalez wrote: > > When I compile the SWF (flash 9 / as3.0) I have a function which uses > > stage.stageWidth to create a grid. > > > > For the children of any object, I of course use Event.ADDED_TO_STAGE > > to avoid getting a null reference to stage. However this is for my > > document class. > > The hacky work around that I have is to put the function on a timeout. > > I feel like this shouldn't have to be done, and there must be some way > > of getting the right dimensions of the stage from flash on creation. > > > > Does this happen to other people? > > ___ > > Flashcoders@chattyfig.figleaf.com > > To change your subscription options or search the archive: > > http://chattyfig.figleaf.com/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] Q:Integrating SWFobject/UFO with Flash JavaScript Integration Kit
Hi I need to use the Flash JavaScript Integration Kit but am using UFO for flash detection. Is there an example somewhere of how to integrate the 2? [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] Key repeating in AS3?
Martin Scott Goldberg wrote: Ricky, thanks for the response but I don't see how a boolean variable would help. I don't want to ignore key repeats, I want the pause after the initial key press to go away and just start right in to the repeats. In AS2 there was no pause, and in AS3 there there is. You shouldn't rely on the interval of the KEY_DOWN to drive your game logic. It's not reliable, as you are seeing. If you track the state of the keys, you can check the state in your main game loop and do the appropriate action every time the loop updates. Here's a very basic example of what I'm talking about: http://www.ryoshu.com/flashcoders/SimpleGame.as By tracking key state in the game loop you have better control over what your game objects do and when they do it. -Ricky ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/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] stage.stageWidth annoyance
Anyone??? Is using timeout for this just standard practice? mario gonzalez wrote: When I compile the SWF (flash 9 / as3.0) I have a function which uses stage.stageWidth to create a grid. For the children of any object, I of course use Event.ADDED_TO_STAGE to avoid getting a null reference to stage. However this is for my document class. The hacky work around that I have is to put the function on a timeout. I feel like this shouldn't have to be done, and there must be some way of getting the right dimensions of the stage from flash on creation. Does this happen to other people? ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/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] setStyle ComboBox (AS2)
One approach that should work is skinning, which can be done in several ways. Take a look at http://www.adobe.com/devnet/flash/articles/skinning_2004_print.html -- Bob Hadsell> Date: Tue, 7 Aug 2007 10:58:50 -0400> From: [EMAIL PROTECTED]> To: flashcoders@chattyfig.figleaf.com> Subject: [Flashcoders] setStyle ComboBox (AS2)> > Hi list...> > The V2 ComboBox is made up of instances of a Button, TextInput and List.> The TextInput contains an instance of RectBorder. I can't figure out> how to setStyle on it.> > This looks intuitive, but doesn't work:> _global.styles.ComboBox.TextInput.RectBorder.setStyle("borderColor",> 0xB86400);> > This isn't working in my code either:> _global.styles.RectBorder = new CSSStyleDeclaration();> _global.styles.RectBorder.setStyle("borderStyle", "solid");> _global.styles.RectBorder.setStyle("borderColor", 0xD35800);> > Any suggestions?> - 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 _ Learn. Laugh. Share. Reallivemoms is right place! http://www.reallivemoms.com?ocid=TXT_TAGHM&loc=us___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
[Flashcoders] FLV issues on Mac & PC
Hello, We're creating a training CD-Rom that uses multiple swfs and FLVs. One of the requirements is that the CD-Rom work both on a Mac and PC. We're having some difficulties getting the FLVs to play on the Mac. The problem seems to stem from differences in how the Mac (Safari?) pull FLVs. If I have the FLV on the root directory of the CD-Rom with the main_application.swf file, it plays fine, but if I have the course directories structured how I would like (explained below) it wont play on the Mac. It continues to play on the PC. I would like to have all my swfs organized in volume->chapter folder structure, and all the FLV videos in a separate Videos folder at the root level. Since the main_application.swf loads in other SWFs, the loaded swfs are treated as if they too are on the root level (instead of e:\volume\chapter\loaded_swf.swf). This would seem to work fine, because then I could still point al the swfs to look for the flv in the videos directory at the root, but like I said, unless I have the FLVs on the root level they won't load. Unfortunately, I can't seem to get this system to work on the Mac. If I put all the flvs at the root level it will work, but we're looking at some 50+ flvs, and that would be really cluttered and un-organized. We'd also like to avoid using projectors, since this will eventually be moved to the internet. Thoughts or suggestions much appreciated. Let me know if you need further clarifications. Thanks! -Dan This e-mail and its attachments are intended only for the use of the addressee(s) and may contain privileged, confidential or proprietary information. If you are not the intended recipient, or the employee or agent responsible for delivering the message to the intended recipient, you are hereby notified that any dissemination, distribution, displaying, copying, or use of this information is strictly prohibited. If you have received this communication in error, please inform the sender immediately and delete and destroy any record of this message. Thank you. ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/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] setStyle ComboBox (AS2)
Hi list... The V2 ComboBox is made up of instances of a Button, TextInput and List. The TextInput contains an instance of RectBorder. I can't figure out how to setStyle on it. This looks intuitive, but doesn't work: _global.styles.ComboBox.TextInput.RectBorder.setStyle("borderColor", 0xB86400); This isn't working in my code either: _global.styles.RectBorder = new CSSStyleDeclaration(); _global.styles.RectBorder.setStyle("borderStyle", "solid"); _global.styles.RectBorder.setStyle("borderColor", 0xD35800); Any suggestions? - 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
Re: [Flashcoders] Q: Mootools morph text effect
use a quick interval and change the background, text size, padding, etc. during it. On 8/7/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > Hi > Does anyone know a way to morph 2 textfields as they are done using the > (quite amazing) Mootools javascript framework? > > http://demos.mootools.net/Fx.Morph > > > [e] jbach at bitstream.ca > [c] 416.668.0034 > [w] www.bitstream.ca > > "...all improvisation is life in search of a style." > - Bruce Mau,'LifeStyle' > ___ > Flashcoders@chattyfig.figleaf.com > To change your subscription options or search the archive: > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders > > Brought to you by Fig Leaf Software > Premier Authorized Adobe Consulting and Training > http://www.figleaf.com > http://training.figleaf.com > ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] Some CS3 observations; library and sound
Zeh Fernando wrote: AS3's substitution of attachMovie for the movieclip constructor is, while logical on the surface, somewhat baffling to me in practise. In AS2, extending MovieClip required you to declare variables to gain references to clips already instanced in the library movieclip. For instance, extending a movieclip containing a textfield with instance name "nameField" would require var nameField:TextField to gain control of that field in the class. What this gives you on script level is an overview of relevant movieclip members, as well as code completion. In AS3, declaring variables to refer to hand placed movieclip members throws an error: 1151: A conflict exists with definition x in namespace internal. When using classes, go to your publish settings, actionscript, and turn off "automatically declare stage instances" and it should behave as it did before -- you'll need to declare stage instances yourself. I agree that's odd, I use it off, but I guess they decided to add it on by default is so beginners wouldn't have trouble dealing with elements when coding 'on the timeline'. Zeh ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com my god, thank you so much :) -- mvh Andreas Rønning Senior Flash developer - Rayon Visual Concepts Karenslyst allè 16f 0214 Oslo, Norway t: +47 22 13 52 50 f: +47 22 13 52 60 www.rayon.no ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/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: Mootools morph text effect
Hi Does anyone know a way to morph 2 textfields as they are done using the (quite amazing) Mootools javascript framework? http://demos.mootools.net/Fx.Morph [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] Key repeating in AS3?
Ricky, thanks for the response but I don't see how a boolean variable would help. I don't want to ignore key repeats, I want the pause after the initial key press to go away and just start right in to the repeats. In AS2 there was no pause, and in AS3 there there is. Marty >Martin Scott Goldberg wrote: >> I need to get rid of that pause in between the initial keypress and the >> repeat so I have a smooth control like I had in as2. Anyone have any >> insight? > >The event model has changed quite a bit, but I think you are dealing >with an architecture issue. You should set a boolean variable that >tracks the state of each key you have assigned and read that variable >when you update the game state. You can run into a lot of issues with >complex games if you are pushing state information from different sources. > >hth > >-Ricky >___ >Flashcoders@chattyfig.figleaf.com >To change your subscription options or search the archive: >http://chattyfig.figleaf.com/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] Prevent Ctrl+wheel and Shift+wheel
Is there a way to intercept Ctrl+mousewheel and Shift+mousewheel events in the browser? I am using those two events in my app to do zoom-in/out and pan, respectively. The problem is that Ctrl+mousewheel also increases/decreases text size in the browser, while Shift-mousewheel navigates through the browser history. I've managed to prevent the regular scroll event from triggering using javascript, but not while Ctrl or Shift are down. Does anyone have any idea? cheers, Davor ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/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] Depth issues...
I ran into the same problems a while back. I created a LevelsManager class to get around it which you can set to "hijack" the getNextHighestDepth() function. That way, you can run one line of code at the beginning of your application and all your getNextHighestDepth() calls will work regardless of whether or not there are components on the stage. You can download the small class file at http://www.greensock.com/ActionScript/LevelsManager.zip. Here is the primary function I used in that class: function getNextHighestDepth(mc:Object):Number { if (mc == undefined) {mc = this}; var maxDepth_num:Number = mc.getNextHighestDepth(); if (maxDepth_num != undefined && maxDepth_num < 16000) { return maxDepth_num; } else { maxDepth_num = -1; var depth_num:Number; var obj:Object; var tf = TextField.prototype; for (var p in mc) { obj = mc[p]; if ((typeof(obj) == "movieclip" || obj.__proto__ == tf) && obj._parent == mc) { depth_num = obj.getDepth(); if (depth_num > maxDepth_num && depth_num < 16000) { maxDepth_num = depth_num; } } } return maxDepth_num + 1; } } Jack -Original Message- Date: Tue, 7 Aug 2007 17:15:55 +0800 From: "Darren Bowers" <[EMAIL PROTECTED]> Subject: [Flashcoders] Depth issues... To: "Flashcoders mailing list" Message-ID: <[EMAIL PROTECTED]> Content-Type: text/plain; charset=ISO-8859-1 I have written a class that simply creates movieclips (grids) on screen. It draws everything from actionscript so no library items are required. However, I am passing this class on to developers that will use it as they see fit. The problem is with the depth management. It seems I am stuck with forcing the developers not to use any components, otherwise the depth management is all stuffed up. If I use getNextHighestDepth(), I can create and destroy movieclips freely which is fine. Until someone uses a v2 component (like a button), then it breaks. They will create, but wont destroy because they get an invalid depth at creation. If I decide to use the DepthManager class, I have to have at least one v2 component in the library for it to work. The reason i created the class in the first place was to keep things small and libraryless if i wanted to. its seems I'm damned if i do and i'm damned if i dont. Is there any way to detect for components and use the DepthManager class instead of getNextHighestDepth()? cheers, Darren ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/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] Some CS3 observations; library and sound
AS3's substitution of attachMovie for the movieclip constructor is, while logical on the surface, somewhat baffling to me in practise. In AS2, extending MovieClip required you to declare variables to gain references to clips already instanced in the library movieclip. For instance, extending a movieclip containing a textfield with instance name "nameField" would require var nameField:TextField to gain control of that field in the class. What this gives you on script level is an overview of relevant movieclip members, as well as code completion. In AS3, declaring variables to refer to hand placed movieclip members throws an error: 1151: A conflict exists with definition x in namespace internal. When using classes, go to your publish settings, actionscript, and turn off "automatically declare stage instances" and it should behave as it did before -- you'll need to declare stage instances yourself. I agree that's odd, I use it off, but I guess they decided to add it on by default is so beginners wouldn't have trouble dealing with elements when coding 'on the timeline'. Zeh ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/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] Some CS3 observations; library and sound
Been using CS3 for a bit now, getting to grips with AS3, and what feels like excessive handholding at first is now flowing naturally, and i feel far less prone to silent failures than before. To me this is entirely excellent, good show! The IDE however, i am less impressed with, and i am hoping to be wrong or ignorant so some of you can correct me in my ridiculous ways. Overall, i feel as though AS3 integration in the Flash 9 IDE appears tacked on, or retrofitted. Experimenting with AS3 early on in flex and with apollo gave a far, far stronger impression of the strengths of the language than how it appears when used in tandem with the IDE, particularly in how AS3 handles sound and the library. AS3's substitution of attachMovie for the movieclip constructor is, while logical on the surface, somewhat baffling to me in practise. In AS2, extending MovieClip required you to declare variables to gain references to clips already instanced in the library movieclip. For instance, extending a movieclip containing a textfield with instance name "nameField" would require var nameField:TextField to gain control of that field in the class. What this gives you on script level is an overview of relevant movieclip members, as well as code completion. In AS3, declaring variables to refer to hand placed movieclip members throws an error: 1151: A conflict exists with definition x in namespace internal. This effectively forces us to write notes about movieclip members in comments or the like, and denies us code completion. I'm not sure how i'd deal with this more effectively, but i do sorely miss being able to do this in the old fashioned way. If there is a faster, more convenient workflow, please inform me :) Secondly, where the Timer class allows us a "safe" way to programmatically trigger callbacks without the setInterval danger of orphaned intervals, the new Sound/SoundChannel symbiose allows us to freely orphan sounds, while forcing us to keep track of separate class instances to have specific control of individual sounds, easily lost should the reference to the relevant SoundChannel be overwritten. The current sound toolkit appears eclectic, almost chaotic, and in my opinion performs even worse than its previous incarnation Sound: Loads and plays streamed audio, provides close() method to stop streaming sound, dispatches events to keep track of load progress, takes a soundtransform instance SoundChannel: gives playback and level information and an event when sound playback ends. Contains another method to stop sound, which DOESN'T work for streamed sound, yet a SoundChannel instance is nonetheless required to alter properties of streaming sound during playback. SoundTransform: Encapsulates all pan and volume properties previously associated with the Sound class. SoundMixer: static class containing global methods and properties for all sounds. Out of these 4, the Sound/SoundChannel relationship with their dual stop methods makes me wonder what the rationale behind it all really was. The SoundChannel class in my opinion has no logical place in the hierarchy given that it doesn't actually give us any real control of the channel in question. Were we able to declare a SoundChannel and pass it Sounds to play it'd be a different matter. In addition, the name SoundMixer is a complete misnomer, as the class offers absolutely no channel-specific controls, nor does it keep track of currently playing channels. I applaud being able to source audio externally, but i'm bewildered by the choices of terminology and the weird sound/channel symbiose. The docs insist the API is powerful, but i don't see how it is, aside from external sourcing of audio. So overall, i enjoy AS3, but its integration with IDE workflow seems unfinished and awkward. Anyone want to correct me? Please? :) -- mvh Andreas Rønning Senior Flash developer - Rayon Visual Concepts ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/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] Prevent flash from caching the loaded assets
Yes, the SWF would be easy to decompile, but I think as soon as you start worrying about someone decompiling the SWF to cheat you're pretty much out of luck, as they can always decompile your game's SWF instead and find out everything there is to know about the game. That would probably give them a lot more options for cheating. :) If you want to go the AMFPHP route (which I'm not familiar with at all) and sending a large array is having problems, why not split it up? Send a couple smaller arrays and then combine them on the client side. -Andy On 8/6/07, Niels Endlich <[EMAIL PROTECTED]> wrote: > It seems to me that the swf is easy to decompile and the photo also... > > We were working on sending an array with amfphp which contains the pixel > information and use BitmapData setPixel to "plot" the image. > But it seems that AMFPHP isn't able to send such a large array (800x600pix). > > Has anyone done somthing like this before? > > > -Oorspronkelijk bericht- > Van: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] Namens eric e. dolecki > Verzonden: maandag 6 augustus 2007 20:51 > Aan: flashcoders@chattyfig.figleaf.com > Onderwerp: Re: [Flashcoders] Prevent flash from caching the loaded assets > > "http://foo.domain.com/images/imageContainer.swf?e="; + getDate() > > all images could be in 1 swf and called out. > > > On 8/6/07, Ian Thomas <[EMAIL PROTECTED]> wrote: > > > > That's a wonderfully neat idea. :-D > > > > Ian > > > > On 8/6/07, Jack Doyle <[EMAIL PROTECTED]> wrote: > > > If you're able to store the images in SWF format instead of something > > like > > > JPG, you could set up your SWFs so that they're covered with a black > > > rectangle MovieClip by default and then you flip the _visible property > > to > > > false in your application when you load them in. That way, if people try > > to > > > look at the SWF from the browser's cache, they'll just see a big black > > > rectangle but within your app, the photo is visible. > > > > > > Just a thought. > > > > > > Jack > > ___ > > Flashcoders@chattyfig.figleaf.com > > To change your subscription options or search the archive: > > http://chattyfig.figleaf.com/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
Re: [Flashcoders] garbage collection and asychronous execution
Which is probably a good argument for always using the other form of setInterval: setInterval(this, "test", 1000); I assume in this case the object wouldn't be garbage collected because setInterval's internals now has a reference to it. -Andy On 8/6/07, Mark Winterhalder <[EMAIL PROTECTED]> wrote: > On 8/6/07, Mark Hawley <[EMAIL PROTECTED]> wrote: > > That isn't a reference to a function -- it's a reference to a object method. > > The object has to hang around. > > No, it's a reference to a function. The VM doesn't know anything about > methods. > The interval keeps a reference to the function, the object gets > garbage collected, then the function gets called. It doesn't need an > object. In fact, if you'd add a trace( this ), it would be undefined. > > Mark > ___ > Flashcoders@chattyfig.figleaf.com > To change your subscription options or search the archive: > http://chattyfig.figleaf.com/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] letter spacing on input text
Dear Flashcoders, I have stumbled across an interesting issue when I was looking for different ways of creating an input box. The way I chose, is because it's the simplest one is to crete it on the authoring time. The path that I followed was simple, I Created three textboxes, converted them into input text, set their text spacing to 5, and their alpha to 78. and select some font and embed certain latin characters. Then I put some text in the box too. and when I test this piece, unfortunately it's giving me total random results. http://share.klaweht.com/placeholder.swf here's the swf file I uploaded. First of all, it doesn't load with alpha in the beginning. If I go ahead and do a backspace on any of the text box and delete the text and start typing again, if it's the first attempt, it works without alpha and with correct letter spacing. BUT, when I press tab to move into the next textBox, and delete the contents and try to type, it gives me the correct alpha and 0 text letter spacing. If you try to rerun this swf, you will see that it gives you those in random order. I don't really know what's going. I don't like to jump so quickly that to tell this is a bug but I am really curious to see what you got. If I create everything in the code, it works fine by the way. Please let me know your results. best, ilteris ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/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] BlendModes & MovieClipLoader
MovieClipLoader works much in the same way as loadMovie. As soon as your file loads, it will destroy any current properties for the MovieClip it's loaded into and set them all back to default. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Gilles Roquefeuil Sent: Tuesday, August 07, 2007 3:27 AM To: Flashcoders@chattyfig.figleaf.com Subject: [Flashcoders] BlendModes & MovieClipLoader Hello, I work on a bitmapEditor module for a large project, and i have experienced some problems between hte MovieClipLoader and the blendMode of the loaded clip. It seems that whenerever I load a clip using MoveClipLoader, the prerecorded blendMode of the clip switches to "normal"... Anyone has a clue ? Thanks a lot, Gilles ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/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] Coding a circular preloader
Thanks Jesse, this was a very good idea. On 8/7/07, Jesse Graupmann <[EMAIL PROTECTED]> wrote: > > Another version using _xmouse to get a Stage.width factor so you can see > easing via onMouseMove. > > Nothing extra needed in this example - just copy/paste. > > - JG > > > > > > function drawArc ( mc, x, y, radius, arc, startAngle, yRadius) > { > // http://www.formequalsfunction.com/downloads/drawmethods.html > > if (arguments.length<5) return; > if (yRadius == undefined) yRadius = radius; > var segAngle, theta, angle, angleMid, segs, ax, ay, bx, by, cx, > cy; > if (Math.abs(arc)>360) arc = 360; > segs = Math.ceil(Math.abs(arc)/45); > segAngle = arc/segs; > theta = -(segAngle/180)*Math.PI; > angle = -(startAngle/180)*Math.PI; > ax = x-Math.cos(angle)*radius; > ay = y-Math.sin(angle)*yRadius; > if (segs>0) { > for (var i = 0; i angle += theta; > angleMid = angle-(theta/2); > bx = ax+Math.cos(angle)*radius; > by = ay+Math.sin(angle)*yRadius; > cx = > ax+Math.cos(angleMid)*(radius/Math.cos(theta/2)); > cy = > ay+Math.sin(angleMid)*(yRadius/Math.cos(theta/2)); > mc.curveTo(cx, cy, bx, by); > } > } > return {x:bx, y:by}; > }; > > // > // DRAW CIRCLE FROM OBJECT > // > > function circle_draw ( obj:Object ):Void > { > var mc = obj.mc; > mc.clear(); > mc.moveTo ( obj.x, obj.y ); > mc.beginFill.apply ( mc, obj.fillStyle ); > mc.lineStyle.apply ( mc, obj.lineStyle ); > drawArc ( mc, obj.x, obj.y, obj.radius, obj.arc, obj.startAngle, > obj.yRadius ) > } > > // > // SHOW PERCENTAGE IN TEXT > // > > function setPer ( per ):Void > { > txt.text = per + ' %'; > txt.setTextFormat(txt_fmt); > txt._x = Math.round(circle_holder._x - (txt._width>>1)); > txt._y = Math.round(circle_holder._y + (circle_top.radius*2) + > circle_top.lineStyle[0]); > } > > // > // ADJUST TO NEW PERCENTAGE > // > > function adjust_view () > { > // per > var margin = 20; > var per = Math.max( 0 , Math.min ( 1, (this._xmouse - margin) / > (Stage.width-(margin*2; > var new_arc = Math.round( -360 * per ); > > // update > if ( new_arc != dest_arc ) > { > dest_arc = new_arc; > circle_holder.onEnterFrame = function() > { > cur_arc += (dest_arc - cur_arc) * .1 ; > circle_top.arc = cur_arc; > circle_draw ( circle_top ); // circle > setPer ( > Math.round(Math.abs(circle_top.arc)/360*100) ); // txt > if ( cur_arc == dest_arc ) delete > circle_holder.onEnterFrame; > } > } > } > > > // > // CREATE > // > > function INIT() > { > > // circle > circle_holder = this.createEmptyMovieClip( "circle_holder", 20 ); > cur_arc = 0; > dest_arc = 0; > > // top circle > circle_top = { > mc: circle_holder.createEmptyMovieClip( "mc", 40 ), > x:0, > y:0, > radius:50, > arc: 0, > startAngle: 90, > yRadius: 50, > lineStyle: [ 15, 0xFF, 100 ], > fillStyle: [ ] > }; > > // add top glow > circle_top.mc.filters = [ new flash.filters.GlowFilter(0xFF, > .8, > 15, 15, 2, 3, false, false ) ]; > // bottom circle > circle_bottom = { > mc: circle_holder.createEmptyMovieClip( "mc2", 30 ), > arc: 360, > x: circle_top.x, > y: circle_top.y, > radius: circle_top.radius, > startAngle: circle_top.startAngle, > yRadius: circle_top.yRadius, > lineStyle: [ 13, 0xFF, 20 ], > fillStyle: circle_top.fillStyle > }; > > // txt > txt = this.createTextField("txt", 100, 100, 100, 300, 100); > txt.multiline = false; > txt.autoSize= true; > txt.wordWrap = false; > txt_fmt = new TextFormat(); > txt_fmt.color = 0xFF; > > > // stage > Stage.scaleMode = 'noScale'; > Stage.align = 'TL'; > Stage.addListener( this ); > bg = this.createEmptyMovieClip("bg", 10 ); > onResize = function () > { > var W = Stage.width; > var H = Stage.height; > bg.clear(); > bg.beginFill(0x33, 100); > bg.moveTo(0, 0); > bg.l
Re: [Flashcoders] Depth issues...
Hi, can you put your grids in a nested clip? The problem you describe only occurs when you mix, ie you AND your grid AND v2 components on the root. If you put components on the _root, but your grids in say _root.gridContainer, you should be fine. In addition you can probably detect if a certain class exists with _global.mx.core. etc greetz JC On 8/7/07, Darren Bowers <[EMAIL PROTECTED]> wrote: > > I have written a class that simply creates movieclips (grids) on screen. > It > draws everything from actionscript so no library items are required. > > However, I am passing this class on to developers that will use it as they > see fit. The problem is with the depth management. It seems I am stuck > with > forcing the developers not to use any components, otherwise the depth > management is all stuffed up. > > If I use getNextHighestDepth(), I can create and destroy movieclips freely > which is fine. Until someone uses a v2 component (like a button), then it > breaks. They will create, but wont destroy because they get an invalid > depth > at creation. > > If I decide to use the DepthManager class, I have to have at least one v2 > component in the library for it to work. The reason i created the class in > the first place was to keep things small and libraryless if i wanted to. > > its seems I'm damned if i do and i'm damned if i dont. > > Is there any way to detect for components and use the DepthManager class > instead of getNextHighestDepth()? > > cheers, > Darren > ___ > Flashcoders@chattyfig.figleaf.com > To change your subscription options or search the archive: > http://chattyfig.figleaf.com/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] Depth issues...
I have written a class that simply creates movieclips (grids) on screen. It draws everything from actionscript so no library items are required. However, I am passing this class on to developers that will use it as they see fit. The problem is with the depth management. It seems I am stuck with forcing the developers not to use any components, otherwise the depth management is all stuffed up. If I use getNextHighestDepth(), I can create and destroy movieclips freely which is fine. Until someone uses a v2 component (like a button), then it breaks. They will create, but wont destroy because they get an invalid depth at creation. If I decide to use the DepthManager class, I have to have at least one v2 component in the library for it to work. The reason i created the class in the first place was to keep things small and libraryless if i wanted to. its seems I'm damned if i do and i'm damned if i dont. Is there any way to detect for components and use the DepthManager class instead of getNextHighestDepth()? cheers, Darren ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/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] BlendModes & MovieClipLoader
Hello, I work on a bitmapEditor module for a large project, and i have experienced some problems between hte MovieClipLoader and the blendMode of the loaded clip. It seems that whenerever I load a clip using MoveClipLoader, the prerecorded blendMode of the clip switches to "normal"... Anyone has a clue ? Thanks a lot, Gilles ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/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] Free Text Metrics class (find x, y, width, height of substrings & more)
I noticed some chatter on the list about determining lines in TextFields, etc., and I thought I'd mention that I just posted a new TextMetrics class on my blog that'll help figure out: - x/y coordinates and width/height of each line of text - x/y coordinates and width/height of any substring (very useful for positioning things around or on certain strings in a dynamic or input TextField) - each line of text (for seeing where the line breaks are) It's probably overkill for many applications, but it was indispensable on a recent project I worked on, so I figured I'd pass it along. There's a visual sample and some brief documentation on the site. http://www.greensock.com/ActionScript/TextMetrics/ Hope some folks find it useful. Jack Doyle PS TweenLite & TweenFilterLite were recently updated as well to make sequencing more intuitive. ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com