Allow Smoothing For .flv
Hello everyone, i've got this little issue maybe someone here can help me with:
For a bitmap imported into the library in flash you can set "allow smoothing" so it does not jitter when you script it around the stage. Works like a charm. However, if you use a .flv as a source instead of a bitmap, there is no such "allow smoothing" option resulting in jerky jittery movement. (no subpixel rendering)
Is there a way to make the video behave the same as the imported bitmaps?
tnx in advance.
KirupaForum > Flash > Flash 8 (and earlier)
Posted on: 02-01-2007, 06:36 AM
View Complete Forum Thread with Replies
Sponsored Links:
Faster Option Than Bitmap Smoothing? Or Speed Up Bitmap Smoothing?
Hey,
Is there any way to speed up bitmap smoothing? or to achieve the same effect with something less processor intensive? Or maybe a way to reduce the amount that it smooths or something. Btw, when I say speed up I mean less processor intensive.
In the project I'm currently working on the image must be rotated and scaled smoothly to 1.5 times it's starting size. If there is any different way to achieve a smooth-ish image please let me know. Even if it's really complicated, if it's at all faster I want it hear it.
How I'm currently doing it is I load in the images (jpg) from an XML file, create a bitmap take the bitmap data from the loaded jpg and enable smoothing. Then I add that bitmap to a movieclip and then I do my stuff from there. It's a complex photo viewer. It all works, but I need to make it work using less resources.
Any ideas are MUCH appreciated! Thanks
View Replies !
View Related
Allow Smoothing
Hi,
Is it possible to apply smoothing on a bitmap that has been loaded into a movieclip? Much like you can allow smoothing on a bitmap that is in the library?
Or is there another method that has a similar effect?
Thanks.
~Oni.
View Replies !
View Related
FLV Smoothing
I'm trying to get video smoothing I've tried this and unfortunately had no luck
MovieClip(FLVPlayer.getVideoPlayer(FLVPlayer.activ eVideoPlayerIndex)).smoothing = true;
Thanks in advance for any help
View Replies !
View Related
Smoothing
Is there any way to turn off the default bitmap smoothing on import. I'm importing several frames at one time, and hate to have to go through each and every one.
THanks
View Replies !
View Related
Smoothing Problem.?
I'm having a problem with images that i import into my movie.. I used JPG's and when i scale them down, they look jaggedy in the flash file... But they look perfect in the actual program, while i'm working with them.. Its just when i publish my file that the images look jaggedy...
http://www.igor.n3.net/honda/simple.html
that is what i'm talking about.. some of the bikes had to be scaled down.. but they don't come out smooth..???
View Replies !
View Related
Problems With Smoothing
Hi all, yeasterday everything was going good, my movie was with gifs with "smoothing" on them and then CRASH!
Now When I publish the movie and when I see it in preview "smoothing" is disabled! I can't undrstand why! Smoothing is activated in all of my gifs! When I'm in the principal panel everything is ok. I didn't touch anything!
I have to reinstall the program? There is a bug o something like that?
Damn me!
View Replies !
View Related
Undo Smoothing
everytime i import images to my flashmx
the pic is automaticly smoothing...
and i already right klick on it and "uncheck" the smoothing
but the pic is still not the way i want it to be
View Replies !
View Related
Turn Smoothing OFF?
I'm working on a project with tons of non-antialiased gifs and i have to manually turn smoothing off for EVERY one that's imported... Plus smoothing sucks anyways... is there a way to turn it off permanently!?
Thanks,
dyl
View Replies !
View Related
Smoothing Shapes...
I just created a cool logo that I want to use on my website and I need to implement it in flash, the only problem is that when I import it from Corel Draw it looks choppy and not as smoot, how can I keep my object smooth without losing quality but keep it editable?
Another question I have is how to copy images in flash. I made a bitmap and I want to trace certain parts of it with shapes in flash, so do I have to do this manually using berziers and stuff to create curves or is there a way that I can take this image and copy it as a flash editable vector image?
View Replies !
View Related
Line Smoothing
Probably a dumb question, but I'm new to Flash. I am putting together a flash animation and was able to use the line smoothing option for the pencil without a problem for several days. For some reason, today it is not working. I have made sure the button is pressed in the toolbox, the editor is set properly in properties. I opened a new file and the line smoother works perfectly with the same settings. When I toggle between the two projects in the window display, it works for the new project but not the existing. I have re-downloaded the software. Saved the project under another name and reopended to no avail. In short, I've tried everything I can and have not been able to find help on-line or in the manuals. I'm sure it's a simple solution but I've been going around in circles for some time.
View Replies !
View Related
Smoothing Lines
Hey, I was trying to figure out the best way to set the paintbrush so it pumps out smoother lines when I draw. I ALWAYS have to use the smooth button, and I'm sick of it. The lines ALWAYS come out choppy, even when I try to keep quick strokes. Can anyone help me?
View Replies !
View Related
I Can't Get The Damn Smoothing Off
okay, i have this tiny .gif and it refuses to display clearly. it's a little sound icon and i have the smoothing turned off but it still shows up all wacky. i've tried using a .jpg or tracing the bitmap to make it a vector but i still can't get a clean image. please have a look at the attached file and zoom in the icon to get a look at it. any help would be greatly appreciated.
thanks!
p.s. i can't run the movie at a lower quality, is there another way to turn anti-aliasing off?
View Replies !
View Related
Image Smoothing Please Help
so a while back i couldn't figure out why my images weren't being smoothed in flash, but then i realized you have to break apart the bmp before making it a symbol. so, on a new site im working on, i made sure and did that on all of them, and i even published and saved a bunch of times, and everything looked great. Here's what it looks like good and smooth.
So then, I go and do a bunch of more work, starting on the sections and whatnot, and publish again, and i haven't made any changes to the symbols or images, and now they aren't smooth anymore. i checked the bmp properties and allow smoothing is checked, and i am completely stuck and frustrated as to why it won't smooth my images. it wouldn't be a big problem excpet that we want the site to auto resize to the users screen, and it looks infinitely better with smoothing and then the vector shapes for outlines and text.
please someone help me.
View Replies !
View Related
[Problem] Getting Rid Of Smoothing
I have tried and tried again to get rid of the smoothing FLash does to my images. When saving them as a Gif, Jpg, and Png didn't effect anything I looked in the help file and finally found the option to Dis-Allow smoothing. It works in FLash MX, but when you export the .SWF it goes and smooths it.
The image is in a button, which is in a MC. Does this effect anything? Is there any way to smooth the image without putting the whole movie on low quality?
Thanks in advance,
Scott
||: I tried break apart, trace, ect. Didn't work.
View Replies !
View Related
Smoothing Problem
Im making a movie using sprites, but for some reason they are not showing up clear, they are blurry, as if I had smoothing on, but I dont and i cant figure out why could someone help, ive attached the file
View Replies !
View Related
Bitmap Smoothing Bug
I've come across a bug where smoothing on my bitmaps stops working if I have more than one frame on the main timeline of my movie.
This is what is happening with more than one frame on the main timeline:
Whereas with just one frame it looks like this:
I've tried all the normal work-arounds like breaking it apart, resizing it to 99%, setting the alpha to 99% etc etc
Anyone come across this before?
Got any solutions or work-arounds?
Cheers
View Replies !
View Related
Smoothing Nightmares
I'm attemping to use gifs in a movie, so that everything fits together pixel perfectly. Everything looks fine in flash itself, until runtime, when everything gets smoothed horribly.
I've turned off allow smoothing in the properties for each image. I've turned off every form of compression possible in publish settings.
I'm using mx 2004.
Does anyone know how to stop this from happening?
View Replies !
View Related
[F8] Help With Smoothing Out Program
Ive been working on a project that is a small scale version of google maps. It basically does the same thing for one downtown district. I am taking the information for the business in the district off a database. The problem is that i feel that there are too many for() and enterFrame commands, making it somewhat choppy and slow. Is there any ways to stream line the code so it smooths out?
Code:
result = new Array();
enter = new Array();
exit = new Array();
onstage = new Array();
parent = "_root.map.shift.zoom";
depth = 0;
box = 0;
zoom = 1;
_root.onLoad = function() {
_root.loadVariables("variables.txt");
};
var businesses = new XML();
businesses.ignoreWhite = true;
businesses.load("demo.xml");
businesses.onLoad = myOnLoad;
function myOnLoad(success) {
business = new Array();
for (g=0; g<=4; g++) {
business[g] = businesses.childNodes[g].attributes;
}
}
_root.onEnterFrame = function() {
if (_root.total != undefined) {
for (test=0; test<=5; test++) {
globetest = test;
eval(parent+"."+business[test].id)._xscale = 10000/_root.map._xscale;
eval(parent+"."+business[test].id)._yscale = 10000/_root.map._yscale;
eval(parent+".box"+business[test].id)._xscale = 10000/_root.map._xscale;
eval(parent+".box"+business[test].id)._yscale = 10000/_root.map._yscale;
xdistance = Number(eval("_root.x"+test))-eval(parent)._xmouse;
ydistance = Number(eval("_root.y"+test))-eval(parent)._ymouse;
totaldistance = Math.sqrt(Math.pow(xdistance, 2)+Math.pow(ydistance, 2))*(_root.map._yscale/100);
if (totaldistance<15 && eval(parent+"."+business[test].id)._visible != true && box == 0) {
attach(parent, business[test].id, business[test].type, Number(eval("_root.x"+test)), Number(eval("_root.y"+test)));
}
}
}
if (_root.enter.length>0) {
fadein(_root.enter);
}
if (_root.exit.length>0) {
fadeout(_root.exit);
}
mapresize(((100/3)*zoom)+(200/3));
};
function attach(movie, name, instance, x, y) {
eval(movie).attachMovie(instance, name, depth++);
eval(movie+"."+name)._alpha = 0;
eval(movie+"."+name)._x = x;
eval(movie+"."+name)._y = y;
eval(movie+"."+name)._xscale = 10000/_root.map._xscale;
eval(movie+"."+name)._yscale = 10000/_root.map._yscale;
_root.searchandsplice(_root.exit, name);
_root.enter.push(name);
}
function fadein(array) {
for (a=0; a<array.length; a++) {
if (eval(parent+"."+array[a])._alpha<100) {
eval(parent+"."+array[a])._alpha += 12.5;
} else if (eval(parent+"."+array[a])._alpha == 100) {
onstage.push(array[a]);
searchandsplice(array, array[a]);
}
}
}
function fadeout(array) {
for (b=0; b<array.length; b++) {
searchandsplice(onstage, array[b]);
if (eval(parent+"."+array[b])._alpha>0) {
eval(parent+"."+array[b])._alpha -= 12.5;
} else if (eval(parent+"."+array[b])._alpha == 0 || eval(parent+"."+array[b])._alpha == undefined) {
removeMovieClip(eval(parent+"."+array[b]));
searchandsplice(array, array[b]);
}
}
}
function searchandsplice(array, term) {
for (c=0; c<=array.length; c++) {
if (term == array[c]) {
array.splice(c, 1);
}
}
}
function typesearch(term) {
for (a=0; a<_root.onstage.length; a++) {
_root.searchandsplice(_root.exit, _root.onstage[a]);
}
_root.exit = _root.exit.concat(_root.onstage, _root.enter);
_root.onstage.splice(0, _root.onstage.length);
_root.enter.splice(0, _root.enter.length);
for (clear=0; clear<_root.result.length; clear++) {
_root.resultcolum.resultdisplay[_root.result[clear]].removeMovieClip();
}
_root.result.splice(0, _root.result.length);
for (b=0; b<Number(_root.total); b++) {
if (business[b].type == term) {
if (eval(parent+"."+business[b].id)._visible != true) {
attach(parent, business[b].id, business[b].type, Number(eval("_root.x"+b)), Number(eval("_root.y"+b)));
} else {
_root.searchandsplice(_root.exit, business[b].id);
_root.enter.push(business[b].id);
}
_root.result.push(business[b].id);
eval(parent+"."+business[b].id).level = 1;
}
}
for (c=0; c<result.length; c++) {
resultcolum.resultdisplay.attachMovie('resultbox', result[c], depth++);
resultcolum.resultdisplay[result[c]]._y = c*resultcolum.resultdisplay[result[c]]._height;
resultcolum.resultdisplay[result[c]].storename = result[c];
}
}
function mapresize(scale) {
_root.map._xscale -= (_root.map._xscale-scale)*.4;
_root.map._yscale -= (_root.map._yscale-scale)*.4;
}
function namesearch(term) {
for (a=0; a<_root.onstage.length; a++) {
_root.searchandsplice(_root.exit, _root.onstage[a]);
}
_root.exit = _root.exit.concat(_root.onstage, _root.enter);
_root.onstage.splice(0, _root.onstage.length);
_root.enter.splice(0, _root.enter.length);
for (clear=0; clear<_root.result.length; clear++) {
_root.resultcolum.resultdisplay[_root.result[clear]].removeMovieClip();
}
result = new Array()
match = 0;
name = term.toLowerCase().split("");
if (_root.total != undefined) {
for (d=0; d<Number(_root.total); d++) {
big = new Array();
small = new Array();
comp = _root.business[d].name.toLowerCase().split("");
if (name.length>comp.length) {
big = name;
small = comp;
} else {
big = comp;
small = name;
}
diff = big.length-small.length;
for (e=0; e<=diff; e++) {
match = 0;
for (f=0; f<small.length; f++) {
if (small[f] == big[f+e]) {
match++;
}
}
if (match>small.length*(2/3)) {
if (eval(parent+"."+business[d].id)._visible != true) {
attach(parent, business[d].id, business[d].type, Number(eval("_root.x"+d)), Number(eval("_root.y"+d)));
} else {
_root.searchandsplice(_root.exit, business[d].id);
_root.searchandsplice(_root.enter, business[d].id)
_root.enter.push(business[d].id);
}
searchandsplice(result, business[d].id)
_root.result.push(business[d].id);
eval(parent+"."+business[d].id).level = 1;
}
}
}
}
for (g=0; g<result.length; g++) {
resultcolum.resultdisplay.attachMovie('resultbox', result[g], g);
resultcolum.resultdisplay[result[g]]._y = g*resultcolum.resultdisplay[result[g]]._height;
resultcolum.resultdisplay[result[g]].storename = result[g];
}
}
View Replies !
View Related
Allow Smoothing On Imported Jpg?
Hey all,
I'm just trying to get my jpg loader working and can't get it to smooth a loaded jpg? has anyone had this problem?
Below is the code im using, its in flash 8:
Code:
var container:MovieClip = createEmptyMovieClip('container'+_root.i,_root.l);
var mcLoader:MovieClipLoader = new MovieClipLoader();
mcLoader.addListener(this);
mcLoader.loadClip("Images/"+_root.directory+"/Image-"+_root.i+".jpg", container);
function onLoadStart(mc:MovieClip) {
this["container"+_root.i]._alpha = 0;
this["container"+_root.i]._visible = false;
}
View Replies !
View Related
Image Smoothing
I have a loader that gets bitmaps externally.
How can I smooth the content ?
I tried this:
var loaderContent = Bitmap(loader.content);
oaderContent.smoothing = true;
Didn't seem to work.
View Replies !
View Related
Image Smoothing
Hi friends,
I am loading an external jpeg into a container using this code.
PHP Code:
myContainer.loadMovie("externalImage.jpg",1)
myContainer has animation ( using _ root.mouse)
Everything fine except the jpeg look crispy pixel,when it move with the mouse.
If that jpeg was in library then I could use the "smooth" option.
Since it is loaded from external folder I dont know hoW to fix it.
Any help??
View Replies !
View Related
Video Smoothing
Hello,
First of all, i wouldn't class myself as even an ametuer in Flash, however i think this post belongs in this forum - if not, please excuse me.
After having a video player made for my website, I quickly realised that the video was playing a little jaggery. I found out that this was because anti-aliasing was turned off, and the was to enable it was through video smoothing.
The videos played through my website are .flv.. and so the regular "video.smoothing = true | false" was said not to work for these type of files.
I found a code that should appear to work "By converting the component video player’s data type to a MovieClip, you get around the video player’s access control and can directly access its video object. This way you can then change its smoothing parameter."
Code:
MovieClip(FLVPlayer.getVideoPlayer(FLVPlayer.activeVideoPlayerIndex))._video.smoothing = true;
The actionscript I am trying to implement it into is in the following code. I've tried myself multiple times, but since i'm not a flash actionscripter I can't really say I know how to approach this anymore, other than my already-fairling trial and error. Any help would be appreciated
Code:
class VidiPlayer extends MovieClip
{
var vid_obj, vid_file, vid_playing, vid_paused, vid_conn, vid_stream, getURL;
function VidiPlayer(new_vid, file)
{
super();
vid_obj = new_vid;
vid_file = file;
vid_playing = false;
vid_paused = false;
vid_conn = new NetConnection();
vid_conn.connect(null);
vid_stream = new NetStream(vid_conn);
vid_stream.setBufferTime(2);
vid_obj.attachVideo(vid_stream);
vid_stream.onStatus = videoEvents;
vid_stream.onMetaData = getDuration;
} // End of the function
function getVidFile()
{
return (vid_file);
} // End of the function
function getLoadedBytes()
{
return (vid_stream.bytesLoaded);
} // End of the function
function getTotalBytes()
{
return (vid_stream.bytesTotal);
} // End of the function
function getTime()
{
return (vid_stream.time);
} // End of the function
function getBufferLength()
{
return (vid_stream.bufferLength);
} // End of the function
function getBufferTime()
{
return (vid_stream.bufferTime);
} // End of the function
function getDuration(info_obj)
{
_root.vid_duration = info_obj.duration;
} // End of the function
function setVideoEvents(which_event, functions)
{
if (which_event == "start")
{
eventStart = functions;
}
else if (which_event == "stop")
{
eventStop = functions;
}
else if (which_event == "empty")
{
eventEmpty = functions;
} // end else if
} // End of the function
function setSeek(new_time)
{
vid_stream.seek(new_time);
} // End of the function
function videoEvents(info_obj)
{
switch (info_obj.code)
{
case "NetStream.Play.Start":
{
break;
}
case "NetStream.Play.Stop":
{
if (_root.video_vd != undefined)
{
if (vid_stream.time >= _root.vid_duration)
{
_root.gotoAndPlay("endvideo");
} // end if
} // end if
break;
}
case "NetStream.Buffer.Empty":
{
break;
}
case "NetStream.Buffer.Full":
{
break;
}
case "NetStream.Play.StreamNotFound":
{
_root.showThumb();
break;
}
} // End of switch
} // End of the function
function streamVid()
{
vid_stream.play(vid_file);
vid_stream.pause();
vid_playing = true;
vid_paused = true;
} // End of the function
function playVid()
{
if (!vid_playing)
{
vid_stream.play(vid_file);
vid_playing = true;
}
else if (vid_paused)
{
vid_stream.pause();
vid_paused = false;
} // end else if
} // End of the function
function pauseVid()
{
if (vid_playing && !vid_paused)
{
vid_stream.pause();
vid_paused = true;
} // end if
} // End of the function
function rewindVid()
{
if (_root.vid_duration != undefined)
{
var _loc3 = _root.vid_duration / 5;
var _loc4;
if (vid_stream.time - _loc3 < 0)
{
_loc4 = 0;
}
else
{
_loc4 = vid_stream.time - _loc3;
} // end else if
vid_stream.seek(_loc4);
} // end if
} // End of the function
function stopVid()
{
vid_stream.seek(0);
this.pauseVid();
} // End of the function
function forwardVid()
{
if (_root.vid_duration != undefined)
{
var _loc4 = _root.vid_duration / 5;
var _loc3;
if (vid_stream.time + _loc4 >= _root.vid_duration)
{
_loc3 = _root.vid_duration;
}
else
{
_loc3 = vid_stream.time + _loc4;
} // end else if
vid_stream.seek(_loc3);
} // end if
} // End of the function
function endVid()
{
vid_stream.close();
_root.autostart = false;
_root.gotoAndPlay("endvideo");
} // End of the function
function eventStart()
{
trace ("start");
} // End of the function
function eventStop()
{
trace ("stop");
} // End of the function
function eventEmpty()
{
trace ("empty");
} // End of the function
} // End of Class
View Replies !
View Related
Bitmapdata Smoothing
I don't know if anyone here can help me. Most forums haven't been able to. I'll assume you guys know how to smooth an image using the bitmapdata class then redrawing the image.
I have an image that fills the background of my flash site and the image resizes, centers and is smoothed using bitmapdata when the stage resizes. The problem is bitmapdata draws a white edge on the image when it resizes. This changes the width and height of the image making my algorithms to center and resize the image useless. Does anyone here think they can help? If so I'll send you my code to take a look at.
Thanks.
View Replies !
View Related
Image Smoothing?
when i use flash.display.Loader and load a image in and resize it in a carousel effect i'm wroking on, it all works great, except the images don't resize smoothly. i remember in AS2.0 you could use image smoothing if they were in the library i think.
is there a way to do this with images loaded in with AS 3.0? thanks!
View Replies !
View Related
Bitmap Smoothing
So, I've been digging around for quite a couple of days now, and can't seem to find an answer to this quirky thing Flash is doing.
I've successfully applied the smoothing property to a dynamically loaded bitmap (because I wanted to scale the image through animation). It works great when I test it and publish it on my local machine. But, as soon as I upload it to my server, something about the browser or the online flash player doesn't seem to recognize this code. It reverts back to the old jittery bitmap as it's scaling.
Has anyone else had this problem? Or, is there a link to a post that I'm missing? Any help you can offer would be amazing!
View Replies !
View Related
Smoothing Setting
Hey everyone, I have a set of pictures that I am using a simple motion tween for where I move and scale the pictures. The problem is that when the pictures are scaled they get all choppy and pixelated. So, I checked the smoothing box in each pictures property settings and they look great now when they are scaled, however, when they are sitting still they look very blury. Is there anyway to fix this? Thanks.
View Replies !
View Related
Smoothing Bitmaps
Im working on a site with a lot of bitmapped images. When the site first loads up, circles in the bitmapped images show up with rough edges but if you right click and change the quality to "high" (even if its already on high), the circle smooths out.
How can I get this to display as smooth to begin with?
View Replies !
View Related
Video.smoothing
I've just noticed that there's a "smoothing" property under the Video object in Flash. I've also noticed that Google Video (which uses FLVs) allows you to toggle smoothing, and it looks great when enabled. Unfortunately, I can't figure out how to enable smoothing when using the FLVPlayback component. It doesn't seem to expose the .smoothing property to the developer. Am I going to have to ditch FLVPlayback and roll my own player to get nice smooth-scaled video?
View Replies !
View Related
Bitmapdata Smoothing
I don't know if anyone here can help me. Most forums haven't been able to. I'll asume you guys know how to smooth an image using the bitmapdata class then redrawing the image.
I have an image that fills the background of my flash site and the image resizes, centers and is smoothed using bitmapdata when the stage resizes. The problem is bitmapdata draws a white edge on the image when it resizes. This changes the width and height of the image making my algorithms to center and resize the image useless. Does anyone here think they can help? If so I'll send you my code to take a look at.
Thanks.
View Replies !
View Related
Video Smoothing
I know that you can set the smoothing property of a video object and also to bitmaps in AS3. Is it possible to achieve smoothing on a flv which is embedded on the timeline of a swf? I believe the smoothing parameter does not exist for MovieClip.
Thanks
Neil
View Replies !
View Related
Smoothing In Fla7
hi,
i'm curently using easing/smoothing/bouncing scripts that dont work in fla7 wich sucks because 7 is so much better in performance. Any help in upgrading this will be much appreciated
here's an example:
//simple smooth preloader script, works in fla6
onClipEvent (enterFrame) {
loading = _parent.getBytesLoaded();
total = _parent.getBytesTotal();
//trouble part
percent -= (percent-((loading/total)*100))*.25;
per = int(percent);
if (percent>99) {
_parent.gotoAndStop(2);
}
}
The string thats ruins this in fla7 is:
percent -= (percent-((loading/total)*100))*.25;
It would work like this, but it wouldnt be smooth:
percent = loading/total*100;
So this is the problem, i use a lot of this variable1 += variable1*blablabla stuff and is wont run in fla7. Any ideia on how to make it work??
thank you very much in advance
View Replies !
View Related
Smoothing A Zoom
Hi,
I have a zoom effect which simply involves enlarging a movie clip containing many layers and instances. This zoom however is very stuttery, I want to smooth it out. I presume this is because the movie clip is quite big. I have tried experimenting with the frame rate and tween length but have no effect. What else could I do?
Thanks
View Replies !
View Related
Force Smoothing
How do you implement the new forceSmoothing?
ActionScript Code:
new_mc.holder.loadMovie(myNv["image"+(x)]); new_mc.holder.forceSmoothing = true;
I've tried this but it doesn't seem to be making any difference.
Any ideas?
View Replies !
View Related
Bitmapdata Smoothing
I've been using the bitmapData class to make my dynamically loaded and resized images smooth. The problem is when my application window is maximised then shrunk back down the bitmapData class adds a black edge to the outside of my images, altering the actual dimensions of the image, which makes the entire algorithm used to centre the image useless. I spent hours trying to fix this but have no clue. Does anyone here know how to fix this problem?
Code:
public function resize(width, height) {
_imageWidth = width;
_imageHeight = height;
if (_scale == true) {
if(_imageHeight > mcImage._height or _imageWidth < mcImage._width){
mcImage._height = _imageHeight;
mcImage._xscale = mcImage._yscale;
}
if(_imageWidth > mcImage._width or _imageHeight < mcImage._height){
mcImage._width = _imageWidth;
mcImage._yscale = mcImage._xscale;
}
}
else {
mcImage._width = _imageWidth;
mcImage._height = _imageHeight;
}
mcImage._x = center(_imageWidth, mcImage._width);
mcImage._y = center(_imageHeight, mcImage._height);
var bitmap:BitmapData = new BitmapData(mcImage._width, mcImage._height, true, 0x000000);
mcImage.attachBitmap(bitmap, mcImage.getNextHighestDepth(),"auto", true);
bitmap.draw(mcImage);
}
The code above resizes, positions and smooths the image.
View Replies !
View Related
Scale Smoothing
I read in the API that bitmaps have smoothing property.. so i was thinking when I load a jpg using Loader and manually adjust the width and height... is it possible to have a smoothing effect like the one in Bitmaps?
View Replies !
View Related
Font Smoothing
I I need help regarding font smoothing in html text. I have embedded the font and set the font size to 12, but increasing the font size distorts the font making it blurry/hazy etc:
what am i to do... i need smooth crisp looking font... mind that i have to render the text as html in dynamic
View Replies !
View Related
Bitmap Smoothing :S
Hello,
Working on a fullscreen website with bg-images. I've loaded the images in through xml but the smoothing is very bad. I see big pixels! Is here anyone who knows how i can implement the attachBitmap function into this script:
Code:
// ------------- Initialize Arrays to Hold Bitmap Images -------------
import flash.display.BitmapData;
var Bitmaps = new Array();
var BitmapWidths = new Array();
var BitmapHeights = new Array();
// ------------- Set Location Indexes and Drag Motion Var -------------
_global.CenterIndex = 0;
_global.RightIndex = 1;
_global.LeftIndex = Images.length-1;
//_global.notInMotion = true;
// ------------- Load Images Sequentially -------------
var loading=0;
Loading.loading.text = (loading + 1) + " of " + Images.length;
Loading._alpha = 100;
var ImageLoader = new MovieClipLoader();
var ImageListener = new Object();
ImageLoader.addListener(ImageListener);
ImageListener.onLoadInit = function(mc) {
Bitmaps[loading] = new BitmapData(mc._width, mc._height, true);
BitmapWidths[loading] = mc._width;
BitmapHeights[loading] = mc._height;
Bitmaps[loading].draw(mc);
ImageLoaderTemp.removeMovieClip();
};
//var image = ImageLoaderTemp.createEmptyMovieClip("ImageHolder" + loading, ImageLoaderTemp.getNextHighestDepth());
//image.attachBitmap(Bitmaps[loading], 1, "auto", true);
//image._quality = "BEST"
//ImageLoader.loadClip(Image[loading], image);
ImageLoaderTemp.createEmptyMovieClip("ImageHolder" + loading, ImageLoaderTemp.getNextHighestDepth());
ImageLoader.loadClip(Images[loading], ImageLoaderTemp["ImageHolder" + loading]);
// ------------- Rigged onEnterFrame to Properly Load Sequentially -------------
_root.onEnterFrame = function(){
if (BitmapWidths[loading] > 0){
loading++;
if(loading == Images.length){
Loading.play();
play();
delete _root.onEnterFrame;
}else{
Loading.loading.text = (loading + 1) + " of " + Images.length;
ImageLoaderTemp.createEmptyMovieClip("ImageHolder" + loading, ImageLoaderTemp.getNextHighestDepth());
ImageLoader.loadClip(Images[loading], ImageLoaderTemp["ImageHolder" + loading]);
}
}
}
stop();
Thanks!
william
View Replies !
View Related
Filter Smoothing
Hey everyone,
I have a question that google for once hasn't been able to even modestly help with.
Have you ever noticed that when you do things with filters, i.e. displacementMaps and their ilk, the graphics always have a really pixelated look at the edges?
Is there any way to cut down on this, if not stop it completely?
Thanks all,
BB0103
View Replies !
View Related
Smoothing In Fla7
hi,
i'm curently using easing/smoothing/bouncing scripts that dont work in fla7 wich sucks because 7 is so much better in performance. Any help in upgrading this will be much appreciated
here's an example:
//simple smooth preloader script, works in fla6
onClipEvent (enterFrame) {
loading = _parent.getBytesLoaded();
total = _parent.getBytesTotal();
//trouble part
percent -= (percent-((loading/total)*100))*.25;
per = int(percent);
if (percent>99) {
_parent.gotoAndStop(2);
}
}
The string thats ruins this in fla7 is:
percent -= (percent-((loading/total)*100))*.25;
It would work like this, but it wouldnt be smooth:
percent = loading/total*100;
So this is the problem, i use a lot of this variable1 += variable1*blablabla stuff and is wont run in fla7. Any ideia on how to make it work??
thank you very much in advance
View Replies !
View Related
Smoothing Out The Tween
does anyone know the code to motion tween with actionscript? i really want a super smooth tween without bumping up the fps too high, and it seems this is achieved through actionscript, but i am fairly new to the code and was wondering if anyone could head me in the right direction. thanks!
View Replies !
View Related
Bitmapdata Smoothing
I don't know if anyone here can help me. Most forums haven't been able to. I'll asume you guys know how to smooth an image using the bitmapdata class then redrawing the image.
I have an image that fills the background of my flash site and the image resizes, centers and is smoothed using bitmapdata when the stage resizes. The problem is bitmapdata draws a white edge on the image when it resizes. This changes the width and height of the image making my algorithms to center and resize the image useless. Does anyone here think they can help? If so I'll send you my code to take a look at.
Thanks.
View Replies !
View Related
Image Smoothing
I made a Flash shell movie which loads in other Swf files using MovieClipLoader. Inside those other SWFs i have animations which use graphics, png's.
Now the client wants me to resize the main movie to a smaller size.
so what I did was create yet another shell Flash movie(at smaller size), which loads in my first main movie using loadMovie. The loading works fine its just the images all look jagged and crappy. I was wondering if there was a quick workaround for this. I've tried forceSmoothing and _highquality settings, but nothing seems to work.
I'm I going to have to rebuild all my animations at a smaller size?
Do I need to go back to my first Main timeline movie and load in the animations using loadMovie, instead of MovieClipLoader?
Need an answer today! Thanks
View Replies !
View Related
Smoothing A Tween?
Hello,
Would someone please explain smoothing a tween? I'd like to add text to my movie, however Pixel Ranger tells me my tween needs to smoothed! He has been very helpful (refered me here), but he (Shane) did not tell me how to accomplish this goal!
Thanks.
View Replies !
View Related
|