Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    Flash




Pixel Rebuild



Hi

Iv asked about this a number of times without an answer.

Would someone please goto http://www.gewebdevelopment.co.uk/gl...Test2/Male.swf

Now, click the Small blue trousers so they appear on the character, and then press the save button ( looks like a hard drive ) under the character. Wait for the php to finish loading, and scroll to the bottom of the screen.

See the image we just had from flash... notice the trousers are the wrong colour, any ideas why its doing that?

Also try again with the green shirt, why does it do that to the colours?

If you notice the hash codes output, some of them are 0 which means the getPixel was out of bounds...but i cant see how thats possible... here is the Flash code, then the php code


Code:
on ( press ) {

import flash.display.BitmapData;
import flash.geom.Rectangle;

var cWidth:Number = this.Character._width;
var cHeight:Number = this.Character._height;

// Create the new copy area bitmap
// the same width and height as the character
// white background
var cCopyImage:BitmapData = new BitmapData( cWidth, cHeight, false );

// Draw the character into the new
// bitmap
cCopyImage.draw ( this.Character );

// Create an empty movie clip
// to show the copied image
var CharacterCopy:MovieClip = this.createEmptyMovieClip( "CharacterCopy", this.getNextHighestDepth());

// Attache the bitmpa to the new movie
CharacterCopy.attachBitmap( cCopyImage, this.getNextHighestDepth());

// Loop through the Y pixels
// to gather all data needed
var AllPixels:String = "";

for ( yCount = getProperty ( CharacterCopy, _y ); yCount <= cHeight; yCount++ ) {

for ( xCount = getProperty ( CharacterCopy, _x ); xCount <= cWidth; xCount++ ) {

// Get the pixel we are at
var CurrentPixel = cCopyImage.getPixel ( xCount, yCount ).toString ( 16 );


if ( CurrentPixel != "" ) {

// Add to total
AllPixels += CurrentPixel + ",";

}

}

}


//trace ( AllPixels );

// Send the output to php
//Create the LoadVars object and pass data to PHP script
var output:LoadVars = new LoadVars()
output.img = AllPixels;
output.height = cHeight;
output.width = cWidth;

//output.sendAndLoad("http://www.gewebdevelopment.co.uk/glenelkins/Test2/test.php", output, "POST")
output.send ( "http://www.gewebdevelopment.co.uk/glenelkins/Test2/test.php", "_blank", "POST" );

output.onLoad = function(){

trace(output.allIs);

CharacterCopy.removeMovieClip();

};

}

Code:
<?php
ob_start();
header( "Content-type: image/png" );

$ImageData = explode ( ",", $_POST['img'] );
$ImageWidth = $_POST['width'];
$ImageHeight = $_POST['height'];

// Check we have the GD lib
//if( !function_exists ( "imagecreate" ) ) die ( "Sorry, you need GD library to run this example" );

// Create the image container
$ImageContainer = imagecreatetruecolor ( $ImageWidth ,$ImageHeight );


// Fill the image with white
//imagefill( $ImageContainer, 0, 0, 0xFFFFFF );

foreach ( $ImageData as $var => $value ) {

echo "$var => $value<br>";

}

$C = 0;

for ( $y = 0; $y <= $ImageHeight; $y++ ) {

for ( $x = 0; $x <= $ImageWidth; $x++ ) {

$r = $ImageData[$C][0] . $ImageData[$C][1];
$g = $ImageData[$C][2] . $ImageData[$C][3];
$b = $ImageData[$C][4] . $ImageData[$C][5];


$r = hexdec ( $r );
$g = hexdec ( $g );
$b = hexdec ( $b );

$Color = imagecolorallocate( $ImageContainer, $r, $g, $b );

imagesetpixel ( $ImageContainer , $x , $y, $Color );



$C++;

}

}

//Output image and clean

ImagePNG( $ImageContainer, "test.png", 0, PNG_NO_FILTER );
imagedestroy( $ImageContainer );

//debug
header ( "Content-type: text/html" );
echo "<img src='test.png'>";
echo "&allIs=OK&";

?>
Please help on this, its really bugging me



FlashKit > Flash Help > Flash Newbies
Posted on: 10-10-2007, 06:53 AM


