RE: [Flashcoders] ASO files, file times, and classes, oh my
Thanks - however I don't think it's a cross reference issue with various classes. I'm not referring to any other code in other classes. I'm thinking it's related to file times and a bug with Flash. Cool compiler class though, may come in handy. -=matt -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Stephen Downs Sent: Monday, May 07, 2007 1:02 PM To: flashcoders@chattyfig.figleaf.com Subject: Re: [Flashcoders] ASO files, file times, and classes, oh my I've seen this before, but can't clearly understand the root cause. Most likely it is the cross-referencing bytecode compile bug that plagues Flash 8. Deleting ASO files does not work in many cases. I solve it by using my devilishly simple Compile class, as pointed out in the recent "Flash 8 OSX - Classpath woes" thread. Here again is the class, with usage help in the comments: // - /** * Compiler class * * This is a simple class to aid in compiling other self-referential classes that stubbornly refuse to compile. This frequently occurs when a class (A) refers to another class (B) which then refers back to the first class (A), giving the following compile error: "The name of this class, 'x', conflicts with the name of another class that was loaded, 'x'". To address this issue, just change the import reference in this class to refer to the problem class, and check syntax on this class. * * The logic behind this fix is explained here: http:// ericlin2.tripod.com/as2/conflict.html * * @author Stephen Downs <[EMAIL PROTECTED]> * @version 1.0 * @langversion ActionScript 2.0 * @playerversion Flash 8 */ // Change this reference to target the stubborn class. import com.plasticbrain.dir.MyStubbornClass; // class com.plasticbrain.tools.Compiler { } // - On 2007-05-07, at 10:57 AM, Matt Samet wrote: > Hi, > > > > I have a project I'm working on that contains multiple class files. > Every now and then someone is working on these files who is located > in a > different time zone. They check in their changes, I get them, and all > hell breaks loose with Flash. > > > > It's always the same error: > > > > **Error** C:\Users\Matt\AppData\Local\Macromedia\Flash > 8\en\Configuration\Classes\FP8\System\capabilities.as: Line 7: The > name > of this class, 'System.capabilities', conflicts with the name of > another > class that was loaded, 'System'. > > > > ... where the actual class name in the error depends on what's being > compiled at the time. > > > > Also, I don't even have to touch anything - go to the main .fla file, > select Delete ASO files, and I get that particular error again (the > one > about System.capabilities). I haven't even modified the > System.capabilities class! (but I use system.capabilities in the > code > in various places) > > This happens when I try to publish the SWF. > > > > Try to publish it again, and it magically works! WTF! > > > > I've tried to work around this issue by changing my system date to > a few > days in the future. This seems to temporarily work, but then > sometimes > it gets all weird again. > > > > For a few classes that are being worked on, it's gotten to the point > where I can't even modify the class and see the changes when I reload > the browser without deleting the class's ASO file (at which point, > I get > the "conflicts with the name of another class that was loaded" error - > 2nd publish attempt works fine). > > > > Anyone know what's going on? Macrodobe, please fix this in CS3 if > it's > not already!!! > > > > Thanks, > > -=matt > > ___ > 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] ASO files, file times, and classes, oh my
Hi, I have a project I'm working on that contains multiple class files. Every now and then someone is working on these files who is located in a different time zone. They check in their changes, I get them, and all hell breaks loose with Flash. It's always the same error: **Error** C:\Users\Matt\AppData\Local\Macromedia\Flash 8\en\Configuration\Classes\FP8\System\capabilities.as: Line 7: The name of this class, 'System.capabilities', conflicts with the name of another class that was loaded, 'System'. ... where the actual class name in the error depends on what's being compiled at the time. Also, I don't even have to touch anything - go to the main .fla file, select Delete ASO files, and I get that particular error again (the one about System.capabilities). I haven't even modified the System.capabilities class! (but I use system.capabilities in the code in various places) This happens when I try to publish the SWF. Try to publish it again, and it magically works! WTF! I've tried to work around this issue by changing my system date to a few days in the future. This seems to temporarily work, but then sometimes it gets all weird again. For a few classes that are being worked on, it's gotten to the point where I can't even modify the class and see the changes when I reload the browser without deleting the class's ASO file (at which point, I get the "conflicts with the name of another class that was loaded" error - 2nd publish attempt works fine). Anyone know what's going on? Macrodobe, please fix this in CS3 if it's not already!!! Thanks, -=matt ___ 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] links behaviors in a data grid component
I'm not sure what you mean. Are you trying to display clickable links (instead of just regular text) inside cells in a DataGrid? If so, you probably want to use a CellRenderer to do this. CellRenderers allow you to display custom content in each cell of a column inside the DataGrid. They can be a little involved, but the docs cover them pretty well... -=matt -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Gustavo Duenas Sent: Tuesday, April 24, 2007 1:20 PM To: Flashcoders mailing list Subject: [Flashcoders] links behaviors in a data grid component Hi, I've recently downloaded a data grid editor and a data conn wizard, it went fine in order to retrieve data from a xml page, but I'd like to use the links in order to go to the site where the news is bigger, do you know how? in the wizard everything went ok, but when I tried to click on the link, nothing happens I know is easier in flex, But I'd like to have this in flash 8. Somebody would help me. Regards Gustavo Duenas ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
RE: [Flashcoders] Changing Green (halogreen) highlight color
_global.style.setStyle("themeColor", 0x6092B8); Replace 0x6092B8 with whatever color you want. You can even use string literals like "haloGreen", "haloBlue", etc. -=matt -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Helmut Granda Sent: Tuesday, April 24, 2007 12:04 PM To: Flashcoders mailing list Subject: [Flashcoders] Changing Green (halogreen) highlight color Is there anyway to change the green highlight color for components without having to create a custom skin (The green/orange/blue highlight when the component has focus) ? TIA ___ 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] Set Interval Question
> setTimeout(fadeOut, 7000); Sure you aren't thinking of Javascript? ;) -=matt -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Alain Rousseau Sent: Thursday, March 01, 2007 12:39 PM To: flashcoders@chattyfig.figleaf.com Subject: RE: [Flashcoders] Set Interval Question You should rethink your approach, I believe it will be easier to just start a fade in, wait 10 seconds, fade out. When the fade out is complete start over with another picture. untested code below : import mx.transitions.Tween; import mx.transitions.easing.*; var curID = 0; fadeIn(); function fadeIn() { curID++; var curMC:MovieClip = "image" + curID; myTween = new Tween(curMC, "_alpha", Strong.easeIn, 0, 100, 1.5, false); // or something like that myTween.onMotionFinished = Delegate.create(this, pauseImage); } function pauseImage() { setTimeout(fadeOut, 7000); } function fadeOut() { var curMC:MovieClip = "image" + curID; myTween = new Tween(curMC, "_alpha", Strong.easeOut, 100, 0, 1.5, false); myTween.onMotionFinished = Delegate.create(this, fadeIn); if (curID < 6) curID = 0; // we start back at the first image } HTH ! Alain -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Paul V. Sent: 1 mars 2007 14:46 To: Flash Coders; Flashnewbie Mailing List Subject: [Flashcoders] Set Interval Question Hello Again, I have a setInterval issue/question, here it is. I set a main timer. 10 seconds. In that 10 second interval, I load, fade in, pause on, and fade out, that image. That is working mostly fine. Accept I have a seperate setInterval starting for the images fade in and fade out functions (1.25 sec * 2). And have it pausing for the remainder which should be 7.5 seconds. Problem is it doesn't work out, and by the 4th or 5th image it is noticably offset. I am guessing this is because of the time it takes to process the code, didn't seem likely at first, but It is not off by much, and it seems to be increasing marginally which means that not much, becomes significant. Long story short, well...point being that I want to be able to call the main timer, and tap into it at 0-1.25 seconds and then again at 7.5 -10 seconds to run the image fade in and fade out. Can I do this, from variableName = SetInterval (function, 1); use the running timer for other functions? Thanks again. If you need clarification about just what the heck I am trying to say. I can send in some code. Thanks, Paul Vdst ___ 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 -- No virus found in this incoming message. Checked by AVG Free Edition. Version: 7.5.446 / Virus Database: 268.18.5/706 - Release Date: 2007-02-28 16:09 -- No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.5.446 / Virus Database: 268.18.5/706 - Release Date: 2007-02-28 16:09 ___ 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] Getting frustrated. regarding set Interval, and for loop.
Paul: I understand what you're trying to do (make a time-delay slide show of images). Using setInterval for that is fine, but you have to make sure you're using it correctly. Calling setInterval will set up a flash system timer that will call your function every X milliseconds. It will keep going, and keep calling that function (every X milliseconds), until it's stopped. Hence, there is no reason for you to be calling setInterval in a loop and setting up 5 timers (that will each repeat forever). Simply have 1 timer, that repeats 5 times, then you stop it. To do this in simplified code: //set up the call count. _root.timerCalls = 0; //make the function that will be called. function foo() { trace("Timer function got called!"); if(_root.timerCalls++ == 4) { trace("Max calls reached. Stopping timer..."); clearInterval(_root.myTimerID); //timer will never get called again. _root.timerCalls = 0; //reset counter } //do "stuff" (every 1sec). } //make the timer, and start it. _root.myTimerID = setInterval(foo, 1000); //system will call foo() every second until you stop it. Timer ID gets stored into _root.myTimerID. This is just one way to do it. In your timer function, you'll implement your code for loading the new image, and taking away the old one. -=matt -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Paul V. Sent: Wednesday, February 28, 2007 5:03 PM To: Flashnewbie Mailing List; Flashcoders mailing list Subject: [Flashcoders] Getting frustrated. regarding set Interval,and for loop. Let me explain the problem I am having and then I will send you some code. I want to load up images in a slide show with set interval, with the images being called image1 image2 image 3 etc. I want to be coding a dynamic slide show so that if I change the images I can just replace the mc images. here is the code I am working on, I am a little new to setInterval (completely new to that function actually) - I do understand the basic syntax, setInterval( function (){ //entire function here;},1000); But I don't know how to run a for loop inside it and pass a variable to it. (I am a newbie). function loadImages(){//Ihave this here so I can run an external for loop. for(i=1;i<6;i++){ setInterval(function(){ //set interval and begins anonymous function i.e function() -no name attachMovie("image"+i,"image"+i,41); //trying to attach the images, image1 - image5 image = eval("image"+i);//instance assigned to variable 'image' image._x = ((Stage.width / 2)-(image._width/2)); //positioning image._y = (yFactor); //positioning oldwidth = image._width; //saving dimensions for resizing formula oldheight = image._height;//saving dimensions for resizing formula image._height = yheight; //image height set to variable image._width = ((oldwidth*yheight)/oldheight); //image width set to proportions of original },1000); //interval to 1 sec. 1000 milliseconds } //end for loop } //end container function I am trying to set the images up for a second and then have them switch. Help me out if you you know a solution. Or even if you see some obvious errors. Like I said I am new with the set interval. by the way if you like that little resizing technique, you can use it. Thank you. Looking forward to a response on this one. Paul Vdst ___ 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] Internet Explorer and CTRL keyboard trapping
Hi, I was wondering if anyone here knew anything about how to get this to work in IE 6 or 7 (Windows XP or Vista; Flash Player 9): var listener = {}; listener.onKeyDown = function() { var lastKey = Key.getCode(); if(Key.isDown(Key.CONTROL) && lastKey == 65) //65 == A { _root.createTextField("foo", 5, 5, 5, 70, 50); _root.foo.text = "Control-A pressed"; } } Key.addListener(listener); ...Works just fine in Firefox. I've noticed that a lot of hotkeys are trapped by default in IE... is there some secret parameter I can pass to the object, or am I missing something really basic? Why does IE suck so much? Also, this doesn't seem to work when you test it inside the standalone flash player. I tried "Control -> Disable Keyboard Shortcuts" already. Thanks... -=matt ___ 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] Transparent list component
Hi, Try this code: _global.styles.ScrollSelectList.backgroundColor = null; mx.controls.listclasses.SelectableRow.prototype.drawRowFill = function (mc:MovieClip, newClr:Number):Void { mc.clear(); var bgAlpha = 100; //opaque - no alpha defined var dg = this._parent._parent; if(dg.className.indexOf("DataGrid") != -1) //this is a DataGrid or derived from it { if(dg.backgroundAlpha != undefined && dg.backgroundAlpha != null && newClr != dg.rollOverColor && newClr != dg.selectionColor && newClr != dg.selectionDisabledColor) bgAlpha = dg.backgroundAlpha; } //otherwise, the alpha will be 100, like before if (newClr == null) mc.beginFill(0xFF, bgAlpha); //white - no color defined else mc.beginFill(newClr, bgAlpha); mc.drawRect(1, 0, this.__width, this.__height); mc.endFill(); mc._width = this.__width; mc._height = this.__height; }; //this override lets us draw the background color where there are no valid rows (instead of alternating colors) mx.controls.listclasses.SelectableRow.prototype.getNormalColor = function(Void):Number { var col; var o = this.owner; if ( !o.enabled ) col = o.getStyle("backgroundDisabledColor"); else { //empty rows get the background color. backgroundAlpha is kinda weird with this... if(this.item == undefined && o.backgroundAlpha == undefined) return o.getStyle("backgroundColor"); var itemIndex = this.rowIndex + o.__vPosition; if (this.rowIndex == undefined) col = o.getPropertiesOf(this.item).backgroundColor; else col = o.getPropertiesAt(itemIndex).backgroundColor; if (col == undefined) { var colArray = o.getStyle("alternatingRowColors"); if (colArray == undefined) col = o.getStyle("backgroundColor"); else col = colArray[itemIndex%colArray.length]; } } return col; }; The first function will let you specify that a DataGrid or List has a transparent background. To set a transparent background on the list or DataGrid, do: my_list_or_grid.backgroundAlpha = value; //value = 0-100 The second function lets you draw the list background where there are no rows present (you can omit this function if you want). Note: for this stuff to work, make sure NOT to set backgroundColor on the list or grid, and make sure to DO set alternatingRowColors (you can use anything... like [0,0]). Note that you can even use alternatingRowColors with 1 element to simulate backgroundColor (like [0xFF]). -=matt -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Rob Coenen Sent: Tuesday, December 19, 2006 6:25 AM To: flashcoders@chattyfig.figleaf.com Subject: [Flashcoders] Transparent list component Hello gang, what is the current status on components-with-transparent-backgrounds? I did search the archives but and it seems people have been working on all sorts of patches and solutions, but is there a real definitive solution? Never thought that putting a background image in a list view component would be hard... :-) ___ 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