ActionScript 3.0 :: Plot Graphics Based On Map Coordinates?
Dec 15, 2010
Basically he have a lot of ships, that he need to plot on a map. The map is just a picture of europe, but the information for each ship is given in coordinates (longitude and latitude), and he want to know if there is a way to plot each ship (represented by a small red dot) on the picture map of europe using the coordinates already given.
Otherwise he would have to go into google earth and locate each position, and then add it, which would be pretty time consuming after a couple hundred ships.
If there are no easy way to do this, would there then be another way to convert the longitude/latitude coordinates into a x/y coordinate system for the picture of the map? (if we know what area the picture covers on the map)
I was thinking that it will be an easy task but something is not right. Here is what I am trying to do. I want to be able to run a function if the mouse is moved over certain areas of the movie clip on stage. Based on which area of the movie clip the mouse is moved I'd like to be able to trigger different behaviour. Below is the code which I was thinking shoud do it:
Code: var posY:Number; var mouseListener:Object = new Object(); mouseListener.onMouseMove = function() {
[Code].....
For some reason, the trace statement is ran always when the mouse moves regardless if it is over the movie clip or not. It also only shows the first trace statement. It is never chaged even if the mouse is in the different areas of the movie clip.
I was thinking that it will be an easy task but something is not right. Here is what I am trying to do. I want to be able to run a function if the mouse is moved over certain areas of the movie clip on stage. Based on which area of the movie clip the mouse is moved I'd like to be able to trigger different behaviour. Below is the code which I was thinking shoud do it:
ActionScript Code: var posY:Number; var mouseListener:Object = new Object();
I am developing a tool for analysis where you drag specific events onto a special wheel to analyze events based on time of day etc. I had a few users testing it and they asked for a save and load feature. I have done as much as I can at this point and am just growing confused. Can one of you experts take a look at my .fla and see what can be done...I think I am close but just can't figure it out. Also, if you can provide comments on cleaning up my code would be nice too.
I was wondering about MC and hey can help to lag a game out. I set up an advanced class system so i don't have to use MC to simulate walls, all i use isthe x,y,width and height. Well anyway since i don't need MC anymore I was wondering if there is a way to attach Graphics instead of MC cause a Graphics file size is relatively small than that of a graphic, I think. If anyone could tell me thats true and show me a way to attach graphics that would be nice. I haven't tried it yet but maybe if I exported the graphic from the library imihgt be able to call its name, but it doesn't have an instance name so im stuck.
I was trying to convert global coordinates to local coordinates of a UIComplenent in my flex project using below code using below code
var gp:Point = new Point(e.stageX,e.stageY); //global point var lp:Point = uic.globalToLocal(gp); //local point
uic is UIComponent in which I have subclass of Sprite for drawing something I have set the sprite's mouseEnabled and mouseChildren to false to not interrupt the mouse event. above code is within uic's mousemove event where I was tracing the gp and lp gp was giving correct value and suprisingly lp was giving negetive values. when I move the move to the top left corner of uic i expect lp to be 0,0 but it is giving the -width of of uic. I broke my head for hours and ended up finding an alternate by using offsets. Infact my original code was much simpler like this which was same issue
var lp:Point = new Point(e.localX,e.localY);
I am not sure what exactly is causing this problem. the workaround had lot of issues and it creating a mess in my rest of the algorithms.Just now I found even more interesting thing (which is actually weird). for some reason I went and create a new lp2
var lp2:Point = new Point(e.localX,e.localY);
now surprisingly it was giving correct values as expected and I went back and changed the code as
var gp:Point = new Point(e.stageX,e.stageY); //global point var lp:Point = uic.globalToLocal(gp); //local point var lp2:Point = new Point(e.localX,e.localY); var lp2:Point = uic.globalToLocal(gp);
now it is expected to have all the lp, lp2 and lp3 variables to be same but weiredly lp two is giving wrong value and lp2 and lp3 were giving correct. I am suspecting using the variable lp has something to do. I am not sure about that but above proves it so right now I am using lp2.
I need to plot a contour chart in the web browser. It needs to be interactive as well. Does anyone know good javascript library, flash or flex libary to do this?
I'm new to Flash and actionscripting and need some general information on how to plot a point on a graph. I've been researching how to make this happen and an wondering if I'm on the correct track.
It seems like the best way to do this will be to place the sprite at the x,y location on the stage that represents the graphs origin, then add to the x value the value of x for the point of interest, then add to the y value, what the y value of the point is.[code]...
I was reading the 'Isometric Transformations' tutorial by Danko Kozar and I have a few questions. I understand what all the code does, but not how it does it. First of all, how does the following code work:
transforms x,y,z coordinates into Flash x coordinate xFla = function (x, y, z) { // cartesian coordinates[code].....
I understand that it converts 3d coordinates to 2d coordinates, but I don't understand how. What numbers whould be punched into x, y, and z to acquire certain desired effects?Also, what's the difference between moveTo and lineTo:
red line style(1, "0xFF0000", 100); plot(0, 0, 0); draw(200, 0, 0);
I've been tasked with creating an interactive sector map that has over 200 companies plotted on it. The map would be of the UK with the location of each company plotted as a dot. On hover there will be a popup box that shows all the info for each company.
What would be the best to build this? Is there any kind of pre-built Jquery or css maps out there that I could adjust to my needs?
As a side note, I'd need to hook this up to Wordpress.
i need to plot a graph and have no idea how to even kick start. These is what how dynamic the graph is: Basically is letting user trace the point(the correct X and Y coordination) on the graph and allow them to plot the graph. For example, when the user click on the correct coordination, a dot will appear and when the user click on the 2nd coordination, a line will appear to connect the first point to the 2nd one and etc. The last fucntion of this graph is to have a clear button that allow the user to clear the last plot attempt and so forth so that the user can continue to plot the graph.
Im making a little app in flash using papervision I want to make a regular movieClip show up in the same place as a papervision object. The coordinates seem like perspective is affecting the number displayed.
When I use radius property in Flex plot chart It causes a warning says radius has been deprecated, use radius style There's no online documents about this warning. How Can I use radius style ?
I have a chart with multiple series (Area and Plot). The Area series has 'xField' as 'timeStamp' and 'yField' as 'price'. The Plot Series has 'xField' as 'timeStamp' and no 'yField'.... ! Can I position the plot series though I do not have a corresponding 'yField' value ? Can I assign a default value to the 'yField' (say '10' for all...?)
We'd like to show some shiny charts/plots/tables for some business data. It targets PC browsers and iPhone/iPad.
We have done some research and here's possible solutions:
HTML5: not yet very standard and we are lack of experience. Flash: it looks like Flash on iPhone runs on some sort of virtual machine, it's not very efficient. We have little knowledge on this too. Silverlight + Cocoa Touch: it looks like MS is now giving up SL. We need two times of work on GUI if we choose this. Maybe I can write some XAML parser for iOS using UIKit and Core Animation.
So I have this flash app I'm making that uses a URL load to load a bunch of plot points from an address. When the loader finishes, it send the data to a plotter function. the plotter function clears the graphics in a shape called graphLine. It then draws a line from one plot point to another using the lineTo function. Basically every 3 seconds it makes this request and redraws the screen and updates the value of a textfield to the current y value. In flex builder 3, it works great in debug mode. The screen updates just fine. However, when I make the release build and test it out in a browser, it loads the data fine, but will not draw it until I stop the graphing process. Any thoughts on this one? Here's the code for the graphing function
I have a large vector drawing (imagine 5000x5000) that i want to break up into separate pieces. I know that I can convert this vector drawing into a bitmap and then use the copyPixels method to create many separate bitmaps of the different regions of the original vector drawing, but is there any way to subdivide it into movieclips that just contain vector graphics instead of a bitmap?The reason im dividing a big chunk of vector graphics into smaller pieces is for performance reasons, so flash would only render a small part of this big chunk at a time (only certain regions/voxels/subdivisions are rendered at a time). But bitmaps apparently take up a lot of memory and the system im using would take much less memory if these subdivisions could be preserved in their original vector graphics form.
I imagine I could use masks somehow to achieve this effect (for each subdivision, duplicate the huge image and mask only the region that the subdivision represents), but I dont know the performance costs of masking or if this will create other problems.So is there anyway to split up a movieclip of vector graphics into smaller movieclips of vector graphics the same way copyPixels can with bitmaps?
I just discovered impure.com and was very impressed by what can be achieved in terms of visualizing data using their workspace. Although the platform is free to use, but not open source yet. This causes a few problems because the API section works with .com sites for eg. for ebay, so I cannot visualize ebay listings for regional sites such as ebay.in because the link to ebay.com is hardcoded.I searched around, but didn't find other projects that offer a similar way to work with site APIs and other data sources with the kind of user interface and detail that impure.com does in a realtime way within a browser window.This brings me to the questions:
-What technologies would be involved in creating a similar kind of project
-What are the open source tools that can help develop a fullscreen UI to render the workspace. Are there any alternatives to flash for this, and how do they compare
The goal would be to use standard python data structures, python scripts to do some processing on these data structures, scripts to gather data from csv, json and API sources such as google yahoo, wikipedia and flickr, and scripts to render graphs, tag clouds, network visualizations etc. Then bring them all together into a visual interface that supports drag drop and simple type checking.How would the python backend integrate with the UI.
I'm relatively new to AS3. There's one thing that I don't quite understand about Sprites. I'm making a tile based game, and all the tile graphics for a level are inside one movie clip in each frame. Would I be able to go about creating multiple sprites based on the frames in said movieclip's timeline I would I have to go through and make a separate library graphic for each.
I want to use RTMP based HTTP DVR functionality and HLS based IOS functionality, So I need to know how to MPP from my existing DVR app to the livepkgr app so that the stream being recorded at the DVR app can be used by the Flash and Stream MPP over to livepkgr app and can be used by the IOS HLS.
I have started to put together a flash piece. When I preview it, it displays as it should, however if I export the movie and then view the swf it doesn't display the animations from within one of the folders. I have made sure that the layers aren't hidden.
I'm trying to solve this problem since 1 week ago. But still no luck. I'm using flash cs4. I have a prealoder which is done on action script 3. but the problem is when I added my swf movie it becomes just a plain graphic. All buttons converting in to graphic. I imported swf in to library first and drag and drop the swf movie from there to stage.