RE: [Flashcoders] custom map image geocoding service?
Hehe Good one , I was looking little into it and as I see that Mercator projection is easiest to implement (Google , Yahoo , Map24, ... use Mercator Projection) so you can use their tiles. Math is really simple you can find it here: http://en.wikipedia.org/wiki/Mercator_projection Good luck -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Rich Rodecker Sent: Tuesday, June 17, 2008 7:40 PM To: Flash Coders List Subject: Re: [Flashcoders] custom map image geocoding service? Wow, I didn't think it would be that difficult. I could have sworn there were some upload your image, we'll hook it up services out there. On Tue, Jun 17, 2008 at 1:19 AM, Geografiek [EMAIL PROTECTED] wrote: That is, only if his base map actually is in Mercator projection (which I doubt). Rich, first you have to find out the actual projection of your base map. Only after that you can do the math. For more info on map projections: http://www.csiss.org/map-projections If you are north american based you might get more info here: http:// www.nacis.org HTH Willem van den Goorbergh Op 17-jun-2008, om 9:34 heeft Haris KRAJINA het volgende geschreven: Hehe Google Mercator projection and start doing math . I started working on maps too and as I can see my employer uses Mercator projection algorithm to calculate x,y. So my advice to you is to get started with that if you don't find service that will help you. Greetings -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Rich Rodecker Sent: Monday, June 16, 2008 10:05 PM To: Flash Coders List; [EMAIL PROTECTED] Subject: [Flashcoders] custom map image geocoding service? I'm building a flash app which requires some mapping functionality. It's relatively simple, so I'm not sure that it needs all the bells and whistles that come with using google's or yahoo's map services. Basically we have a static U.S./Canada map image (no pan or zoom) that has some interactive markers overlaid on it...pretty much a heatmap I guess. We're already set up with receiving the latitude and longitude coordinates, now i just need to translate that into x,y positions on the map. I know there are services out there that handle this, but I've been searching for a while and most of the results reference back to google or yahoo maps, so I'm thinking I'm not suing the right search terms. Does anyone know where I can get this done...or any other tips/advice that might help? Thanks, Rich ___ 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 =+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+= Geografiek is a Dutch, Utrecht-based map and chart design company. Willem van den Goorbergh can be contacted by telephone: (+31)30-2719512 or cell phone: (+31)6-26372378 or by fax: (+31)302719687 snail mail: Hooghiemstraplein 89 3514 AX UTRECHT Visit our website at: http://www.geografiek.nl =+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+= ___ 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] Exclude classes
Hi Steven, I've joined this conversation half-way through so sorry if this has already been said: If you're wanted to exclude some classes because you want to load them at runtime, then you can create an SWC with the classes in them and put that in your classpath in the Flash IDE. Classes in the SWC will be used for compile time checking but will not be included. If you are compiling using the Flex Compiler then you can use the external-library-path option to use SWCs in the same way. Sunil -Original Message- From: Steven Sacks [mailto:[EMAIL PROTECTED] Sent: 17 June 2008 18:51 To: Flash Coders List Subject: Re: [Flashcoders] Exclude classes In AS3, there is no exclude.xml. Whether this was an oversight or, for some reason, not possible, you cannot do this in AS3. You can, however, use the Bridge pattern. http://www.stevensacks.net/2008/01/23/update-gaia-bridge-pattern-api/ In a nutshell, you: 1. Make an Interface for the class you want to share between swfs (the implementation), but only want to be compiled in one. 2. Make a class to Bridge the gap that contains a static getter that returns the Interface, but really returns the Implementation. You could also just make it a public static var if you really want. I used an internal namespace because I don't want developers overwriting the implementation. 3. Set the Implementation in your primary swf to make it available to all the other swfs. 4. Import the Bridge class in your other swfs and now you can access the implementation. Here is a trivial example that would work. package { import IClass; public class Bridge { public static var api:IClass; } } /// import Bridge; Bridge.api.yourMethod(); /// AFAIK, this is easiest way to overcome the lack of exclude.xml in AS3. There are other ways, but they are complicated and difficult. HTH, Steven ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] protect CSV separator
Can't you switch for another separator ? Instead of comma, try ___ (underscore underscore underscore) ? Cedric Hi, I'm creating a CSV file from an AIR application, the separator is a comma. How can I protect a comma when I create the String? So that it is not using as a separator, I've got some texts from the database and I might have some to protect. I tried the ASCII code, but it is printing it straight in the CSV file. I also tried a backslash before, no success Any hint? Thanks Romu ___ 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] protect CSV separator
I answer myself :P To protect the comma in a CSV string, it is in fact quite simple: myString = '' + myString + ''; Romu -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Romuald Quantin Sent: 18 June 2008 13:35 To: Flashcoders@chattyfig.figleaf.com Subject: [Flashcoders] protect CSV separator Hi, I'm creating a CSV file from an AIR application, the separator is a comma. How can I protect a comma when I create the String? So that it is not using as a separator, I've got some texts from the database and I might have some to protect. I tried the ASCII code, but it is printing it straight in the CSV file. I also tried a backslash before, no success Any hint? Thanks Romu ___ 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] How to avoid fake data being sent to server?
Does anyone know documentation explaining how to secure Flash client / Server communication? Imagine you have a Flash game. When the game is over, the score is stored in the server. The value can be changed from 150 points to 100 points in memory using some game cracking tools, if you use plain numbers on a variable. You can store the data in some special format which can't be found using that kind of tools. But the client can be easily decompiled. Or maybe you can intercept and change the value (using some kind of network proxy) while it's sent to the server. How does it work in online casinos? I guess the result is probably calculated before it happens on server side, so you just see a representation. This is possible in cases where the input are some numbers, and the result is calculated from that input. But this involves no real user interaction. Anyone on the list dealt with these problems before? Thanks :) ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] How to avoid fake data being sent to server?
Abe Pazos wrote: How does it work in online casinos? I guess the result is probably calculated before it happens on server side, so you just see a representation. This is possible in cases where the input are some numbers, and the result is calculated from that input. But this involves no real user interaction. It works the same way for any game, you have to run the game state on the server side. Online casinos use it, as do MMOs. -Ricky ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] How to avoid fake data being sent to server?
this might help you: http://cosmincimpoi.blogspot.com/2007/09/loadvariables-security-by-built-in.html#links email me for details On Jun 18, 2008, at 4:19 PM, Abe Pazos wrote: Does anyone know documentation explaining how to secure Flash client / Server communication? Imagine you have a Flash game. When the game is over, the score is stored in the server. The value can be changed from 150 points to 100 points in memory using some game cracking tools, if you use plain numbers on a variable. You can store the data in some special format which can't be found using that kind of tools. But the client can be easily decompiled. Or maybe you can intercept and change the value (using some kind of network proxy) while it's sent to the server. How does it work in online casinos? I guess the result is probably calculated before it happens on server side, so you just see a representation. This is possible in cases where the input are some numbers, and the result is calculated from that input. But this involves no real user interaction. Anyone on the list dealt with these problems before? Thanks :) ___ 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] scaleX on TextField
Hello, I have a little question that seems obvious but on which I pull my hair off my head: Does anybody know how to deform a TextField instance? I tried the basics: var txt:TextField = new TextField(); txt.text = TEST DE DEFORMATION; txt.scaleX = 20; addChild(txt); And: var s:Sprite = new Sprite(); addChild(s); var txt:TextField = new TextField(); txt.text = TEST DE DEFORMATION; s.addChild(txt); s.scaleX = 20; But nothing happens... Well the TextField is indeed resized but not the containing text. By doing the same thing with scaleY, the text is scale along BOTH Y (good) and X (bad). Any idea how to achieve this? Kind regards, Florent JEAN French Flash Developer http://www.nowhen.net ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] scaleX on TextField
On Wed, Jun 18, 2008 at 10:16 AM, [EMAIL PROTECTED] wrote: Hello, I have a little question that seems obvious but on which I pull my hair off my head: Does anybody know how to deform a TextField instance? I tried the basics: var txt:TextField = new TextField(); txt.text = TEST DE DEFORMATION; txt.scaleX = 20; addChild(txt); And: var s:Sprite = new Sprite(); addChild(s); var txt:TextField = new TextField(); txt.text = TEST DE DEFORMATION; s.addChild(txt); s.scaleX = 20; But nothing happens... Well the TextField is indeed resized but not the containing text. By doing the same thing with scaleY, the text is scale along BOTH Y (good) and X (bad). Any idea how to achieve this? Kind regards, Florent JEAN French Flash Developer http://www.nowhen.net ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Create an empty movieclip, and add the textfield as it child, and scale the parent movieclip, not the textfield itself. Maybe that works. -- Fábio Pinatti :: web.developer www.pinatti.com.br :: 19. 9184.3745 / 3342.1130 ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] scaleX on TextField
Quoting Fabio Pinatti [EMAIL PROTECTED]: It's one of the solution I tried and it doesn't work... In my original message I copy/paste an exemple with Sprite but the problem still remains with MovieClip. But thanks anyway, Florent JEAN French Flash Developer http://www.nowhen.net Create an empty movieclip, and add the textfield as it child, and scale the parent movieclip, not the textfield itself. Maybe that works. -- Fábio Pinatti :: web.developer www.pinatti.com.br :: 19. 9184.3745 / 3342.1130 ___ 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] Is there any way to get a list of the classescompiled into a SWF?
The OP mentioned in another post he's on a Mac - so am I. I'd love to use Flash Develop too but it seems it is Windows-only. Is that true? Romuald Quantin wrote: I think Flash develop should show you the content of your SWF. Sothink decompiler will do the job as well, but PC software. I remember FDT is showing the content of a SWC, you might be able to do the same with a SWF. Romu www.soundstep.com -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Piers Cowburn Sent: 17 June 2008 11:07 To: Flash Coders List Subject: Re: [Flashcoders] Is there any way to get a list of the classescompiled into a SWF? AS3, and I'm using Flash CS3. I wouldn't be opposed to using something else though! Piers On 17 Jun 2008, at 10:53, Hans Wichman wrote: Hi, as2 or as3? In as2 i'd use the verbose option on mtasc. greetz JC On Tue, Jun 17, 2008 at 11:33 AM, Piers Cowburn [EMAIL PROTECTED] wrote: I'm trying to nail down where a reference to an unwanted class is coming from, and I need to be able to work out which classes are being compiled from my classpath. The reason is because I'm trying to take small element out of a larger project and put it into its own SWF. I've done this by extending the classes that are involved to override anything which has references to parts of the app which won't be in the smaller SWF, but one of them is still being included from somewhere, and I can't work out where. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] scaleX on TextField
var txt:TextField = new TextField(); txt.text = TEST DE DEFORMATION; var bmpdata:BitmapData = new BitmapData(txt.width, txt.height); bmpdata.draw(txt); var bmp:Bitmap = new Bitmap(bmpdata); bmp.scaleX = 4; addChild(bmp); ...although you cannot select the text or anything :) Kenneth Kawamoto http://www.materiaprima.co.uk/ [EMAIL PROTECTED] wrote: Hello, I have a little question that seems obvious but on which I pull my hair off my head: Does anybody know how to deform a TextField instance? I tried the basics: var txt:TextField = new TextField(); txt.text = TEST DE DEFORMATION; txt.scaleX = 20; addChild(txt); And: var s:Sprite = new Sprite(); addChild(s); var txt:TextField = new TextField(); txt.text = TEST DE DEFORMATION; s.addChild(txt); s.scaleX = 20; But nothing happens... Well the TextField is indeed resized but not the containing text. By doing the same thing with scaleY, the text is scale along BOTH Y (good) and X (bad). Any idea how to achieve this? Kind regards, Florent JEAN French Flash Developer http://www.nowhen.net ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Is there any way to get a list of the classescompiled into a SWF?
Yes. Other options include FDT and Flex Builder. TextMate is another way to go, but I don't think it can show you the script content of SWCs or SWFs. On 6/18/08 10:41 AM, Jim McIntyre wrote: The OP mentioned in another post he's on a Mac - so am I. I'd love to use Flash Develop too but it seems it is Windows-only. Is that true? Rich http://www.LearningActionScript3.com ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] scaleX on TextField
Yes but... In my case I can have scaleX 1000, so I loose too much quality with this method. I'm triing to embbed fonts outlines in my TextTield but the result is not very good (bad antialiasing). I guest that I have no other choice :) Thanks again, __ Florent Quoting Kenneth Kawamoto [EMAIL PROTECTED]: var txt:TextField = new TextField(); txt.text = TEST DE DEFORMATION; var bmpdata:BitmapData = new BitmapData(txt.width, txt.height); bmpdata.draw(txt); var bmp:Bitmap = new Bitmap(bmpdata); bmp.scaleX = 4; addChild(bmp); ...although you cannot select the text or anything :) Kenneth Kawamoto http://www.materiaprima.co.uk/ [EMAIL PROTECTED] wrote: Hello, I have a little question that seems obvious but on which I pull my hair off my head: Does anybody know how to deform a TextField instance? I tried the basics: var txt:TextField = new TextField(); txt.text = TEST DE DEFORMATION; txt.scaleX = 20; addChild(txt); And: var s:Sprite = new Sprite(); addChild(s); var txt:TextField = new TextField(); txt.text = TEST DE DEFORMATION; s.addChild(txt); s.scaleX = 20; But nothing happens... Well the TextField is indeed resized but not the containing text. By doing the same thing with scaleY, the text is scale along BOTH Y (good) and X (bad). Any idea how to achieve this? Kind regards, Florent JEAN French Flash Developer http://www.nowhen.net ___ 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] How to avoid fake data being sent to server?
[EMAIL PROTECTED] wrote: this might help you: http://cosmincimpoi.blogspot.com/2007/09/loadvariables-security-by-built-in.html#links Security through obscurity is not a very good idea. You also still have the problem of someone decompiling the swf and modifying it to their needs. -Ricky ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] scaleX on TextField
On Jun 18, 2008, at 11:27 AM, [EMAIL PROTECTED] wrote: Yes but... In my case I can have scaleX 1000, so I loose too much quality with this method. I'm triing to embbed fonts outlines in my TextTield but the result is not very good (bad antialiasing). I guest that I have no other choice :) Thanks again, Don't use scaleX or width/height modifications. Use transformation matrices. I have an application that allows the user to scale, rotate, move (unconstrained and constrained) a TextField (flash and flex) without problems. The only issues are with the fact that there's a bug in the Flash Player with certain settings on the antialiasing - which causes the kerning of the text field to jump around wildly. In my case since this bug rears it's ugly head when text fields are rotated or scaled, I apply the transformations to the type and re- render the result back into a BitmapData object with the new dimensions of the field. - jon ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] scaleX on TextField
The max size for BitmapData is 2880 x 2880 px, so if you want scale something up to x1000 you may run into a problem unless you chop it up first. Kenneth Kawamoto http://www.materiaprima.co.uk/ [EMAIL PROTECTED] wrote: Yes but... In my case I can have scaleX 1000, so I loose too much quality with this method. I'm triing to embbed fonts outlines in my TextTield but the result is not very good (bad antialiasing). I guest that I have no other choice :) Thanks again, __ Florent Quoting Kenneth Kawamoto [EMAIL PROTECTED]: var txt:TextField = new TextField(); txt.text = TEST DE DEFORMATION; var bmpdata:BitmapData = new BitmapData(txt.width, txt.height); bmpdata.draw(txt); var bmp:Bitmap = new Bitmap(bmpdata); bmp.scaleX = 4; addChild(bmp); ...although you cannot select the text or anything :) Kenneth Kawamoto http://www.materiaprima.co.uk/ [EMAIL PROTECTED] wrote: Hello, I have a little question that seems obvious but on which I pull my hair off my head: Does anybody know how to deform a TextField instance? I tried the basics: var txt:TextField = new TextField(); txt.text = TEST DE DEFORMATION; txt.scaleX = 20; addChild(txt); And: var s:Sprite = new Sprite(); addChild(s); var txt:TextField = new TextField(); txt.text = TEST DE DEFORMATION; s.addChild(txt); s.scaleX = 20; But nothing happens... Well the TextField is indeed resized but not the containing text. By doing the same thing with scaleY, the text is scale along BOTH Y (good) and X (bad). Any idea how to achieve this? Kind regards, Florent JEAN French Flash Developer http://www.nowhen.net ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] scaleX on TextField
Couldnt you use Fabios method? or scale the container MC and then convert that whole thing to Bitmap? .m On Wed, Jun 18, 2008 at 11:27 AM, [EMAIL PROTECTED] wrote: Yes but... In my case I can have scaleX 1000, so I loose too much quality with this method. I'm triing to embbed fonts outlines in my TextTield but the result is not very good (bad antialiasing). I guest that I have no other choice :) Thanks again, ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] scaleX on TextField
Is this online somewhere? Sounds interesting :) .m On Wed, Jun 18, 2008 at 12:29 PM, Jon Bradley [EMAIL PROTECTED] wrote: Don't use scaleX or width/height modifications. Use transformation matrices. I have an application that allows the user to scale, rotate, move (unconstrained and constrained) a TextField (flash and flex) without problems. The only issues are with the fact that there's a bug in the Flash Player with certain settings on the antialiasing - which causes the kerning of the text field to jump around wildly. In my case since this bug rears it's ugly head when text fields are rotated or scaled, I apply the transformations to the type and re-render the result back into a BitmapData object with the new dimensions of the field. - jon ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] How to avoid fake data being sent to server?
yes and no solution comes in 2 parts: 1. use loadvariables loadVariables(.../script.php?foo1=1foo2=2, this, POST) this is something: when u use loadvariables... flash will send all _root variables too... so php will recive foo1, foo2 and all variables that reside in _root ... with loadvariables. i know this is kinda bad but works... make sure u have enough variables in root... most of us have more than enough :) if anyone use decompilers/http request.. will see .../script.php? foo1=1foo2=2 but i have a little surprise in php: 2. extra check in php - make sure script is called from swf and not from browser. you can add some ip ban script for those who try. ?php if (!isset($_REQUEST[speed]) || !isset($_REQUEST[stuffurl])) die(); . . . enjoy On Jun 18, 2008, at 7:25 PM, Ricky Bacon wrote: [EMAIL PROTECTED] wrote: this might help you: http://cosmincimpoi.blogspot.com/2007/09/loadvariables-security-by-built-in.html#links Security through obscurity is not a very good idea. You also still have the problem of someone decompiling the swf and modifying it to their needs. -Ricky ___ 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] Maintain position on rotation
AS3. I have a MC I am rotating, and inside the MC I have a Sprite (affixed to the bottom of the MC). While rotating, I want to place another MC's x,y (each frame) on that rotating MC. However the x,y never updates. I tried localToGlobal, but that doesn't seem to change either during the rotation. Can this be easily done? ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] How to avoid fake data being sent to server?
[EMAIL PROTECTED] wrote: yes and no 2. extra check in php - make sure script is called from swf and not from browser. you can add some ip ban script for those who try. ?php if (!isset($_REQUEST[speed]) || !isset($_REQUEST[stuffurl])) die(); And I can spoof the headers... ;) If you give someone access to game logic on the client, they can hack it. -Ricky ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Maintain position on rotation
Hi Eric, Try out this code, should do the trick and show that localToGlobal does work Run it once as is, then uncomment the rotation and see the results. hth, Rob var sprite1:Sprite = new Sprite(); sprite1.graphics.beginFill(0x00ff00); sprite1.graphics.drawRect(0,0,100,100); sprite1.graphics.endFill(); var sprite2:Sprite = new Sprite(); sprite2.graphics.beginFill(0xff); sprite2.graphics.drawRect(0,0,10,10); sprite2.graphics.endFill(); sprite1.addChild(sprite2); sprite2.x = 90; sprite2.y = 90; addChild(sprite1); sprite1.x=100; sprite1.y=100; //sprite1.rotation = 45; trace(sprite1.localToGlobal(new Point(sprite2.x, sprite2.y))); On 18-Jun-08, at 1:27 PM, eric e. dolecki wrote: AS3. I have a MC I am rotating, and inside the MC I have a Sprite (affixed to the bottom of the MC). While rotating, I want to place another MC's x,y (each frame) on that rotating MC. However the x,y never updates. I tried localToGlobal, but that doesn't seem to change either during the rotation. Can this be easily done? ___ 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] Maintain position on rotation
Theoretically, I'm not sure why not. Can you describe how/where they should overlap or post some code? On 6/18/08 1:27 PM, eric e. dolecki wrote: AS3. I have a MC I am rotating, and inside the MC I have a Sprite (affixed to the bottom of the MC). While rotating, I want to place another MC's x,y (each frame) on that rotating MC. However the x,y never updates. I tried localToGlobal, but that doesn't seem to change either during the rotation. Can this be easily done? Rich http://www.LearningActionScript3.com ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] scaleX on TextField
On Jun 18, 2008, at 1:05 PM, Matt S. wrote: Is this online somewhere? Sounds interesting :) var m:Matrix = new Matrix(); m.scale(100,1); myDisplayObject.transform.matrix = m; cheers, jon ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Maintain position on rotation
On Jun 18, 2008, at 1:27 PM, eric e. dolecki wrote: While rotating, I want to place another MC's x,y (each frame) on that rotating MC. However the x,y never updates. I tried localToGlobal, but that doesn't seem to change either during the rotation. Can this be easily done? Give something like this a shot. Note that this is completely untested because I wrote it right here ... this is the general idea though. var m:Matrix = mainMC.transform.matrix; var pt:Point = new Point( mainMC.theChild.x, mainMC.theChild.y); var position:Point = m.transformPoint(pt); // You might need to add in the tx,ty offsets var matchMoveClipX:Number = position.x + m.tx; var matchMoveClipY:Number = position.y + m.ty; That assumes, of course, that you're applying your transformations using matrices. If you use dot notation on the properties (rotate, scale, x y), I'm not 100% certain that those properties are updated in the transformation matrix of the object. good luck. jon ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] How to avoid fake data being sent to server?
On Jun 18, 2008, at 12:25 PM, Ricky Bacon wrote: Security through obscurity is not a very good idea. You also still have the problem of someone decompiling the swf and modifying it to their needs. If Flash Media Server 3 is being used, for a very nice level of protection it can hash the game SWF engine (just place it in the application directory and turn on the feature in the application .asc file). If the SWF requesting doesn't match the swf in the FMS3 app directory then it won't allow it to run. Still doesn't negate the idea that the game logic should be on the server. :) - jb ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Maintain position on rotation
Hey guys, Before I saw these response posts, I took a slightly different angle on things. When I create my limbs, I am actually adding another limb to a joint sprite on the end of the main limb. That way it simply moves with the upper limb, and can still rotate freely on its own, using some rotational rules. It avoids a bunch of math and allows the nesting to simply take care of some of it. When I tried points and localToGlobal, it still gave me weird results, making me take the route above. Thanks for the responses, it's why this list is the best in the world. - e. On Wed, Jun 18, 2008 at 2:16 PM, Jon Bradley [EMAIL PROTECTED] wrote: On Jun 18, 2008, at 1:27 PM, eric e. dolecki wrote: While rotating, I want to place another MC's x,y (each frame) on that rotating MC. However the x,y never updates. I tried localToGlobal, but that doesn't seem to change either during the rotation. Can this be easily done? Give something like this a shot. Note that this is completely untested because I wrote it right here ... this is the general idea though. var m:Matrix = mainMC.transform.matrix; var pt:Point = new Point( mainMC.theChild.x, mainMC.theChild.y); var position:Point = m.transformPoint(pt); // You might need to add in the tx,ty offsets var matchMoveClipX:Number = position.x + m.tx; var matchMoveClipY:Number = position.y + m.ty; That assumes, of course, that you're applying your transformations using matrices. If you use dot notation on the properties (rotate, scale, x y), I'm not 100% certain that those properties are updated in the transformation matrix of the object. good luck. jon ___ 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] How to avoid fake data being sent to server?
This isn't even open for debate. If you don't run your logic on the server, you have zero security. End of story. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
RE: [Flashcoders] How to avoid fake data being sent to server?
if anyone use decompilers/http request.. will see .../script.php? foo1=1foo2=2 but i have a little surprise in php: If you use a recording HTTP proxy or packet sniffer, you will see (and can modify) the entire HTTP request, not just the first line. 2. extra check in php - make sure script is called from swf and not from browser. you can add some ip ban script for those who try. ?php if (!isset($_REQUEST[speed]) || !isset($_REQUEST[stuffurl])) die(); . If I record the entire HTTP request, there is no server-side check you can make to guarantee anything my client says. Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ Fig Leaf Software provides the highest caliber vendor-authorized instruction at our training centers in Washington DC, Atlanta, Chicago, Baltimore, Northern Virginia, or on-site at your location. Visit http://training.figleaf.com/ for more information! ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] scaleX on TextField
Oh I meant your actual app, but thanks for the code. :) .m On Wed, Jun 18, 2008 at 2:07 PM, Jon Bradley [EMAIL PROTECTED] wrote: On Jun 18, 2008, at 1:05 PM, Matt S. wrote: Is this online somewhere? Sounds interesting :) var m:Matrix = new Matrix(); m.scale(100,1); myDisplayObject.transform.matrix = m; cheers, jon ___ 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