View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread

How To Rebuild This
hello everybody,

could someone please explain me how this menu-effect on eccentris.com is done?
I mean that nice effect when someon clicks on the "filter"-links above and the pictures disappears and a new pictures appears in a awesome "wavy" way.


enya

PS: i didn't get any answer in other forums yet maybe i posted it in the wrong section

Can Somebody Help Me Rebuild This ?
Hi
i am kind of new to all this stuff. I try to remake a flash website i saw.
This is this site: championcheerallstars.com/
I really like the pictures change on pressing the button and also the words changing by rolling over the button.

I don't have a clue how to do this, call me newby ;-)
Ok, i am not totally a newby, i can use Flash, but when it gets complicated like this and when i don't have a clue how to do it, i am lost.

Anybody here who like to help me or try to make me a fla so i can practice on that ?

Thanks
Patrick

Rebuild Menu
hello everybody,

could someone please explain me how this menu-effect on eccentris.com is done?
I mean that nice effect when someon clicks on the "filter"-links above and the pictures disappears and a new pictures appears in a awesome "wavy" way.

Need To Rebuild A Tough Swf
I need to rebuild the following swf, however I cannot seem to be able to do it. I am using mx04. Can any one point me in the direction of any similar examples where I might be able to see the code or have an idea of how to do this.

Thank you,
Canuckin


http://leogeo.com/ select "time"

Asteroids Rebuild
Ok, so I'm doing a remake of the old game Asteroids as I learn ActionScript. It's a long way from being finished, but I'm breaking it up into chunks. As I finish a section I move on to a new one.

I've already received some pointers from a couple people regarding smooth animation (thank you), so now I'm looking for pointers for a couple specific things, and am looking for any comments on alternate, even better, ways of doing what I've done.

For instance, I have looping sound effects attached with ActionScript on a frame within clips (rightThrusters_mc, leftThrusters_mc, and mainThrusters). I'd love to put it on the first frame of the main timeline, but because it's in a "if (Key.isDown....." statement, the same sound keeps loading over and over, until 100s of instances of the same sound bog down the computer. I'm looking for a way to dynamically attach the sound while the key is down and remove it when the key is up. My way is especially problematic, because if you keep holding the up arrow to move forward, AND turn left or right, the main thrust sound stops when you finish turning.

I also had to put animation that makes the asteroids rotate at various speeds INTO the clip, because the code on the main timeline that figures out the direction the asteroids tavel using the "._rotation", as does the rotate. If I try to get the asteroids to rotate randomly and move in random directions (at a fixed velocity), their directions change as they rotate.

Also, is there a way to call on the same function (specifically my WRAP function) without having to declare a variable each time? I couldn't get it to work for the asteroids until a made the clip name into a variable name and passed that through the function:

for (var i = 0; i<numAst; i++)
{
var ast:MovieClip = this["ast" + i];
move(ast);
var myClip:MovieClip = this["ast" + i];
wrap(myClip);
}

Anything I want to pass through the function "wrap" has to be renamed "myClip". I'd love to be able to put the code in as:

for (var i = 0; i<numAst; i++)
{
var ast:MovieClip = this["ast" + i];
move(ast);
wrap(ast);
}

I also had to copy word for word code from someone else's asteroid remake to do my shooting. I've been tweaking it to suit me, but most of that code is below mine, commented out. I don't understand it entirely, especially the fact that it seems to call on variables that aren't defined anywhere, but seem to have value anyway:

for (var k in lasers) {
lasers.splice(k,1);

What's "k"? I never saw a "k" set...what gives?? Tracing it didn't help; I got nothing the first four times i shot, then i got:

0
1
2
3
4

I'm pretty sure the code adds another shot into the array, until it hits 5 pieces in the array, then it starts removing the oldest everytime a new shot is fired. The problem I can't fix is that the sixth time you shoot, nothing happens. Then you can shoot 5 times, then nothing...... If I could understand what it meant, I could tweak it.

Most of all, since this is a learning experience for me, any and all feedback would help. I'd love to hear different ways to achieve the same effects (especially if I can understand the code, hehe).

Thanks for the help and comments so far, and in advance for any others!

Explode, Random Float Then Rebuild
Hi All,

I have an image that i have sliced up into 4 movieclips and placed on the center of the stage. I want to explode the pieces randomly then have them move around on screen randomly for a set period of time changing size and rotation. After the set period of time i want the pieces to return to their original location, reforming the image.

Can anyone give me an idea of how to achieve this?

Many Thanks,

Andy

Empty Or Delete And Rebuild An Array Within A Function
I'm having troubles creating an array from a function. Can somebody tell me
how to empty an array within a function? thanks : )

Flash Moving Small Images Pixel By Pixel, No Anti
Hi guys, sorry if this has been answered before I did my best to search for it but I didnt know what to search for.

I have a very small tree image (85x85 px) and I broke it up into parts. I plan to animate the tree with a breeze going through it. I had all my images aligned, got the motion tweens in, but when I play it it is VERY rough.. ie: over 30 frames for one movement it only visually moves twice, *very blocky movement*.

Im using 24bit pngs with transparency. If I could just get it to sway smoothly...
I tried playing with movie speed but with no difference, it still seems like blocky movement.

Any suggestions?
cuz damn if this dont work I'll have to scrap this idea

[CS3] Preloader Showing A Mask Pixel-by-pixel
Hi, everyone!

This is my first post here. I'm from Brazil and a basic ActionScript 2.0 programmer.

What I need to do is a preloader which is going to show a 543x513 pixel bitmap image by creating 1x1 pixel squares randomly inside a mask until it fills it up when it reaches 100% loaded.

So, trying to explain in differently, it's going to add pixel dots randomly in the mask to progressively show the image until the preloader is at 100%.

Can anybody give me a hand? Thank you in advance!

Bitmap Pixel Pixel Operation Performance
Hi, suppose we have two bitmaps, save size. I would like to add them together. For each pixel, I would like to add the red, green, blue channel respectively and clip to 0-255. What is the best way in terms of performance to do this?

thanks,

ff

Creating Objects Pixel By Pixel
Let me try to explain this without sounding waay too confusing...

I have a concept that I would like to try with building "menus" pixel by pixel. Having the pixels drop from the top of the screen to the location of the specific "box" and that box being built up from each pixel.

Am I making any sense? If I am, please read on. . .

I am wondering if this is possible to do with actionscript, and if so, can someone point me in the right direction to figure out how to do so.

I REALLY dont want have to do it by hand, create each pixel and then create the "box" and have a motion tween, I think that would take weeks. And I am just not patient enough.

If this makes little sense, please ask where I am not clear so that I may explain, I would really like to figure this one out.

Thanks !

Pixel - I Love Pixel
My first computer was a ZX Spectrum (Sinclair) and I was always fond of doing some basic programming with its pixel driven ways.
For that matter I would like to know how to approach such pixel driven ways in FlashMX. Yes, I know it is vectorial, rather...
How can I create a symbol with only one pixel (1x1 px) ? I tryed to import a .gif image with 1x1 pixel but it says the error message: "invalid format.." when I tryed to import it.
Then I thought of using the shortest and thinest line possible...
But I would like to hear from you on this. What do you have to say on this?
As Ric Ewing says in one of his tutorials: "Macromedia Flash MX draws lines in increments called twips, which are 1/20 of a pixel, so you can get precision of 0.05 on your lines. To make a line visible (without scaling it up), the minimum size is 0.15 pixels."

What I actually want to do is a layout where every pixel is changing colour (randomly). All nested side by side, but with the colour atribute changing (kinda like: the TV fuzzy/noise when it is not tuned to any particular station).

I found this tutorial that gave me lots of ideas on how to nest/tile the pixels:
http://www.kirupa.com/developer/mx20...background.htm

But before to put hands on work, would like to hear from someone with experience in these matters.

Thanks a lot,
Daniel Alexandre

What Makes A Pixel Font A Pixel Font?
I am trying to find out why, in Flash, pixel fonts remain alias at small sizes, but so far, all I have heard is "because they are very small fonts". Isn't there a complete, technical explanation as to what pixel fonts have that normal fonts don't?

If you know the technicalities about computer fonts (or if you are a font designer), I will very much appreciate your help. I am certain it will help many others, as there is little information easily available on this subject.

Pixel Art
what program to people use to make pixel art? like little men or somthing??

HELP... 1 Pixel Off
I know this has probably been addressed somewhere but I can't figure it out.

I use Flash MX, and when I embed swf files into my html web pages and view them online – they alway 'shift' over a pixel or so. Never seem to quite line up correctly.

I'm pretty sure there is a workaround. Thanks for any help!!

[CS3] [as2] Set Pixel Value
I'm remaking an old project here and previously I'd rendered an image by attachng pixel sized movie clips and setting an RGB value for each which was a real memory hog as you might expect!

Is there any way programatically creating a new bitmap and assigning colour values to the specific pixels?

thanks

One Pixel Off?
On my site, I have a red line at the top near the navigation, and it is 1 pixel away from the edge, even though in the FLA, i have that line going off the movie boundary.

At first I had it as a line, then changed it to a shape the same size.

what could be causing this?

(I have my movie contained in a div with a 1px black outline.)

http://www.the-rev.com/stage/test

Using Css And Pixel
Is it possible to link a couple of pixel fonts in the library, and then reference them in a css document as font type?

Pixel By Pixel
i'm trying to get an effect by which an object (eg. the letter "A") is simulated to be drawn/rendered pixel by pixel, or something of a mosaic effect.

the only method i can think of is to arrange squares to fit my object shape and then load them one by one using actionscript, but due to the size of my squares the image turns out not very precise. (in other words, ugly)

i could ofcourse lower down the size of each square, but that's going to be very tedious and i dont really have that kind of time...

anyone got a solution to my problem?
is there any specific code i could use? (newbie at actionscript here, dont know more than just the basics)

thanks in advance

Pixel Art?
Is there any way of doing pixel art in flash?

Pixel Art
I made a tileable brick wall for an upcoming game, my problem is that when I import to flash and link it to another brick wall tile at 100% view it looks f*&$ed up lol. In photoshop there is no problem at all, I have tried putting the tile on exact coordinates(.0, .5) still gives me the same problem. here, take a look for yourselves...

flash:
http://img328.imageshack.us/img328/3...elbrick7tp.png

photoshop:
http://img340.imageshack.us/img340/2...elbrick6wb.png

Pixel Look?
I just stumbled upon this forum due to the word of mouth method from a couple of my friends. So, I'm hoping someone can ask this very stupid question (I think?)

I'm often see on flash sites, including this one, that "pixel" look. How do you do it? What program do you use? Many of the icons of this site have that look too. This question may seem very general, but it's the best I can describe it.. sorry. :-

Can anyone help me here?

Pixel By Pixel
i'm trying to get an effect by which an object (eg. the letter "A") is simulated to be drawn/rendered pixel by pixel, or something of a mosaic effect.

the only method i can think of is to arrange squares to fit my object shape and then load them one by one using actionscript, but due to the size of my squares the image turns out not very precise. (in other words, ugly)

i could ofcourse lower down the size of each square, but that's going to be very tedious and i dont really have that kind of time...

anyone got a solution to my problem?
is there any specific code i could use? (newbie at actionscript here, dont know more than just the basics)

thanks in advance

Pixel Art?
Is there any way of doing pixel art in flash?

Pixel Art - How?
How do you do those pixel art web sites?
Draw it in photoshop ?? Thanks.....

Fla Pixel Size
I'm running into this problem I am not able to solve...

<<< how to resize my .fla dimensions keeping everything centered??? >>>

It always happens to me that I don't know exact dimensions of the .fla I am making and at the end of everything I might want to change those dimensions!!
The prob is that flash will enlarge or shorten sides from top left... why???????????????????????????????
It screws up everything... how do I handle this? Is there a possibility to enlarge or shorten .fla from center?
How do people commonly do?

It is very painful and annoing to change positions 'cause if you work on long fla u must move object by object 'cause flash doesn't select them all!!!

please help me
:-////

Pixel Fonts Here
I have some nice pixel font from miniml,
If you have any better post them here. These fonts are easy to use, Just assign the _X possition and the y_ possition to 0,

These are True Type fonts, (PC Only)

http://www.btinternet.com/~nzo/pixel/

I wonna see some pixel font posts please,
A nice one to have would be "over used" this was used on http://www.2advanced.com

Wiked

Pixel Fonts
hello.

Anybody know of any site where I can donload free pixel fonts or bitmanp fonts.
Minimal has an acess cost of $100...i'm in South Africa and the exchange rate makes it a tad costly!!!

cheers!

Get Rgb From 1 Pixel Of An Image ?
is it posible to get the rgb value from a certain pixel of an imported image in flash, lets say i want to know the rgb of the pixel on the 10,25 coordinates, is it possible and how is it done ?

Thanks

Pixel Fonts
Sorry to bug you guys with this, but does anyone know of a good site to go to that has free pixel fonts that I can use? I'd appreciate any heads up.

Thanks!

Pixel Color Value .... Could I Know It?
Hi flash people!!!

I'd like to know if I could get the color of a pixel and how I could do it.

for instance... I'm moving the mouse and get the value of the pixel that is behing the mouse pointer...

Thank you very much!!!

Pixel Shifting
I'm having serious problems trying to fix the pixel-shifting in my flash movie. I've done extensive searching of these boards on how to eliminate pixel-shifting, and tried as many approaches as I could, including megatoon's 6-step pixel-shifting eliminating plan, and doing the "break/group" thing. I've looked at the Macromedia trouble-shooting advice on pixel shifting and tried those approaches. And still my movie is shifted by a pixel or so.

The ONLY thing I have found that works is setting the View quality to Low in the testing screen. At low setting, everything appears perfect. At medium or high, there is pixel shift. So I've tried publishing the movie with the quality setting to low in the html tab, yet the resulting file still has the pixel shift. In Dreamweaver MX, I've tried importing the swf and html and put the Quality setting at Low in the property inspector, and it still pixel shifts in the dreamweaver preview AND in the browser preview.

What to do, what to do?? Any help would be greatly appreciated. Thanks in advance...

Are Your Jpegs 1 Pixel Out
My dynamically Loaded Jpegs all seem to be one pixel out. What seems to be happening is the images bottom line of pixels are moving to the top, and the right column of pixels are moving to the left.

Has anyone else had this problem, and if so have they solved it??

Cris.

Pixel Fonts
Hello all,
I am new to alot of this stuff but I am using a pixel font that I have embedded inside of an input box. It starts of sharp for abou thte first 8 characters then starts getting blurry the move letters you type.

Anybody know how to prevent this??

Any help is greatly appreciated,
Thanks,
Brian

Importing Pixel Art
Hello.

If you go to this link http://www.pixeldeviant.com/robot.html you'll see a simple animation of a robot made with pixel art.

I have designed something with pixel art and I now want to import it into flash. (I used pshop 7). When I import somthing its blurry when zoomed in. However the robot in the above link shows pixel for pixel. How do I import an object and keep the "solid" pixels look? Is there a certian way I should save it in photoshop?

Thanks for your help

PIXEL FONT HELP
I want to use pixel fonts or whatever u call them in my site as seen in http://www.pixelranger.com where do i get these or if they are already on my comp how do i get them

To Snap To Pixel?
Is it possible to snap a minifont to pixel in flash 5. Of does anyone know how I can work arounf the blur problem ?. Im sick and tired of moving my font one pixel at a time to see if it is in focus and not blurred.. please help!

-ace

PIXEL FONT HELP
Hey everyone, can you please help:

I've recently installed some cool pixel fonts on my computer and tried to use them in my Flash projects. Pray tell me why everything look perfect in the workspace but as soon as i export it and view it, I get blurry text. I think its something to do with the antialias text function in Flash MX.

What if i don't want it exporting antialias text?

How do I switch off this antialais text in my exported movies??

help!!!

Whole Pixel Movement
I am using this actionscript to obtain a certain movement characteristic in flash 5.0. Howevrer, I use pixel fonts and need to know how to make the movie clip move only on WHOLE pixels so the text never blurs even during movement. Can anybody help me with this?

this is the code (if it is even relevant):

onClipEvent (load) {
var valid = true;
newY = _y;
origY = _y;
Yspeed = 0;
a = 1.4;
d = 1.2;
}
onClipEvent (enterFrame) {

Yspeed = ((_y-newY)/a+Yspeed)/d;
_y -= Yspeed;


}
onClipEvent (mouseDown) {

if ((valid == true) and (_root._ymouse < 275)) {
newY = Math.ceil(_root._ymouse);
valid=false;
}else{
if ((valid == true) and (_root._ymouse > 275)) {
newY = 275;
valid=false;
}
}
}

Pixel Fonts
i managed to download a few pixel fonts off the net, installed them(if u wanna call it install) and well when i view flash files *swf/*exe whatever i see them perfectly allright, but then of course when i use the flash files on another computer that doesnt have that font installed it looks squif and weird and bad quality and so on, how can i use pixel fonts properly so they look almost identical to what i want em to?

Pixel Fonts, Ive Done Everything....
hello.. i have a bunch of pixel fonts. and theyre still showin up blurry, ive done it all, ( i think ):

1. made sure the height of the pixel is 8, ( or corresponds to the recomendations
2. have left justified the text feild.
3. i have set the location to a whole integer.
4. when i preview the font its anti-aliased, man this is annoying.

also... i have a few fonts that look okay when im in the flash authoring environment, but then when i preview the swf, the D,B and a few more letters dont have the middle knocked out (holes). this has happend with fonts such as.._04b_03b, 04b_08b, 04b_11,

please help!
thanks.
josh

Pixel Fonts
Hi. I am using a pixel font for some text which at size 8 looks really sharp on the canvas but when I preview the movie, the text is slightly blurred. Any ideas?

Pixel Fonts
Hi, does anybody know about using pixel fonts with flash? I've recently downloaded some free pixel fonts and planned to use them in a flash site, but because Flash anti-aliases the text they look blurry, defeating the object somewhat...
...anybody have any tips or ideas about how to avoid this problem...it can clearly be done as I have seen numerous flash websites that employ pixel fonts.

Cheers...

Pixel Image
Can anyone tell me the action script that loads an image pixel by pixel.

Pixel Art + Flash Mx
any hints on how to effectively import pixel art into flash without flash messing it up? i've tried w/ alpha-channel'd .png's but there always seems to be a cut on the bottom and right-most rows of pixels, and it gets all jagged.

i've unchecked smooth, i've unchecked compress movie and jpeg quality at maximum.

any help appreciated!

Pixel Fonts
I've got a pixel font(fonts for flash) that looks real clean in flash except when I put it into a movieclip. Any suggestions?

thanks
hcraig

Pixel Art In Flash MX
Hello all,

I'm using Flash MX, and am wondering how to create true pixel art within my animations, as seen here: http://www.pixeldeviant.com/experime...elbanner.shtml

It seems like even zoomed way in, with pixel level snap controls in place, at 100% I end up with real thick lines and antialiasing. It's not an issue of quality control within the html, because as you can see in the above, this guys using a quality level of high and still acheiving pixely results.

Please help!

Pixel Font
iv read quite a few tutorials regarding pixel fonts and anti aliasing but i have a problem, if i change a pixel font to dynamic then embed the font outlines, the font turns out blurred, but if i remove font embeding its crisp and clear but wont work unless u have the font installed on your system. iv seen sites like minml.com and fontsforflash.com that use pixel fonts perfectly by embeding them, any idea y? also wondering, ummmmmmmm what exactly is the function of the option to use a new font in the library? i mean when u press cltrl l and click on the one library icon i can use another font there by inserting it, does that import the font directly into the flash file so instead of using a font currently on your system it uses the font wich was imported into flash? iv read the tutorial provided with flash about this but i cant figure it out.

Pixel Art In Flash
Hello All,
I am looking for any information about Pixel Art and Flash. I have seen pixel art within flash before, but short of importing the art that I created in Photoshop, I don't know how it is accmplished. I recently got addicted to pixel art - making icons and interfaces and such. I would like to make the art within flash. Is it possible to acheive within a vector based program? Any information is greatly appeciated.

Much thanks!

Copyright © 2005-08 www.BigResource.com, All rights reserved