Flash :: Using PixelBender To Double The Size Of A Bitmap?
May 17, 2010
I have a performance question about pixel bender. I want to enlarge many BitmapData (double their size into new BitmapData). I was doing this with as3, but wanted to use pixel bender to get better performance. On my machine, I get better performance out of pixel bender demonstrations then as3.
To my surprise (or bad coding / understanding), I am getting much worse performance out of pixel bender -- 2 seconds vs 1/2 second! I expected to get at least the same performance as as3.
I got the straightforward pixel bender code here (and it is included below for easy reference).
package
{
import flash.display.BitmapData;
import flash.display.Shader;
[Code].....
View 2 Replies
Similar Posts:
Feb 17, 2012
In pure AS3, I have a pixelbender and a large bitmap. The pixelbender is configurable with a distance parameter to affect only a small area of the bitmap. The problem is that the pixelbender is executing over the whole bitmap. What would be the best way to update only the effected region of the bitmap? Given this config:
[Code]...
View 1 Replies
Oct 27, 2009
I'm trying to make a web banner and I want it to double in size once it's rolled over. An example of this I've found is GC watch banner on the menshealth.co.uk website (its the long ad on the far right of the screen, keep refreshing if it doesnt come up straight away).
how to do this as dimensions of the banner which are selected at the begin of making the flash doc are what changes.
View 0 Replies
Jan 25, 2008
i have a movie clip, but the size might be different on certain functions (probably not using correct terms) but you can probably understand.so the size of the movieclip is not the same all the time, but i need to double its size with actionscript. I have no idea where to start but i have a idea this would work.Make a function to get the CURRENT size of the movie clip. Then make a function to multiply that number by 2, then make a function to set the movieclip to that.also i want to be able to use this with easyTween or one of those tweener programs.
View 2 Replies
Mar 26, 2011
How to minimize the file size of a bitmap in flash/actionscript.
View 1 Replies
Sep 27, 2011
I am using the floodfill method to colour-in sections of a bitmap image. That part is easy enough but the issue comes in with the way I am adding an effect to the colour fill routine.
To add the effect, first a copy of the bitmap data is created and floodfill is used on that instead of the original bitmap. Then the bitmapdata.compare method is used to set the alpha value of everything apart from the filled-in section to 0 and the result is saved in another bitmapdata. After that, a 1 px radius circle sprite is added to the stage and is being tweened to the image dimensions and its mask is set to the sprite which contains the result of the compare operation.
This works perfectly except for the fact that the fill sprite has to be tweened to the complete image dimensions irrespective of how small the area is being coloured-in since I am not able to find a way to get the dimensions of the fill area. I am doing an bitmap image update at the end of the tween and I have to disable user interaction till the tween is complete to avoid the errors which come in if another fill-in operation is started before the base image has been updated. If I could somehow get the dimensions of the fill area then the time during which I have to disable the user interaction will go down considerably.
View 3 Replies
Jun 2, 2011
[url]... in first site after loading complete there is a transition that bending all page.i saw this effect before some other sites but i cant find any example.i am sure it is built with pixelbender.
View 1 Replies
Mar 23, 2012
How to apply multiple filters in Adobe Pixelbender in Flash (=limited version)?
For example 3 different kinds of video displacement effects (1 displacement on the left, one on the right and one the top).I know, it possible to just copy paste the code multiple times, but this wouldn't be very elegant.
View 1 Replies
Feb 23, 2011
I make use of a bitmap picture, size 1920 x 1080, as my stage background. That image never moves ... well I may add mask to it later on, I'm not sure yet.
Nonetheless, since it is static, is it a good idea to cache it as bitmap? is it only for vector artworks?
View 1 Replies
Jan 21, 2011
What is the best way to hide specific (interpolated) color ranges? For example, I have a gradient that goes from blue > cyan > yellow > red. What I need is to hide blue > cyan, yellow > red but leave the cyan > yellow.
var rangeA:Object = {min:0x0000FF, max:0x00FFFF} //hide
var rangeB:Object = {min:0x00FFFF, max:0xFFFF00}; //show
var rangeC:Object = {min:0xFFFF00, max:0xFF0000}; //hide
It is ok to apply different filter for each range.
View 1 Replies
Oct 7, 2010
i need to mix two images one photo and a placeholder. The idea is that we see the placeholder except where the palceholder has a particular color, in that case the user sees the photo. Something like chroma key.For this purpose i wrote a Pixel Bender shader that acts as a BlendMode. If the background is in the right color output the pixel image otherwhise output the pixel from the placeholder.
<languageVersion : 1.0;>
kernel Crossfade
< namespace : "mynamesp";
vendor : "Artbits snc";
[code]....
Everything works fine except for the fact that i had multiple placeholder, one over the other and my shader don't check the color of its own placeholder but the color of everything under the photo.Is there a way to force BlendMode to consider only a layer or a specific background color ?Is there a smarter way to obtain the same result ?
View 1 Replies
Jul 13, 2010
I've written a class that iterates through all the frames of a movie clip and draws each one to a different bitmap. When I'm done, I should be able to iterate through the bitmaps and play them like a flipbook animation.If I draw all the clips to the same size bitmapdata, then everything looks great. But this is wasteful because now a lot of the bitmapdata's are bigger than they need to be (takes up more memory), and also causes problems because the hit tests don't look right.
So next I try to crop all the bitmapdata to be the smallest possible sizes. However, when I do this, there are subtle differences in the way the images look - the edges might look slightly darker in one frame than in another. When I line up all the images and play them back to back, it no longer looks the same way it originally did.I have no idea why the images look different, and have no idea how to work around this problem, I have tried many different approaches. I have tried using BitmapData.draw(), BitmapData:copyPixels(), and manually using BitmapData:SetPixel(), and all end up with the same result
View 5 Replies
Aug 7, 2009
Use the flash CS4 tool's on a bitmap image after tracing the bitmap image and applying my settings?
View 10 Replies
Apr 24, 2009
Why do I see a double variable initialized to some value like 21.4 as 21.399999618530273? Is JavaScript's math broken? many, many other questions, for every language and platform, all with the same answer.
trace( ">> " + (399.6-(Math.floor(399.6))) );
prints out
>> 0.6000000000000227
View 2 Replies
Dec 4, 2009
How do I escape double quote " in XML when I load it in Flash? I use createTextField and I have created a Font in the Library. I use TextFormat to embed the font. When just use " in my XML file, it will show " in my flashmovie, why is that?
I tried " and " ... doesn't work?
Code:
<gerecht>
<nummer>82</nummer>
<naam>Gerecht "Naam" </naam>
[Code]....
View 1 Replies
Oct 1, 2009
I've made a project which uses double slashes ("\") on paths for source files like sounds,xml etc. It works fine on a CD but I want to uploaded on a server.The swf files which use those paths work fine on IE but not on firefox,safari,opera etc. I red that the problem is the slashes that I used in paths. They should be backslashes like "/Sounds/somesound.mp3" and not "\Sounds\somesound.mp3".I found that firefox translates "\Sounds\somesound.mp3" to a single file named "Soundssomesound.mp3", the directory "Sounds" now turns to a part of the filename.
If I place and rename the source files like "Soundssomesound.mp3" on the server in the same directory with the swf file (not in "Sounds" directory) this way works on firefox, but does not work on IE. I have to place the source files in both ways to work in all browsers but that's not good...I know that the best thing that I can do is to change the path syntax in fla's but the project is to big.
View 1 Replies
Mar 5, 2012
I know already that Double click event is not available for iOS(iPhone, iPad).But for example google map or other drawing applications have function of double click to scale up.
I have found sample program at Web. But I cannot found the ActionScript3 program to implement double lick event for Air for iOS.
View 2 Replies
Apr 29, 2011
look at this screenshots:
And this is how It looks over 97% of times I load the swf:
Points to notice:
- running on Windows 7 64bit
- FP 10.2.154
- Flash Player embedded on standalone application (didn't seen that problem in browser yet)
What we are doing in this flash? We have just a loop for every character in our Array it looks if a TextField with this character .width is larger than boundaries. Yes? Create new line. No. Continue writing in same line.
As we can see on the buggy screen the width sometimes appear to be doubled - whitch generally destroys our layout.
Guilty code:
ActionScript Code:
if (elementsArray[int(i2 - 1)].width + elementsArray[i2].width + elementsArray[int(i2 - 1)].x + __wordsMarginLeft > 800){
nextRow++;
[Code].....
View 0 Replies
Jul 21, 2005
how can I implement the functionality of double tap detecting in Flash MX 2004. I searched over the internet (put "implement double tap Flash" in google search box) but haven't got any luck.
View 2 Replies
Jul 28, 2011
I have a MovieClip called HolderMc and a ClickBtn inside HolderMc, here i want to DoubleClick the HolderMc and also i need to click the ClickBtn inside the HolderMc, here i have used MouseChildren as false to HolderMc to click the button, and doubleClick as enabled to HolderMc but no use, and also i have used to get the MovieClips name using target.currentTarget even though i am not able to use the doubleclick option alone.
View 1 Replies
Aug 6, 2008
I've recently noticed that when Flash goes into full-screen mode, triggered by a double-click, Firefox (3.0.1) takes the focus - if the user clicks anywhere on the screen outside the area of the original (non-fullscreen) Flash player area, Flash returns to non full-screen mode. Also, the cursor changes to reflect whatever is on the browser page beneath the fullscreen Flash app - i.e. it changes to a hand in areas where there is a link on the HTML page, or to a bar in areas where there is a textbox.
View 3 Replies
Mar 18, 2010
I've got a class (which extends MovieClip) that loads in an external SWF (made in pdf2swf). That is added to another class which has declared doubleClickEnabled = true and I'm listening for DOUBLE_CLICK events.Problem is when the SWF is loaded my code picks up no DOUBLE_CLICK events, only CLICK events. I've tried it without adding the SWF to the stage and it does pick up DOUBLE_CLICK events.
class ParentClass{
...
public function ParentClass(){
...
mcToLoadSWF = new MovieClip();
[code]...
I've also tried adding the event listener to the mcToLoadSWF as well. No dice.
View 1 Replies
Jan 25, 2011
What data type do I use in flex (flash builder) to create a "double" or "float" data type. I need the numbers after a decimal point. (i.e. prices)
View 2 Replies
Mar 3, 2011
I'm running the latest build (I'm pretty sure it's 1.0) on Ubuntu and I am calling a function on an amfphp service on another server. Everything seems to be in order, but I am getting a strange return value using the following code:
String url = "http://path.to.our.server/gateway.php";
RemotingClient client = new RemotingClient(url);
Object[] args = new Object[]{"Hello world!"};
Object result =client.invokeMethod("service.manager.say", args);
if(debug) System.out.println("return from server: "+result.toString());
View 1 Replies
Apr 28, 2010
So ive been asked to build a page for a real state company and the guy told me it should be similar to these [URL] Ive been trying a couple of weeks so far, but i dont seem to find a way to do somthing similar, i mean, i want to have the welcome screen as those two:
- the gradient background
- flash occupies whole screen no matter what size it is
- gradient expands sideways infinately
- no matter what height my explorer window is, gradient is always in the same position relative to top, and if i keep expanding downwards the background keeps last colour of the gradient.
- the brand logo looks as if it had top, left and right anchors, and it also limitates the minimum width of the explorer window
i though of addind a 3000 x 3000px square with the gradient and centering it, but i know there has to be a professional way of achieving that.
View 1 Replies
Jun 8, 2010
I am trying to build a flash that auto-adjust its size to the browser window size, while leaving the content of the flash itself top-centered in the screen.I have found this solution [URL].. on How to keep centered stuff in this exact case so i am pretty confident i will be able to adjust that script to do what i want.
Now my problem is that if i put my content inside the movie-clip (centerrectangle) with all the animation require, link and other stuff, the movieclip (center rectangle ) never have the exact same center, thus making the script go wild trying to always adjust the location to the variable size of the movie clip.
[Code]...
View 9 Replies
Jun 8, 2010
I am trying to build a flash that auto-adjust its size to the browser window size, while leaving the content of the flash itself top-centered in the screen.
I have found this solution [url].. on How to keep centered stuff in this exact case so i am pretty confident i will be able to adjust that script to do what i want.
Now my problem is that if i put my content inside the movie-clip (centerrectangle) with all the animation require, link and other stuff, the movieclip (center rectangle ) never have the exact same center, thus making the script go wild trying to always adjust the location to the variable size of the movie clip...
I need it to stay exactly at the same position whatever the size of the movie-clip. [code]...
View 0 Replies
Sep 15, 2011
I would like to know how to make flash size (width and height) full size in the browser? the real size of flash is w:955px h:600px I tried to make w:100% and h:100%, it makes pictures pixelate.
View 6 Replies
Mar 3, 2011
I want to create a panel (or any other component) inside a component that has a 5 pixel border on all sides, but scales fully when the window is resized. I know I can set width to "100%" to make it resize, but that gives me no borders. If I put it to "95%",I have borders, but they scale annoyingly. Also, that only works for borders on the right or lower bounds, and not to the left or upper sides.Is there a convenient way to do this without having to write tons of resize-code (in which case I will not bother and just accept bad rescale behaviour, as it is for a private pet project).
EDIT: I know that I can just overwrite the display handling and set the positions manually every frame. I wondered if there is a cheap way to do it in the mxml-structure, along these lines:
<mx:Panel>
width="100%" height="100%"
</mx:Panel>
Coming from C++ and Java, I am intrigued by the option of setting something to "95%" and let the library work out the details, instead of having to write many lines of code, just so my text-area always keeps a 5 pixel distance from the border, but scales with window width.If there is no easier way to do it than figuring out pixel sizes by hand and setting the coordinates.
View 1 Replies
May 18, 2011
i try to low my flash project size,make it as low as possible.okise here it the my file size before, 50kb and export file size is 8kb
so i know i need to covert some of my pictures and mp3 size,i have covert 2 mp3 file size ,one is 6mb and droped 3.7 ,other one is 7mb and droped to 4.2. so i save my file again, and my flash project file size droped to 18kb and export file is 10kb ??i dont really understand how flash calculate the size.
View 1 Replies