Re: [Flashcoders] Swap 8 bit palettes
Sweet, thanks! Elia - Original Message - From: Juan Pablo Califano [EMAIL PROTECTED] To: Flash Coders List flashcoders@chattyfig.figleaf.com Sent: Sunday, February 17, 2008 11:59 PM Subject: Re: [Flashcoders] Swap 8 bit palettes If I'm not getting this wrong, this simple function should do the work (assuming you have your palette defined as an array) I've tested in Flash 8 (that's why I'm using Number's instead of int's; for AS 3.0 I'd go with int's) function createPaletteData(palette:Array):Object { var len:Number = palette.length; var r:Array = []; var g:Array = []; var b:Array = []; var cur:Number; for(var i:Number = 0;ilen;i++) { cur = palette[i]; r[i] = cur 16; g[i] = (cur 0x00ff00) 8; b[i] = (cur 0xff); } return {r:r,g:g,b:b}; } var test_arr:Array = [0xff005c,0xfc1236,0x001200,0x180055]; var oArrays:Object = createPaletteData(test_arr); trace(oArrays.r); trace(oArrays.g); trace(oArrays.b); Cheers Juan Pablo Califano 2008/2/17, Elia Morling [EMAIL PROTECTED]: Has anyone by any chance made a function to dump an 8 bit palette to the arrays the paletteMap function is asking for? :) I guess the alternative is to create an image that holds the palette as pixels in rows, and then use getpixel to pull one rgb at a time to populate the arrays. Elia - Original Message - From: Elia Morling [EMAIL PROTECTED] To: Flash Coders List flashcoders@chattyfig.figleaf.com Sent: Sunday, February 17, 2008 10:41 PM Subject: Re: [Flashcoders] Swap 8 bit palettes Thanks I will check it out. The images we are talking of are not anti-alias. Elia - Original Message - From: Zeh Fernando [EMAIL PROTECTED] To: Flash Coders List flashcoders@chattyfig.figleaf.com Sent: Sunday, February 17, 2008 10:10 PM Subject: Re: [Flashcoders] Swap 8 bit palettes You can do a lot of color transformations with the color matrix. If you want to swap the PALLETE, oldschool-style, one color at a time, you just use the paletteMap method of the BitmapData class. It's only really useful if you don't have antialias on your image or else it becomes a monumental task to do anything. Zeh Elia Morling wrote: Ok m8. My artist has 8-bit tile graphics. We want to swap the colors in those tile graphics by changing the palette. It's a simple operation really, I just wonder if Flash supports it. Cheers Elia - Original Message - From: Juan Pablo Califano [EMAIL PROTECTED] To: Flash Coders List flashcoders@chattyfig.figleaf.com Sent: Sunday, February 17, 2008 7:31 PM Subject: Re: [Flashcoders] Swap 8 bit palettes Perhaps if you describe your problem / what you're trying to do with a little more detail... 2008/2/17, Elia Morling [EMAIL PROTECTED]: I guess not? Is it possible to swap 8 bit palettes directly in Flash? ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Question on garbage collection
Erik, it would be something like this: var c:Clock = new Clock(); getTime() setInterval(this , 'getTime' , 1000) function getTime() { var tTime:Time = c.getElepasedTime() trace(tTime.serialize()) delete tTime; // is this neccessary and if so, is tTime = null maybe better ??? } EECOLOR wrote: Could you post the code that actualy calls these methods? Greetz Erik On 2/15/08, Jiri Heitlager [EMAIL PROTECTED] wrote: Thanks for your reply Bob, it is for AS2. I read a lot of articles about it and understand the general concept. That is why I post the question. If I understood correctly the posted code should not leave any objects unreferenced and therefor cleared for deleting. But the memory goes up anyway. I tested it with only this two classes instantiated and nothing else. I am hoping somebody can take a look at the code I posted and give me the reassurence that I am doing things correctly. Jiri ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Question on garbage collection
That all looks fine. There is no memory leak in the code you showed here. You do not need to delete tTime as it is declared within the scope of the function and will be marked for deletion as soon as the function is complete. If I run the classes (with the line clockdata = new ClockData() commented out), the memory is stable in the stand alone player. In flash the memory is slowly going up, but that is because we are doing a trace each interval. Note that it takes a few seconds for the memory to be stable. Greetz Erik On 2/18/08, Jiri Heitlager [EMAIL PROTECTED] wrote: Erik, it would be something like this: var c:Clock = new Clock(); getTime() setInterval(this , 'getTime' , 1000) function getTime() { var tTime:Time = c.getElepasedTime() trace(tTime.serialize()) delete tTime; // is this neccessary and if so, is tTime = null maybe better ??? } EECOLOR wrote: Could you post the code that actualy calls these methods? Greetz Erik On 2/15/08, Jiri Heitlager [EMAIL PROTECTED] wrote: Thanks for your reply Bob, it is for AS2. I read a lot of articles about it and understand the general concept. That is why I post the question. If I understood correctly the posted code should not leave any objects unreferenced and therefor cleared for deleting. But the memory goes up anyway. I tested it with only this two classes instantiated and nothing else. I am hoping somebody can take a look at the code I posted and give me the reassurence that I am doing things correctly. Jiri ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
[Flashcoders] rectangle (not square) based mousefollower?
hey guys - i have a question that i really hope someone can answer i have a flash banner that i'm working on that is 300px wide x 250px deep i have done a mouse follower that tracks the where the mouse is and then chooses a frame of animation to show so that the people are always looking at the mouse (roughly) http://www.receptacledesign.com/portfolio/theonlinestudio/herbalessence/ this gives a square (actually a circle but we'll used a square for this) sliced into 8 http://www.receptacledesign.com/publicfiles/area1.gif however, because the actual shape is a rectangle, i think there's an issue with the movie choosing a frame for the corners as they're getting cut off like this: http://www.receptacledesign.com/publicfiles/area2.gif could anyone tell me how i should amend my maths to make my rectangle slice more like this: http://www.receptacledesign.com/publicfiles/area3.gif here is my code (note: there is a blurred 'overlap' between the frames of animation that is governed by the blurDifference variable as well) //variables var originX:Number = 200; // middle of x axis when not expanded var originY:Number = 225; // middle of y axis when not expanded var visibleClip = people17; // initialised at people17 var clip:MovieClip = content_mc; // clip reference var blurDifference:Number = 13; // between 1 and 13 - 1 is the most, 13 the least var degreesPerSlice:Number = 360/8; // 45 degrees var centerArea:Number = 40; // centre area for the people to look directly at the user //mouse listener object mouseListener.onMouseMove = function () { mouseMoved = true; // stop randomly looking if (mouseMoveEnabled) { lookAt(clip, originX, originY, _root._xmouse, _root._ymouse); } //rollover on whole movie if (!expandTime roll_mc.hitTest(_root._xmouse, _root._ymouse)) { expandTime = getTimer() + expandTimeToWait; } updateAfterEvent(); } Mouse.addListener(mouseListener); //maths to find where mouse pointer is in relation to the origin function lookAt (clip:MovieClip, originX:Number, originY:Number, watchX:Number, watchY:Number):Void { var adjside:Number = a = watchX - originX; var b:Number = watchY - originY; var oppside:Number = -1*b; var angle:Number = Math.atan2(oppside, adjside); // in radians var angle:Number = Math.round(angle/Math.PI*180); // convert to degrees var angle:Number = -1*(angle); // invert var angle:Number = angle + (degreesPerSlice/2); // add half of degreesPerSlice to correct eye level - will probably be removed when maths is corrected var c:Number = Math.sqrt((a*a)+(b*b)); // pythagoras a2+b2=c2 to find distance of mouse cursor from origin changeFrame(clip, angle, c); } //image frame selector function changeFrame(clip:MovieClip, angle:Number, distance:Number):Void { idleChangeTime = getTimer() + idleChangeRate; for (var i:Number=1; i18; i++) { clip[people+i]._visible = false; } if (distancecenterArea) { if (angle0) { angle = 360+angle; } var degreesPerSlice:Number = degreesPerSlice; var halfDegreesPerSlice:Number = degreesPerSlice/2; var blurDifference:Number = blurDifference; var frame:Number = Math.ceil(angle/halfDegreesPerSlice); var frameEdges:Number = Math.ceil(angle/degreesPerSlice); // looks for edges of (non-blurred) frames var distanceFromEdge:Number = (frameEdges*degreesPerSlice) - (angle); // find distance from edge of slice if (distanceFromEdge blurDifference) { if (frame % 2 == 0) { if (frame16) frame++; } } else if ((degreesPerSlice - distanceFromEdge) blurDifference) { if (frame % 2 == 0) { if (frame1) frame--; } } clip[people+frame]._visible = true; visibleClip = [people+frame]; } else { clip.people17._visible = true; visibleClip = people17; } } really stuck on this so any help you can give me will be great thanks ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
[Flashcoders] SOLVED :: rectangle (not square) based mousefollower?
i've amended my code as follows - seems to have sorted the problem out in a nutshell, i multiplied the y axis by 83.333 percent (or the actual rectangle height / square height) and sorted out the way the last frame is chosen (which turned out to be a lot simpler than i originally did it) //variables var originX:Number = 200; // middle of x axis when not expanded var originY:Number = 225; // middle of y axis when not expanded var visibleClip = people17; // initialised at people17 var clip:MovieClip = content_mc; // clip reference var blurDifference:Number = 13; // between 1 and 13 - 1 is the most, 13 the least var degreesPerSlice:Number = 360/8; // 45 degrees var centerArea:Number = 40; // centre area for the people to look directly at the user //mouse listener object mouseListener.onMouseMove = function () { mouseMoved = true; // stop randomly looking if (mouseMoveEnabled) { lookAt(clip, originX, originY, _root._xmouse, _root._ymouse); } //rollover on whole movie if (!expandTime roll_mc.hitTest(_root._xmouse, _root._ymouse)) { expandTime = getTimer() + expandTimeToWait; } updateAfterEvent(); } Mouse.addListener(mouseListener); //maths to find where mouse pointer is in relation to the origin function lookAt (clip:MovieClip, originX:Number, originY:Number, watchX:Number, watchY:Number):Void { var adjside:Number = a = watchX - originX; var b:Number = watchY - originY; var oppside:Number = -1*b; var angle:Number = Math.atan2(oppside, adjside); // in radians var angle:Number = Math.round(angle/Math.PI*180); // convert to degrees var angle:Number = -1*(angle); // invert //REMOVED //var angle:Number = angle + (degreesPerSlice/2); // add half of degreesPerSlice to correct eye level - will probably be removed when maths is corrected var c:Number = Math.sqrt((a*a)+(b*b)); // pythagoras a2+b2=c2 to find distance of mouse cursor from origin changeFrame(clip, angle, c); } //image frame selector function changeFrame(clip:MovieClip, angle:Number, distance:Number):Void { idleChangeTime = getTimer() + idleChangeRate; for (var i:Number=1; i18; i++) { clip[people+i]._visible = false; } if (distancecenterArea) { if (angle0) { angle = 360+angle; } var degreesPerSlice:Number = degreesPerSlice; var halfDegreesPerSlice:Number = degreesPerSlice/2; var blurDifference:Number = blurDifference; var frame:Number = Math.ceil(angle/halfDegreesPerSlice); var frameEdges:Number = Math.ceil(angle/degreesPerSlice); // looks for edges of (non-blurred) frames var distanceFromEdge:Number = (frameEdges*degreesPerSlice) - (angle); // find distance from edge of slice /* REPLACED if (distanceFromEdge blurDifference) { if (frame % 2 == 0) { if (frame16) frame++; } } else if ((degreesPerSlice - distanceFromEdge) blurDifference) { if (frame % 2 == 0) { if (frame1) frame--; } } */ if (distanceFromEdge blurDifference) { if (frame % 2 == 0) { frame++; if (frame == 17) frame = 1; } } clip[people+frame]._visible = true; visibleClip = [people+frame]; } else { clip.people17._visible = true; visibleClip = people17; } } ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] rectangle (not square) based mousefollower?
quotehowever, because the actual shape is a rectangle, i think there's an issue /quote What exactly is the issue you're seeing? I think you may be over-complicating it. If the angles that your people look are in 45 degree increments then that's how your angles should be calculated - i.e. using the square. Adrian On Feb 18, 2008 1:09 PM, Allandt Bik-Elliott (Receptacle) [EMAIL PROTECTED] wrote: hey guys - i have a question that i really hope someone can answer i have a flash banner that i'm working on that is 300px wide x 250px deep i have done a mouse follower that tracks the where the mouse is and then chooses a frame of animation to show so that the people are always looking at the mouse (roughly) http://www.receptacledesign.com/portfolio/theonlinestudio/herbalessence/ this gives a square (actually a circle but we'll used a square for this) sliced into 8 http://www.receptacledesign.com/publicfiles/area1.gif however, because the actual shape is a rectangle, i think there's an issue with the movie choosing a frame for the corners as they're getting cut off like this: http://www.receptacledesign.com/publicfiles/area2.gif could anyone tell me how i should amend my maths to make my rectangle slice more like this: http://www.receptacledesign.com/publicfiles/area3.gif here is my code (note: there is a blurred 'overlap' between the frames of animation that is governed by the blurDifference variable as well) //variables var originX:Number = 200; // middle of x axis when not expanded var originY:Number = 225; // middle of y axis when not expanded var visibleClip = people17; // initialised at people17 var clip:MovieClip = content_mc; // clip reference var blurDifference:Number = 13; // between 1 and 13 - 1 is the most, 13 the least var degreesPerSlice:Number = 360/8; // 45 degrees var centerArea:Number = 40; // centre area for the people to look directly at the user //mouse listener object mouseListener.onMouseMove = function () { mouseMoved = true; // stop randomly looking if (mouseMoveEnabled) { lookAt(clip, originX, originY, _root._xmouse, _root._ymouse); } //rollover on whole movie if (!expandTime roll_mc.hitTest(_root._xmouse, _root._ymouse)) { expandTime = getTimer() + expandTimeToWait; } updateAfterEvent(); } Mouse.addListener(mouseListener); //maths to find where mouse pointer is in relation to the origin function lookAt (clip:MovieClip, originX:Number, originY:Number, watchX:Number, watchY:Number):Void { var adjside:Number = a = watchX - originX; var b:Number = watchY - originY; var oppside:Number = -1*b; var angle:Number = Math.atan2(oppside, adjside); // in radians var angle:Number = Math.round(angle/Math.PI*180); // convert to degrees var angle:Number = -1*(angle); // invert var angle:Number = angle + (degreesPerSlice/2); // add half of degreesPerSlice to correct eye level - will probably be removed when maths is corrected var c:Number = Math.sqrt((a*a)+(b*b)); // pythagoras a2+b2=c2 to find distance of mouse cursor from origin changeFrame(clip, angle, c); } //image frame selector function changeFrame(clip:MovieClip, angle:Number, distance:Number):Void { idleChangeTime = getTimer() + idleChangeRate; for (var i:Number=1; i18; i++) { clip[people+i]._visible = false; } if (distancecenterArea) { if (angle0) { angle = 360+angle; } var degreesPerSlice:Number = degreesPerSlice; var halfDegreesPerSlice:Number = degreesPerSlice/2; var blurDifference:Number = blurDifference; var frame:Number = Math.ceil(angle/halfDegreesPerSlice); var frameEdges:Number = Math.ceil(angle/degreesPerSlice); // looks for edges of (non-blurred) frames var distanceFromEdge:Number = (frameEdges*degreesPerSlice) - (angle); // find distance from edge of slice if (distanceFromEdge blurDifference) { if (frame % 2 == 0) { if (frame16) frame++; } } else if ((degreesPerSlice - distanceFromEdge) blurDifference) { if (frame % 2 == 0) { if (frame1) frame--; } } clip[people+frame]._visible = true; visibleClip = [people+frame]; } else { clip.people17._visible = true; visibleClip = people17; } } really stuck on this so any help you can give me will be great thanks ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] rectangle (not square) based mousefollower?
the actual shape of the banner is rectangular so the angles shouldn't actually be increments of 45 degrees like they were (see SOLVED) thanks for the input tho On 18 Feb 2008, at 13:46, Adrian Park wrote: quotehowever, because the actual shape is a rectangle, i think there's an issue /quote What exactly is the issue you're seeing? I think you may be over-complicating it. If the angles that your people look are in 45 degree increments then that's how your angles should be calculated - i.e. using the square. Adrian On Feb 18, 2008 1:09 PM, Allandt Bik-Elliott (Receptacle) [EMAIL PROTECTED] wrote: hey guys - i have a question that i really hope someone can answer i have a flash banner that i'm working on that is 300px wide x 250px deep i have done a mouse follower that tracks the where the mouse is and then chooses a frame of animation to show so that the people are always looking at the mouse (roughly) http://www.receptacledesign.com/portfolio/theonlinestudio/ herbalessence/ this gives a square (actually a circle but we'll used a square for this) sliced into 8 http://www.receptacledesign.com/publicfiles/area1.gif however, because the actual shape is a rectangle, i think there's an issue with the movie choosing a frame for the corners as they're getting cut off like this: http://www.receptacledesign.com/publicfiles/area2.gif could anyone tell me how i should amend my maths to make my rectangle slice more like this: http://www.receptacledesign.com/publicfiles/area3.gif here is my code (note: there is a blurred 'overlap' between the frames of animation that is governed by the blurDifference variable as well) //variables var originX:Number = 200; // middle of x axis when not expanded var originY:Number = 225; // middle of y axis when not expanded var visibleClip = people17; // initialised at people17 var clip:MovieClip = content_mc; // clip reference var blurDifference:Number = 13; // between 1 and 13 - 1 is the most, 13 the least var degreesPerSlice:Number = 360/8; // 45 degrees var centerArea:Number = 40; // centre area for the people to look directly at the user //mouse listener object mouseListener.onMouseMove = function () { mouseMoved = true; // stop randomly looking if (mouseMoveEnabled) { lookAt(clip, originX, originY, _root._xmouse, _root._ymouse); } //rollover on whole movie if (!expandTime roll_mc.hitTest(_root._xmouse, _root._ymouse)) { expandTime = getTimer() + expandTimeToWait; } updateAfterEvent(); } Mouse.addListener(mouseListener); //maths to find where mouse pointer is in relation to the origin function lookAt (clip:MovieClip, originX:Number, originY:Number, watchX:Number, watchY:Number):Void { var adjside:Number = a = watchX - originX; var b:Number = watchY - originY; var oppside:Number = -1*b; var angle:Number = Math.atan2(oppside, adjside); // in radians var angle:Number = Math.round(angle/Math.PI*180); // convert to degrees var angle:Number = -1*(angle); // invert var angle:Number = angle + (degreesPerSlice/2); // add half of degreesPerSlice to correct eye level - will probably be removed when maths is corrected var c:Number = Math.sqrt((a*a)+(b*b)); // pythagoras a2 +b2=c2 to find distance of mouse cursor from origin changeFrame(clip, angle, c); } //image frame selector function changeFrame(clip:MovieClip, angle:Number, distance:Number):Void { idleChangeTime = getTimer() + idleChangeRate; for (var i:Number=1; i18; i++) { clip[people+i]._visible = false; } if (distancecenterArea) { if (angle0) { angle = 360+angle; } var degreesPerSlice:Number = degreesPerSlice; var halfDegreesPerSlice:Number = degreesPerSlice/2; var blurDifference:Number = blurDifference; var frame:Number = Math.ceil(angle/ halfDegreesPerSlice); var frameEdges:Number = Math.ceil(angle/ degreesPerSlice); // looks for edges of (non-blurred) frames var distanceFromEdge:Number = (frameEdges*degreesPerSlice) - (angle); // find distance from edge of slice if (distanceFromEdge blurDifference) { if (frame % 2 == 0) { if (frame16) frame++; } } else if ((degreesPerSlice - distanceFromEdge) blurDifference) { if (frame % 2 == 0) { if (frame1) frame--; } } clip[people+frame]._visible = true; visibleClip = [people+frame]; } else { clip.people17._visible = true; visibleClip = people17; } } really stuck on this so any help you can give me will be great thanks
Re: [flashcoders] copy to clipboard
On 18/02/2008 16:16, laurent wrote: Is it possible to copy a string to the clipboard with actionScript 3 or is it only available from Flex ? import flash.system.System; System.setClipboard(some text); There's no System.getClipboard(). Write only. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [flashcoders] copy to clipboard
I don't know if you can do that in Flex, but there's Clipboard class in AIR: Clipboard.generalClipboard.setData(ClipboardFormats.TEXT_FORMAT, yourString); Kenneth Kawamoto http://www.materiaprima.co.uk/ laurent wrote: Hi list, Is it possible to copy a string to the clipboard with actionScript 3 or is it only available from Flex ? L ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
[flashcoders] copy to clipboard
Hi list, Is it possible to copy a string to the clipboard with actionScript 3 or is it only available from Flex ? L ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Question on garbage collection
Erik, thanks for clearing that up for me. In retrospect it makes sense that the memory builds up with the trace statement. From now on I will test for memory leak in the standalone player. Jiri EECOLOR wrote: That all looks fine. There is no memory leak in the code you showed here. You do not need to delete tTime as it is declared within the scope of the function and will be marked for deletion as soon as the function is complete. If I run the classes (with the line clockdata = new ClockData() commented out), the memory is stable in the stand alone player. In flash the memory is slowly going up, but that is because we are doing a trace each interval. Note that it takes a few seconds for the memory to be stable. Greetz Erik On 2/18/08, Jiri Heitlager [EMAIL PROTECTED] wrote: Erik, it would be something like this: var c:Clock = new Clock(); getTime() setInterval(this , 'getTime' , 1000) function getTime() { var tTime:Time = c.getElepasedTime() trace(tTime.serialize()) delete tTime; // is this neccessary and if so, is tTime = null maybe better ??? } EECOLOR wrote: Could you post the code that actualy calls these methods? Greetz Erik On 2/15/08, Jiri Heitlager [EMAIL PROTECTED] wrote: Thanks for your reply Bob, it is for AS2. I read a lot of articles about it and understand the general concept. That is why I post the question. If I understood correctly the posted code should not leave any objects unreferenced and therefor cleared for deleting. But the memory goes up anyway. I tested it with only this two classes instantiated and nothing else. I am hoping somebody can take a look at the code I posted and give me the reassurence that I am doing things correctly. Jiri ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
[Flashcoders] Re: E4X Non sense !!! Need help | Thank Kenneth
Thanks Kenneth This was exactly what I was looking for. //trace(xmlData2.accesscode.(shortcut.text()[0] == S000)); Martin T LVL /// Date: Fri, 15 Feb 2008 16:57:13 -0500 From: Martin Tremblay [EMAIL PROTECTED] Subject: [Flashcoders] E4X Non sense !!! Need help To: flashcoders@chattyfig.figleaf.com Message-ID: [EMAIL PROTECTED] Content-Type: text/plain; charset=us-ascii EX4 cannot find a node using E4X when one of it's sibling has the same name. Is there a way to avoid this problem ? var xmlData:XML = root accesscode id=S001 shortcutS001/shortcut shortcutsmallbusiness/shortcut /accesscode accesscode id=S000 shortcutS000/shortcut shortcut2S000/shortcut2 /accesscode /root; trace(xmlData.accesscode.(@id == S000)); trace(-); trace(xmlData.accesscode.(shortcut == S000)); trace(-); trace(xmlData.accesscode.(@id == S001)); trace(-); trace(xmlData.accesscode.(shortcut == S001)); trace(-); ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [flashcoders] copy to clipboard
sweet. No more googling! It seems like secret topic. For clipboarding in flex : http://livedocs.adobe.com/labs/flex3/langref/flash/desktop/Clipboard.html Thank you guys Matthew Houliston a écrit : On 18/02/2008 16:16, laurent wrote: Is it possible to copy a string to the clipboard with actionScript 3 or is it only available from Flex ? import flash.system.System; System.setClipboard(some text); There's no System.getClipboard(). Write only. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [flashcoders] copy to clipboard
For the record, that's AIR ;) Kenneth Kawamoto http://www.materiaprima.co.uk/ laurent wrote: For clipboarding in flex : http://livedocs.adobe.com/labs/flex3/langref/flash/desktop/Clipboard.html ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
[Flashcoders] AS3 workflow - attachMovie migration
Hello all, this is a more general question about how people are organizing their display code, particularly where attachMovie used to be used in AS2. My UI code basically centered on three things: a list of attachMovie() calls to attach and position graphic elements, event handling for interactive elements, and finally tweening everything into place. In AS2 my swfs were always blank, one-frame affairs that built everything dynamically. I would like to stay within this same framework, but I'm not necessarily trying to replicate my AS2 methods. I would like to maintain my habit of keeping everything OFF of the timeline. Using libraries is slightly different now-- obviously better in many respects -- in that everything is its own object. But attaching library objects to the display list is a bit more tedious and I'm considering the best approach for my UI building scripts. Any insights into others' workflow habits would be great. Thanks! Jason Van Pelt Interactive Developer 504.210.1232 (p) / 504.581.2731 (f) Peter A. Mayer Advertising, Inc. www.peteramayer.com___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
[Flashcoders] determining url of container page
How can you determine from within Flash (or php on the server when the request for the swf comes in) the url of the page within which a swf is embedded? Thanks! ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] determining url of container page
In AS2 it's _root._url. In AS3 I think it's stage.contentLoaderInfo.url or something like that. Check the docs on the LoaderInfo class. On Feb 18, 2008 6:49 PM, Andrew Sinning [EMAIL PROTECTED] wrote: How can you determine from within Flash (or php on the server when the request for the swf comes in) the url of the page within which a swf is embedded? Thanks! ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders -- Ketan Anjaria 415.260.8742 f. 415-358-4278 [EMAIL PROTECTED] www.kidbombay.com ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] determining url of container page
_root._url returns the url of the swf, not the html page. At 08:38 PM 2/18/2008, Ketan Anjaria wrote: In AS2 it's _root._url. In AS3 I think it's stage.contentLoaderInfo.url or something like that. Check the docs on the LoaderInfo class. On Feb 18, 2008 6:49 PM, Andrew Sinning [EMAIL PROTECTED] wrote: How can you determine from within Flash (or php on the server when the request for the swf comes in) the url of the page within which a swf is embedded? Thanks! ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders -- Ketan Anjaria 415.260.8742 f. 415-358-4278 [EMAIL PROTECTED] www.kidbombay.com ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] determining url of container page
Andrew Sinning wrote: How can you determine from within Flash (or php on the server when the request for the swf comes in) the url of the page within which a swf is embedded? http://docs.sun.com/source/816-6408-10/location.htm You can pull it from JavaScript using ExternalInterface. -Ricky ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders