ActionScript 3.0 :: Iterative Displacement Mapping?

Jan 22, 2010

The 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]......

View 0 Replies


Similar Posts:


ActionScript 3.0 :: Apply Displacement Mapping To Every Frame?

Oct 6, 2011

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?

View 1 Replies

ActionScript 3.0 :: Iterative Image Loading Routine?

Jan 11, 2011

I'm working on an image gallery project that uses 45 jpgs that need to be displayed all at about the same time (like a splash of photos).Everything works except for inconsistent display of the loaded images (it works consistently on localhost but not on the remote server).All of the images successfully preload into the cache, but when the routine that displays them starts, it sometimes fails to complete.I haven't been able to find anything unusual in the display code that would account for the failure.So I thought I would try to add a work-around (maybe a Timer) that would repeatedly run the display routine until it completed successfully (sounds sloppy and hokey, but I'm at my wits end and way behind schedule).

View 2 Replies

ActionScript 3.0 :: Random Iterative Changes To A Number While Keeping It To A Baseline?

Feb 13, 2011

Here is a very difficult math problem I was unable to solve, its an excellent opportunity for someone like newblack or lordofduct or some local genius to demonstrate their superior math skills to the community: I want to change a base Number over many updates/iterations, by a random % of this Number in a random direction within a pre-defined threshold WHILE, keeping the averages across the iterations the same as the original base Number. here is it in pseudo-code:

[CODE]....

Some restrictions: Ideally this would be a pure 100% straight math solution without any kind of Weighting, tricks or additional variables. (IE a weighting would be if the number deviated from an additional baseline or hit some kind of limit, then we started artificially increasing it back to that baseline. )

View 1 Replies

ActionScript 2.0 :: Make A Iterative Function That Just Does A _width++ Every Second/24fps

May 23, 2005

I'm creating a small docu where you have some control functions like you have in Windows Media Player or Winamp or...

So my problem is that I don't know how I can make the statusbar (a bar where you can see how far the movie is).

I just have a bar that begins with a width of 0 and I want to make a itterative function that just does a _width++ every second/24fps

The question: Is there a function, like the Thread.sleep() method in Java, that let's you wait for a certain amount of milliseconds? Or do I have to put on every frame a call for my ++ function.

View 2 Replies

ActionScript 2.0 :: Displacement Map For Perspective

Jul 16, 2007

I've tried in vein to understand displacement maps; I can find nothing on "The Internet" that teaches me what I need to learn. Now I'm looking to all you smart-types to solve my problem for me! All I want to is take an image (a rectangle) and make it look like it's going off into the distance (trapezoid-like), getting smaller from left to right. This doesn't even need to animate, I just need two states: straight-on and trapezoid-like -- think iTunes album art browser minus the bells & whistles. I know this can be accomplished with a displacement map, but I know not how to get 'er done.

View 7 Replies

ActionScript 3.0 :: Find Position Of Mc After Displacement?

Apr 28, 2011

I have an mc that is displaced. Within this movie clip is a text box that moves about but it is being displaced along with the rest of the mc. Is there anyway to find a position inside the displaced mc and translate that to root coordinates.

View 0 Replies

ActionScript 3.0 :: Magnify With Displacement Map Filter?

Apr 10, 2009

I found this cool class

[URL]

View 2 Replies

IDE :: Unable To Create A Displacement Effect?

Aug 18, 2009

I am trying create a displacement effect using this code, but i am getting these error, not able to solve it!import flash.display.BitmapData;

var damper = new flash.display.BitmapData(128, 128, false, 128);
var result = new flash.display.BitmapData(128, 128, false, 128);
var result2 = new flash.display.BitmapData(256, 256, false, 128);

[code].....

View 2 Replies

ActionScript 3.0 :: How To Use Displacement Filter With JPEG Image

Mar 9, 2010

I'm trying to use the displacement filter with a jpeg image instead of a gradient map. My images are:
1) Background: men2.jpg
2) Map image: men2BN.jpg (same as above, but grayscale and blurred)
3) The image to be displaced: star5_mc

View 1 Replies

Actionscript 3 :: Syncing Overlay To Displacement Map Filter?

Dec 13, 2011

I'm using a DisplacementMapFilter to created a globe-like effect on a flat map. My problem is, I also want to sync some labels to this map. I have the x/y coordinates for their locations on the flat map, but I need to map them to the now-displaced image.

I would like to be able to do this using the BitmapData that contains the displacement map, so that changing the Bitmap changes both the displacement filter and the label locations. Also, the labels will not be static, and accuracy is fairly important.

View 1 Replies

Flash :: Why Is Perlinnoise Displacement Filter Not Updating

Jan 17, 2012

i got this script from this tutorial. I tried to convert it from AS2 to AS3, but it seems like the displacement filter is only applied once for some reason. After that, the bitmap isn't updated.[code]

View 2 Replies

ActionScript 2.0 :: Make Displacement Map For Perspective Correction?

Jan 20, 2006

I am trying to make displacement map for perspective correction, but so far my math goes wrong. Here's what I've got; as you see, some lines are not preserved.

View 5 Replies

ActionScript 2.0 :: Displacement Applied To Shape Tween?

Jan 12, 2007

I had a quick question about displacement... I just have a circle that changes shape and size and I wondered if there was a way to apply some kind of displacement filter to it, so that ANYTHING under this circle movieclip is distorted by the displacement. (think of a magnifying glass).

View 1 Replies

ActionScript 2.0 :: Make Text Appear Wavy Using Displacement Maps?

Apr 17, 2007

i am trying to make my text appear wavy using displacement maps. i've attached the file. Please check it out and tell me how to do the following three things with it:

i need to ensure that the text doesnt get cut at the top when it goes out of bounds.i need to create a gradient with more variations. that is, right now its going from 0x000080 to 0x0000FF to 0x000080. so i need to make it go like: 0x000080 - 0x0000FF - 0x000080 - 0x0000FF - 0x000080.i need to be able to vary the size of the gradient box so that it perfectly fits the movieclip that i apply it tohow do i do it? could anyone please make those changes and attach the file back? or just tell me how to do it?

View 3 Replies

ActionScript 3.0 :: Squares In Random Midpoint Displacement Algorithm

Sep 3, 2011

I'm trying to make a plasma fractal (as a self-challenge, I made the sierpinski triangle, Koch snowflake, Mandelbrot set, Julia set, and dragon fractal. If you want the code, PM/reply.) Here's the code of frame 1:

[Code]....

View 2 Replies

Flash :: Prevent Text Displacement For Some Foreign Language Fonts?

Jan 3, 2011

I have a multilingual project (currently 13 languages), which uses many different font variations of "Helvetica Neue", mostly bold, condensed and regular cuts from the LinoType Pro font set ( which includes western european characters) and the same for cyrillic. We will probably add chinese and japanese variations in the future. I have set up the project to use different CSS stylesheets and separately load the fonts for each version, depending on which language the user selects, so I can have different line heights, kerning and/or font sizes to make everything keep the original look, even if the fonts look nothing alike.

All of this works well, except for one problem: For some reason, all cyrillic letters seem to be displaced. They appear 2-3 pixels below the correct base line, and actually protrude across the textfield's bottom border, even when the field is set to autosize. When I use textfield.getCharBoundaries(), all values seem to be correct, even though they obviously aren't rendered correctly.To make everything look neat, I could of course manually move all problematic textfields up or down according to language and font size, but I was wondering if there was some way to prevent or at least detect this kind of displacement in order to automatically handle the adjustments - the Flash Player should have some sort of information on how things are rendered, shouldn't i

View 7 Replies

ActionScript 3.0 :: Make A Cool Water Effect Using Bitmap Data And A Displacement Filter?

Jun 9, 2009

I found a tutorial on how to make a cool water effect in as3 using bitmap data and a displacement filter. It works great but it is very heavy on the computer.

here is my code

Code:
var bmd:BitmapData = new BitmapData(700, 398);
var dmf:DisplacementMapFilter = new DisplacementMapFilter(bmd, new Point(0,0), 1, 2, 10, 30);
var p1:Point = new Point(0, 0);
var p2:Point = new Point(0, 0);

[code]....

View 2 Replies

AS2 :: IDE - XML Navigation / Mapping

Feb 3, 2009

[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]...

View 1 Replies

Mapping PHP And Flex Objects?

Jun 23, 2009

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]...

View 2 Replies

C# :: Mapping System In Web Application?

Jun 6, 2011

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?

View 1 Replies

ActionScript 3.0 :: Mapping A Xml To A Value Object(VO)

Jul 21, 2010

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.

View 0 Replies

ActionScript 3.0 :: Which Is The Best Flash Mapping Api

Aug 26, 2010

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 Replies

ActionScript 3.0 :: Variable To String Mapping?

Oct 13, 2009

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.

View 3 Replies

PHP :: Mapping Login Sessions To Users

Jun 26, 2009

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 Replies

Flex :: AMF Class Mapping Not Working?

Oct 28, 2011

I 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].....

View 2 Replies

ActionScript 3.0 :: AMF Class Mapping Of Getters Only

Sep 29, 2009

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 Replies

ActionScript 3.0 :: Mapping Classes With Fluorinefx

Jan 17, 2011

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 Replies

ActionScript 3.0 :: Image Mapping In Flash?

Sep 12, 2011

if it is poosible image mapping in flash like in html <maparea>? is yes means how to do that in flash?

View 2 Replies

ActionScript 2.0 :: Mapping The Root To A Rectangle?

Sep 8, 2009

I 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

View 7 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved