ActionScript 3.0 :: Image Mapping In Flash?
Sep 12, 2011if it is poosible image mapping in flash like in html <maparea>? is yes means how to do that in flash?
View 2 Repliesif it is poosible image mapping in flash like in html <maparea>? is yes means how to do that in flash?
View 2 RepliesI would like to create a dynamic 3 layer image that can have any of the 3 layers changed. i was thinking of doing this with alpha mapping where I have a back, middle, and front layer each defined by an alpha map. So if the style or shape of these changed I just render the texture with a new alpha map to define what portion actually takes the texture. So for each of the 3 layers there is a type(defines the shape), the texture which is applied to the shape, and an alpha map that is used to specify how the shape takes the image.
Imagine a fruit basket that can have the fruit switched out or the basket, and any combination of textures applied. You could potentially see the inside of the basket which may have a different texture than the outside. The fruit would all be one image that would then fit into the basket, and finally the basket would render. Then if you swap the color of the basket but keep the same model it would update, and you could then swap the model of the basket and keep the same color. But i'd want to do it where I have 1 texture that can fit over all the baskets but is just chopped off using alpha mapping.
I'm coding in actionscript 3 - the functionality is: large image loaded at runtime. The bitmapData is stored and a smaller version is created to display on the available screen area (I may end up just scaling the large image since it is in memory anyway).The user can create a rectangle hotspot on the smaller image (the functionality will be more complex: multiple rects with transparency: example a donut shape with hole, etc)
3 When the user clicks on the hotspot, the rect of the hotspot is mapped to the larger image and a new bitmap "callout" is created, using the larger bitmap data. The reason for this is so the "callout" will be better quality than just scaling up the area of the hotspot.The image below shows where I am at so far- the blue rect is the clicked hotspot. In the upper left is the "callout" - copied from the larger image. I have the aspect ratio right but I am not mapping to the larger image correctly.[code].....
which is the best flash mapping api (with good support and reasonable price) to use in my flash project. I have used UMapper �s Umap before but it�s too expensive for a commercial license and the support was not that good.
View 0 RepliesI've done a bit of web design work,and have used Flash a little,so familiar with the principles of the timeline, keyframing, and twining etc.The sort of thing we might be looking to produce would be similar to this site below :[url].....how technically challenging that might get,or is it the sort of thing that although looks complex, might be relatively easy to achieve armed with a reasonable understanding of the Flash principles that are driving it.
View 10 RepliesI'm looking to create a Flash Map with multiple zoom levels. Ideally what I'd like is to be able to click onto a 'state' area, and then have the map zoom down to a sub-area (which can then either have a link or zoom down to yet another sub-area). Ideally I would like to be able to define sub-areas recursively (e.g. state area, region area, town area etc.) on an infinite level, but 2 levels should suffice. I found several solutions on Flash Den, however they can only handle 1 level. Does anyone know of any Flex/Flash libraries or frameworks which are capable of doing this? Alternately, does anyone know if this would be possible with Google Maps/KML? I already have vector outlines of the areas I would like to use in Flash.
View 2 RepliesI'm setting up some auto build scripts with ant and jsfl for use in Flash CS4. I have a few files that have some missing fonts. For these I just want to have the default mapping selected since the text content in question isn't displayed. I think CS5 may have an option to not display the mapping dialog, but CS4 doesn't. Anyone know if there's a jsfl method to targert this window and just select 'OK'?
View 1 Repliesdifference between key code and character code. For example, the number 1 (one) and the character ! (bang) both have the same key code but different character codes. Likewise, the number 7 from the row of numbers and the number 7 from the numpad have different key codes but the same character codes.
I'm programming a music rhythm game in Adobe Flex and would like to bind keyboard keys. This isn't a problem, but I certainly would have a problem, say, setting the default keys to A, S, D, and F and telling the user that this is the case.If you take a look at the documentation for flash.ui.Keyboard, you'll see that there are constants for keyboard keys to key codes. However, these are only available in Adobe AIR and not the browser. This makes sense since not all operating systems and keyboards are alike (or present!), so key codes can vary.
So, how can I assign default keys that have meaning instead of picking key codes and praying?My only sane thought is to store the character codes for the key bindings and then provide an character code to String mapping so I can tell the user what to press. However, my gut tells me that this will break in subtle or not-so-subtle ways. Like CAPSLOCK.
Every time I open a CS4 Flasf FLA file I am prompted with the Font Mapping dialog box.Even though I select the substitute fonts, every time it asks for it -- even after SAVE ASing the file under another name.
View 1 RepliesIs there a way to "Map" the windows F-keys to a flash button? like F2 or F12?
View 5 Replies[Code]...
Etiam nisi ligula, sodales non, pharetra eget, tempus ac, purus. Vivamus sagittis mollis risus. Proin dictum libero a elit. Curabitur feugiat, metus sit amet convallis imperdiet, est tortor volutpat nulla, eget mollis diam nisi vel lacus. In diam ligula, euismod eu, dapibus non, fermentum quis, urna. In consequat pede eget erat. Quisque luctus felis. Mauris dignissim. Fusce pulvinar, dolor sit amet porttitor egestas, quam massa tristique pede, nec porttitor diam odio in magna. Mauris congue mauris eu lectus. Duis eu felis ut ligula consectetur blandit.
[Code]...
I am using ZendAMF for remoting.
<?php
error_reporting(E_ALL | E_STRICT); //error reporting, not needed
require_once "Zend/Amf/Server.php"; //the zendAMF server
require_once "process.php"; //our test class
[Code]...
I'm building image processing or mapping system kinda like google map except we have our own HD images so i'm not sure what is the best way to do this in .NET here is what im trying to do Mapping web application build in .NET i've High resolution images , the user first load the selected area a full scaled image should be loaded 100% (original image) then he Zoom to the area he want, then he can move around this area almost like google map
1.user select area - full scaled image loaded
2.user zoom to random area - (i will receive some values for X, Y, etc.. in query string then i will extract these values and zoom/return the image based on these values)
So i'm not sure what is the ideal solution for this is it just zoom/re-size image based on the vales received from the user, or its more complicated than that?
i have an xml that i want to cast to a value object using the schema regitry class in flex..
so, i did sth like this :
Code:
var qname:QName = new QName(schema.targetNamespace.uri, "parameterTable");
schemaTypeRegistry.registerClass(qname, ParameterTable);
[Code]....
where the value is the xml value requested from the server using http method, i get a null value when i dbug the param content.
I'm new to flash and working to embed the flash player in a .NET application. It's going "well" for the definition of "well" that adding the COM control and getting it to play a movie was easy and took about 3 minutes.What's not going well is that I cannot find documentation on the variable to string mapping used the SetParameter variable parameter. To coordinate between the apps, I want to be able to say: "flashPlayer.SetVariable("flash_variable", "value_to_set"). Obviously SetVariable does this. What's not obvious is how "flash_variable" is constructed.
For example, in the actionscript for a button called "OneBigButton" I have the following code:
OneBigButton.addEventListener( MouseEvent.CLICK, onClick );var testSetValue = "value";function onClick(evt:MouseEvent):void { trace("got the click " + testSetValue); outputText.text = testSetValue;}
When I try this:
flashPlayer.SetVariable( "testSetValue", "foo" );
The results do not get set in testSetValue.
I'd love a pointer to the documentation on how namespaces, class instances, etc affect the string construction used in SetVariable and GetVariable as I can't find it anywhere.
When I login a new session is generated. How can I later know for which login the session was generated? I am getting the session value, but how do I know which user the session is for and redirect him to that page?
View 1 RepliesI am building an application using Flex 4.5 and Zend_AMF as my AMF endpoint.I would like to map a class called CRequest in PHP to a class called Request in Flex.This is my php class:
<?php
namespace appweb;
class CRequest{
[code].....
Dear goodness, am I the only person on the web trying to send a VO object from Flash to AMF where the properties are read only/getters? If I add a setter that does nothing but throws an Error it works. If no setting is present in Flash, it fails. Is there a way to send objects to AMF that have getters and not setters?
View 3 RepliesThe way my test works, I draw a path on a displacement map using the mouse, and this displacement is applied to the same image every frame (i.e., the displaced image of the last frame is displaced again). Colors are flowing along the path as they should, with one problem: the displaced pixels always turn transparent after a few seconds.At first I thought this had something to do with the DisplacementMapFilterMode, so I tried setting it to "COLOR" using an opaque bright blue, while the stage behind my warped image is a highlighter green. Nope, the FilterMode color is only used for pixels sampled off the image, while my interior pixels were turning completely transparent of their own accord. I tried removing the alpha channel from my distorted image, and then the pixels would just turn black instead of transparent.
So, now I'm stumped. I've viewed my displacement map to make sure it looks right, I've tried setting the displacement scale to low and high numbers, and I've checked the channel assignments, all to no avail. Here's my code, and I've attached the .fla as well, so you can see what's happening. If you run the file, just make your mouse is located in the center of the frame before it starts, or you'll end up dragging the blue fill color in from off the screen.
Code:
// "spider" is the name of a named movie clip instance containing
// an image on the stage, having the same dimensions as the stage
[code]......
I'm still having trouble mapping my as3 class to a server side class in C#. I've been through several tutorials and the official documentation butI must be doing somethiing wrong. I found that I have to use an attribute in my as3 class: [RemoteClass(alias = "FlashRemotingExample.WorkerCS")] But that is still not working.
View 1 RepliesI have four points that make up a rectangle (note: the four points have the same aspect ratio as the window). The rectangle itself can be moved and scaled (again, keeps it's aspect ratio).
I want to map the root's positions (_x, _y, _xscale, _yscale) so that the box is always the frame of the window. This should be easy enough, except for the fact that the root's "hotspot" (position which it scales from) is always 0,0.
NOTE: I use four points to make the rectangle: xLeft, yTop and xRight, yBottom
come up with some code to change the root's _x, _y, _xscale, and _yscale to fit this rectangle
I am have about 80% of a my website built and buttons all mapping where they should go, along with a number of XML driven BANNER ROTATORS/ACCORDIAN MENUS...ect
This site requires users to be signed in, which is done through a site previous to mine. Once they log in, they can click a button which then allows them access to my site.
My site has three "user levels" or "autentication levels" as we have "Managers", "Supervisors" and "Staff" levels.
For testing purposes, we have placed the below actionscript in the first frame of my project. The purpose of this actionscipt is to reference the "authentication level" that the user is using (as they will have already signed in so we are simply looking to obtain their "auth level").
[Code]...
I'm using this tutorial to create buttons with displacement mapping for my simple game menu. These buttons need to be clickable; i.e. once you click on them you move to a different frame. Everything works fine on the first frame, but when I click to the next frame the displacement map disappears and will not apply to the buttons on that frame. Plus, when I click my "back" button to return to Frame 1, the displacement effect has disappeared entirely.
This is the code which is in the base "Game" class, which links to the main Flash file.
package
{
import flash.display.MovieClip;
import flash.events.MouseEvent;
[Code]....
It calls the JitteryButton class, another external class, which I don't think is the problem, but I can post if if necessary. It's very similar to the one in the tutorial. Also, I need to add different buttons on other frames of the menu, but if I call them in this external class, it doesn't recognise them.
can anyone spot why this might stop working like it does? I was thinking about instead of using "Game" as an external Actionscript file, I could actually write it into Flash as Actionscript on a layer - would this work?
If I've got a bunch of plain old Objects, what's the best way to map them to a bunch of Classes?For example, if I use an HTTPService to pull in some JSON, then deserialize it, I'll have a bunch of objects which look like:
{ type: "person",
id: 42,
name: "David" }
And I want to turn them into instances of a Person class:
class Person {
id:int;
name:String;
}
(also to be considered: how about some standard way of dealing with relationships between objects? For example, if the Person had an additional "spouse" field:
{ type: "person", spouse: 61, ... } // Where 61 is the ID of the spouse
)
I'm working on a website using :
- Flex 3.4
- AMFPHP 1.9b
- Propel 1.3
- PHP/MySQL
I'll try to focus on the problem which takes place in a whole system.To sum up, I have 2 entities (MySQL) :
create table AAA
(
id_AAA int not null auto_increment,
id_BBB int,
[code]....
I retrieve all my BBB, they are mapped from PHP classes (generated by Propel) to AS3 classes on the Flex side.But when I create a AAA row in the database.I retrieve all my BBB, and all objects are mapped EXCEPT the BBB whose id corresponds to the foreign key in the inserted AAA row.
if you know anything about how AMFPHP / Propel / Flex are dealing with Foreign Keys and why class mapping is failing right here.The weird thing is that it seems to happen only for this specific case ...
I have an issue when consuming a web service from a Flex app. In the backend I have a hierarchy, let's say I have an abstract class Fruit, and 2 implementations: Apple and Orange. Fruit has a property, name, Apple has a property color, and Orange has a property radius. Then, I have a service wich returns a collection of Fruit. When I consume it from Flex, this collection returns objects wich type are Fruit, with its name property; but I lose all the properties for the implementation classes (color nor radius). So, the question is, does Flex support inheritance mapping when using web services? If not, is there any workarround?
View 1 Repliesi am developing an application where client can add his photos to appear on a sphere or ball or coffee cup and able to save them and give it for printing using flex. like itasveer.com site. i tried to use away3D but if the image is small it is stretched and added to sphere. i dont want it to strech instead the original image shud appear on the sphere. if it is added to cup it shud cover only the circular part it shud not add this to top and bottom.
View 1 RepliesI have 2 java classes that are the same (imagine the getters and setters):
class ScheduledEvent {
private String eventName;
private List<eventValues> values; [code]....
Now there is a reason why there are two classes that are the same.When something is "scheduled", I should get the ScheduleEvent object and when an event is started, I should get the StartEvent object.And depending on the object I get back, I do different things.My problem is that, on the backend, it will send me the ScheduleEvent object, but once it got to the flex side (via BlazeDS), it becomes a StartEvent....
At first, I thought it's because these two events have exactly the same variables, so I tried changing ScheduledEvent by adding a dummy variable (String foobar) but that didn't seem to make a difference.
EDIT: I'm using BlazeDS messaging system.That's why I am not using "one java method call to one responder" approach. So, in the message.body, I should be getting ScheduledEvent but I keep receiving StartEvent. I'm wondering if it's because the two objects have the same property and BlazeDS doesn't know how to map them correctly... I even put a break point in the java service layer, to make sure that the appropriate object is being sent back and it is... But by the time BlazeDS serializes and deserializes it to the flex side, it is now a StartEvent.
How would I convert a point in the longitude & latitude to x and y (pixels) on a mercator-projected map, assuming I know the exact dimensions of the map (by longitude/latitude, and pixels)?
*Someone* has had to have created a class that handles such relatively basic and essential (not for me, unfortunately!) math; remapping a point, measuring the distances, etc.
Any tips? I've read some formulas (including the one here: [URL], but I admit that my math is quite poor at this level, and I've got no idea how to convert such a thing to AS, nor if there are other considerations I'm missing.
I'm just coming back to toying with 3d in flash. All my previous efforts were made in AS2 so drawTriangles() is liquid-awesome to me... Still, am I right in thinking that the UV mapping of drawTriangles is only really useful for two-triangle planar evaluations? In other words, there isn't any way to pipe in the UV map data required to skin a whole model - even a simple cube - in one call to drawTriangles, is there?
I got my hopes up when I saw I could draw the whole wireframe of an object in one call, but everything I read suggests the UV coordinates are relative to the vertices, not the indices. So I'm thinking that the UV value for a vertex can't be redefined for triangles sharing vertices as described by the index. Is that right? If so, I guess you could draw the whole thing in a single call if you threw away your index and passed all the unconsolidated vertex information. Seems like an awful waste if that's right.