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








Smoothing Issue XML Images


Hello...

I have this code in as3 that creates dynamic movieclips and adds images in dynamically via xml. I used code to smooth the bitmap before it is attached the the holder movie clip, but I run into an issue of it seeming to only work for the last image in the loop. It attaches and finds all the images with no problem but it seems to only apply smoothing to the last image in the loop.

Can any one help me out? Below is the code that I am using.

var imageList:XMLList=imageInput.image.ilink.text();
var counter:Number=0;
totalImages = imageList.length();

for each (var imageElement:XML in imageList) {

this["holder" + counter + "_mc"] = new MovieClip();

polaroid_mc.addChild(this["holder" + counter + "_mc"])
this["holder" + counter + "_mc"].x = 29.9
this["holder" + counter + "_mc"].y = 44.5

var myBitmap:Bitmap = new Bitmap();
var bitMov:MovieClip = new MovieClip();
var URLReq:URLRequest=new URLRequest(imageInput.image.ilink.text()[counter]);
var imageLoader:Loader = new Loader();
imageLoader.load(URLReq);

this["holder" + counter + "_mc"].addChild(imageLoader)

imageLoader.contentLoaderInfo.addEventListener(Eve nt.COMPLETE, loadBit);
//this["myMovieClip"+counter].addChild(bitMov);

function loadBit(event:Event):void {
myBitmap=Bitmap(imageLoader.content);
myBitmap.smoothing=true;
}



this["holder" + counter + "_mc"].alpha = 0;
counter=counter+1;
}


Thanks




FlashKit > Flash Help > Actionscript 3.0
Posted on: 12-18-2008, 08:35 PM


View Complete Forum Thread with Replies

Sponsored Links:

Smoothing Moving Images?
I have created a mac style dock using a tut from this site, but, when the images move, they look slightly blurry. Is there any way to stop this? I found this tut, but its not going to work very well with this.

http://www.flashkit.com/tutorials/In...-164/index.php

View Replies !    View Related
Allow Smoothing On Loaded Images?
If you view the properties of an image in the Library, you have the option to turn off "smoothing", which is nice if you want to use an image that appears "pixelized", you can load a small image and transform the width and height to stretch the image and show off its lovely pixels very nicely.

Can this be done with images loaded dynamically into the movie at runtime? Is there a property in AS that will control this property? Thanks!

View Replies !    View Related
Allow Smoothing Blurs Images?
Hey everyone

I have 10 images on my stage, and when I check the "Allow Smoothing", the images are very blurry when I test the movie. They are all on equal pixels.

They are a part of a menu that I tween by the x and y axis so I need them to allow smoothing, or else they chop all the way in the tweening.

But is that a choice you have to make? Blurry pictures and slick animation OR sharp pictures and bad animation?

Is there no way that I can have my images sharp with the allow smoothing property enabled?

- Rune

View Replies !    View Related
Smoothing Loaded Images
How can I set the smoothing property on a loaded image in flash 8?

I'm using moviecliploader to bring them in, but now I don't know what to do. The help only refers to smoothing on the attachBitmap section, but this is not what I want, and it seems to be only for stuff loaded from the library.

View Replies !    View Related
Allow Smoothing For Multiple Images?
Let's say I have an image sequence that I want to import into the library..

I can only select one bitmap in my library to bring up the properties box, which allows me to check the smoothing option. Now is there a way to select multiple bitmaps within the library to change that setting for all of them at once? Or do I have to manually go in there and check the box 100 times? Any help would be greatly appreciated!

View Replies !    View Related
Smoothing An Array Of Movieclip (images)
Hi guys,

I am trying to use the method at http://www.webdesignmo.com/blog/2008...hing-in-flash/ for smoothing out images in AS.

The only problem I have is that the images are already loaded in to a movieclip, which is then added to an array.

How do I

- Loop though the array
- get the bitmap data from the movieclip
- smooth the bitmap data
- add the smoothed bitmap back into the movieclip
- then add that movieclip back into the array, in the same index?

I am really stuck with this one, so any help would be much appreciated

View Replies !    View Related
Bitmap Smoothing W/ Loaded Images
I know there was a lot of stuff about this for AS2, but I cant seem to find anything more recent—and I am still having this problem! I have a sprite, with a loader (which I dont add to the stage). The loader loads a large image, scales it way down and then draws it. No matter how I do this, the resulting Image is always aliased. Setting the stage quality to 'best' did resolve this, but the site took too much of a performance hit otherwise.

I have tried:
1. adding the loader to the stage, and setting smoothing to true when content loads
2. creating a new bitmap on load, with smoothing set to true (both in constructor and after)
3. creating a shape on load and using bitmap fill, with smoothing on

Sample code for all three is below, but #3 is the one I really want to use, because I need 9-slice scaling. What am I doing wrong?!!







Attach Code

=== #1 ===
_imageLoader = addChild(new Loader()) as Loader;
...
var bitmap = _imageLoader.content as Bitmap;
bitmap.scaleX = bitmap.scaleY = scaleFactor;
bitmap.smoothing = true;


=== #2 ===
_imageLoader = new Loader();
...
var bitmap:Bitmap = addChild(new Bitmap()) as Bitmap;
bitmap.bitmapData = (_imageLoader.content as Bitmap).bitmapData;
bitmap.scaleX = bitmap.scaleY = scaleFactor;
bitmap.smoothing = true;


=== #3 ===
_imageLoader = new Loader();
...
_imageBMData = (_imageLoader.content as Bitmap).bitmapData.clone();
_image = addChild(new Shape()) as Shape;
_image.graphics.beginBitmapFill(_imageBMData, scaleMatrix, false, true);
_image.graphics.drawRect(...);

View Replies !    View Related
Smoothing Images Using BitmapData And MovieClip.attachBitmap
When you load an image into a MovieClip then use that as the data source to draw() into a BitmapData object, the documentation says "Optionally, you can specify whether the bitmap should be smoothed when scaled. This works only if the source object is a BitmapData object." To me that implies that a second BitmapData object is needed in order for the optional [smooth:Boolean] parameter to work when set to true.

We found we didn't need to "double buffer" in this way when using MovieClip.attachBitmap() with the [smoothing:Boolean] parameter set to true. We did run into another problem though. This problem only manifests itself when you run the SWF as part of an HTML file running from a local web server like http://127.0.0.1. Here's the problem: images are loaded dynamically (URL's pulled from assets.xml) and the ones that are loaded locally from a directory on the same machine load and are smooth and distortion free. Other URL's point to a remote host. The images loaded via a remote source (example) do not "smooth nicely" running the exact same code as the local images. The remote images are shimmery and exhibit update artifacts. If you run the exact same page not via an http:// web sever i.e. - just loading the html page into the IE, then the remote images do get nice smoothing when animated.

Is there some magic to get BitmapData loaded from a remote source to smooth correctly when run from a local web sever? For our internal demo we removed any remote URLs so we could demonstrate that Flash does provide the ability for nice smooth animations but it would be a good problem to solve.

I'm thinking this is some type of security sandboxing Flash Player control feature.

Mark

View Replies !    View Related
Turn Smoothing On And Off Dynamically Loaded Images.
Hi all.

I have searched and searched AND SEARCHED. but i cant seem to find the answer to whether you can turn smoothing on and off of dynamically loaded images. I have found tutorials on how to do this with embedded images but i need to dynamically load images and as they will be resizing on the fly i need to make all 36 images toggle smoothing on and off and having them all load in with smoothing on makes the file run extremely jerky as the smoothing is a major resource hog.

ANY HELP is appreciated.

View Replies !    View Related
AS2 - Image Smoothing In Flash 8 Using Dynamically Loaded Images
I have a flash slideshow widget I've developed in Flash 8.. it pulls in images from a folder and text via xml. Unless I use images which are 2000x2000+ resolution and 150+ dpi when they zoom in/out in the movie they are really shaky. I have a feeling this has to do with image smoothing in flash 8.

Can anyone help me fix this? I'll pay.

You can reach me at amh@1dawg.com & ill send u the source so u can take a look.

Here are some links I found:

http://www.kaourantin.net/2005/12/dy...maps-with.html

http://www.flepstudio.org/forum/tuto...istortion.html

Thanks.

Austin

View Replies !    View Related
[F8] Dynamically Loading .png Images, How To "allow Smoothing"
Greetings all,
i'm working on a project where i am dynamically loading .png images (getting them from XML, currently using loadMovie), and since i am rotating these images (randomly), i need to find a way to have the "allow smoothing" option enabled... otherwise they obviously come out w/ .jpg compression (since that is the Flash default) and look like total poo when rotated.

is there a way to use loadMovie (or some other method), load a .png, and tell Flash to allow smoothing / or treat it as Lossless GIF/PNG?

As always,
TIA

View Replies !    View Related
Is There Anyway To Batch "allow Smoothing" On Images?
Hello,

I have a 300 images that run as a frame by frame animation and i am wondering if there is a way to allow smoothing on all the library images instead of doing them one by one.

thanks in advance!

View Replies !    View Related
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
Odd Issue With Images With Fades
Hey,

For some reason on some of my fades (namely the titanic painting and the baseball player) when it fades through them it looks like the paiting "jumps" to the side. What's up with this?

http://www.weathersdesign.com/adair/

It is in the same EXACT position throughout the whole fade.

Anyone know about this?

Thanks!

Seth

View Replies !    View Related
Issue Looping Images From XML
First, I am new to AS and appologize for my coding.
I have a slideshow that plays, while pulling images from XML. The problem I am having is that I can't seem to get it to loop. It loads up and runs through all the images, but after the last one, I get a list of errors. Starting with RangeError #2066. Please help point me in the right direction.


Code:
var fadeTween:Tween;
var images:Array = new Array();
var time:Array = new Array();
var currentimage = 0;
var i:Number = 0;
var maximage = 0;
var loader:URLLoader = new URLLoader(new URLRequest("http://www..photogallery_fish2.aspx"));
function loadXML ()
{
loader.addEventListener (Event.COMPLETE, onLoadSuccess);
loader.addEventListener (IOErrorEvent.IO_ERROR, onLoadFailure);
}
var myTimer:Timer = new Timer(1000);// 1 second
myTimer.addEventListener (TimerEvent.TIMER, loop);
function loop (event:TimerEvent):void
{
currentimage++;
loadimage ();
}
currentimage = 0;
function onLoadSuccess (event:Event):void
{
var loader:URLLoader = URLLoader(event.target);
var myXML:XML = XML(loader.data);
myXML.ignoreWhitespace;
maximage = myXML..image.length();
var number:int = 0;
for each (var property:XML in myXML..image)
{
images[number] = myXML..image[number].@source;
time[number] = myXML..image[number].@time;
number++;
}
loadimage ();
}
function onLoadFailure (event:Event):void
{
trace ("Error loading file: " + event.type);
}
function loadimage ():void
{
picload.source = images[currentimage];
picload.refreshPane ();

var newdelay = time[currentimage]*100;
myTimer.delay = newdelay;
myTimer.reset ();
myTimer.start ();

}
loadXML ();

View Replies !    View Related
MovieClipLoader Issue With Images
Has anyone else found a problem with loading images using the MovieClipLoader class? I have found that it has a problem reading the BytesTotal and it doesn't seem to be a flash based problem but rather a Browser problem. When I ran into the problem Fireworks was showing the Bytes Loaded and Bytes Total the same. WHere Internet Explorer 6 was showing the bytes Total as 0 all the way through. Camino for OSX was working fine. The images all loaded fine in the end but the data was wrong. I thought maybe this was security settings or something but I turned off my firewall and still had a problem. Then I tested it by bringing my images into flash and creating SWF files for each image. This fixed the problem, but of course it will not work for every situation. I am guessing a fix would be to have a preloader that detects the issue and if there is a problem it would just indicate that that the item is loading and not show detailed status, but if there is a fix that would be great. Also, I am wondering if anyone else has had this problem?

Please let me know and if I find a fix I will let you know

Also, it worked fine in the Flash Publish Preview Environment.

View Replies !    View Related
ScrolllPane Loading Images Issue
I have two scrollPanes on my stage, one is called "thumbs" the other is called "myScrollpane". When I click on a thumb image that image gets loaded into myScrollPane. This parts working ok.

What, I am having trouble with is getting my thumb images to display in my thumbs scrollpane. I have a movieclip called thumb_mc which containes a Loader component. I can get the thumb_mc to load into the thumbs scrollPane, but I can't get my images to display in the thumbs Loader component. What am I doing wrong?

Code:
var myScrollPane:mx.containers.ScrollPane;
myScrollPane.contentPath = 'Holder_mc';
thumbs.contentPath = 'container_mc';
//////////////////////////////////////////////////////////////////
MyPicVars = new LoadVars();
MyPicVars.load("Dadphotos.txt");
MyPicVars.onLoad = function(success) {
if (success) {
var t_mc:MovieClip;
Rc = this["DLc"];
//trace(Rc);
for (i=0; i<=Rc-1; i++) {
t_mc = _root.thumbs.content.attachMovie("thumb_mc", "mc"+i, i, this.getNextHighestDepth());
t_mc._x = 5;
t_mc._y = 5+(i*80);
t_mc.i = i;
t_mc.location = this["pic"+i];
t_mc.t_loader.contentPath("Dadphotos/"+this.location);
thumbs.invalidate();
t_mc.onRelease = function() {
//load image into pictures scroll pane
trace(this.location);
myScrollPane.content.myLoader.contentPath = "Dadphotos/"+this.location;
myScrollPane.invalidate();
};
}
} else {
trace("not loaded");
}
};

View Replies !    View Related
Pulling Dynamic Images/JS Issue
Hi All,

I have a problem I was hoping I could get some help with. I am using Zoomify (www.zoomify.com) to zoom in on products. The products are loaded up dynamically based on a sting that is passed after the URL. Example: http://www.grjd.com/zoom/dynamic.htm...mifyMinZoom=25

Problem is I am unable to get rid of IE’s ‘click to activate this control’ annoyance. Typically I use the general JS’s out there to remedy the issue, however the javascript that is currently available doesn’t jive with the javascript in the HTML (see below) that declares the variables that in turn pull in the dynamic images.

Does anyone have a remedy for this? Any help would VERY MUCH be appreciated.

Thanks,

Greg.

HTML Code:

<script language="javascript">
var urlString = document.location.href;
var paramIndex = urlString.indexOf("?")+1;
var paramString = urlString.substring(paramIndex,urlString.length);

document.write("<OBJECT CLASSID='clsid27CDB6E-AE6D-11cf-96B8-444553540000'");
document.write("CODEBASE='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0'");
document.write("WIDTH='503'");
document.write("HEIGHT='385'");
document.write("ID='theMovie'>");
document.write("<PARAM NAME='src' VALUE='zoomifyDynamicViewer.swf'>");
document.write("<PARAM NAME='FlashVars' VALUE='" + paramString + "' >");
document.write("<EMBED SRC='zoomifyDynamicViewer.swf'");
document.write("FlashVars='" + paramString + "'");
document.write("PLUGINSPAGE='http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash'");
document.write("WIDTH='503'");
document.write("HEIGHT='385'");
document.write("NAME='theMovie'>");
document.write("</EMBED>");
document.write("</OBJECT>");
</script>

View Replies !    View Related
Dynamicly Moving Images Issue
I am working on a image slider. Pretty simple really its controlled by mouse position on stage. If its on the right the images slide to the right etc. once the image slides of the stage it gets moved to the other side behind the other images. It works with one problem the after a while the images start running into each other as they dont appear to be getting placed correctly or moving at the same speed. Not sure why some movie clips would be moving at different speeds then others when its the same code. The code is pretty simple so I am not sure what is breaking it.

the code is pretty simple I have a container mc called newsB in that are dynamicly created clips that hold the news images as you mouse over either the right side of the stage or left they move in that direction. if the newsMC goes of the stage it is relocated to the other side at the end of all the clips. It works but is bugy in the sense that images eventually start to run into each other.

Code:


function Scroll(Lspeed) {
if (_xmouse>Stage.width/2) {
for (p=0; p<=newsCount; p++) {
_root.newsB['newsMC'+p]._x = _root.newsB['newsMC'+p]._x-Lspeed/10;
if (_root.newsB['newsMC'+p]._x+newsMcWidth<0) {
_root.newsB['newsMC'+p]._x = wraperWidth-1;
}
}
}
if (_xmouse<Stage.width/2) {
for (p=0; p<=newsCount; p++) {
_root.newsB['newsMC'+p]._x = _root.newsB['newsMC'+p]._x+(Lspeed*-1)/10;
if (_root.newsB['newsMC'+p]._x>wraperWidth) {
_root.newsB['newsMC'+p]._x = 1-newsMcWidth;
}
}
}

}
var intervalId:Number;
function executeCallback():Void {
Scroll((_root._xmouse-Stage.width/2)/4);
}
intervalId = setInterval(this, "executeCallback", 20);
hope that makes sense
thanx dave

View Replies !    View Related
Rectangle Around Textbox And Images Issue
Hello people,

My question applies only when I work in 16 bit system resolution, so when I apply some text and apply 'Anti-alias for readability' with embedded chars, there is some strange filled rectangle showing around the text box. The same applies when I add any kind of filter to a text or image. You may see the exact problem by clicking on the link below:

http://img262.imageshack.us/img262/5171/ingmarksb2.swf

- Notice the rectangle around the text boxes ('anti-alias for readability' applied, it doesn't matters is it static or dynamic text)
- Notice the rectangle around the middle dark-gray box with glowing effect applied

I will say again, this problem occurs only in 16 bit system resolution, it is not applying in 32 bit. Is it possible that this is a nasty bug, or there is solution?
Please help me because this is getting really frustrating.
I am using Adobe Flash CS4, before that I used Macromedia Flash 8. Nothing changed since then.
Thank you for any possible answer

Ognen

View Replies !    View Related
Pulling Dynamic Images/JS Issue
Hi All,

I have a problem I was hoping I could get some help with. I am using Zoomify (www.zoomify.com) to zoom in on products. The products are loaded up dynamically based on a string that is passed after the URL. Example: http://www.grjd.com/zoom/dynamic.htm...mifyMinZoom=25

Problem is I am unable to get rid of IE’s ‘click to activate this control’ annoyance. Typically I use the general JS’s out there to remedy the issue, however the javascript that is currently available doesn’t jive with the javascript in the HTML (see below) that declares the variables that in turn pull in the dynamic images.

Does anyone have a remedy for this? Any help would VERY MUCH be appreciated.

Thanks,

Greg.

HTML Code:

<script language="javascript">
var urlString = document.location.href;
var paramIndex = urlString.indexOf("?")+1;
var paramString = urlString.substring(paramIndex,urlString.length);

document.write("<OBJECT CLASSID='clsid27CDB6E-AE6D-11cf-96B8-444553540000'");
document.write("CODEBASE='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0'");
document.write("WIDTH='503'");
document.write("HEIGHT='385'");
document.write("ID='theMovie'>");
document.write("<PARAM NAME='src' VALUE='zoomifyDynamicViewer.swf'>");
document.write("<PARAM NAME='FlashVars' VALUE='" + paramString + "' >");
document.write("<EMBED SRC='zoomifyDynamicViewer.swf'");
document.write("FlashVars='" + paramString + "'");
document.write("PLUGINSPAGE='http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash'");
document.write("WIDTH='503'");
document.write("HEIGHT='385'");
document.write("NAME='theMovie'>");
document.write("</EMBED>");
document.write("</OBJECT>");
</script>

View Replies !    View Related
Issue With Loading External Images
I have no problem getting the image to load and even preloading the image. I wonder if I'm doing it the best way still, however, when I get it to load I dont know how to exit the loop and do something else.

What I'm trying to do is keep it on frame 1 while the image loads. When the image is fully loaded tell it to gotoAndPlay(2); but it's freakin out on me so I know my code is screwy.

on frame 1 I have all of the following:


Code:
stop();
image1.loadMovie("boxcovers/a67837_140h.jpg");
_root.onEnterFrame = function(){
infoTotal1 = image1.getBytesTotal();
infoLoaded1 = image1.getBytesLoaded();
percentagea = Math.floor(infoLoaded1/infoTotal1*100);
trace (percentagea);
bar._width = percentagea/2;
if (percentagea >= 100){
gotoAndPlay(2);
}
}
Now I have a movieclip instance named image1 - that loads the image no problem.
bar is my progress bar and since I'm loading a small image i wanted it to be 100 in half hence the /2 on the end.

If I keep the if statement at the very bottom commented out the image loads perfectly with the progress bar etc. and it stays on frame 1. The problem is when I leave that if statement in there it instantly goes to frame 2 before it ever finishes loading AND it doesnt play on frame 2. it goes there and stops which I dont even have a stop there.

Help is much appreciated

Thanks,
Cub

View Replies !    View Related
Preleaod XML Gallery Images - Issue
Hello all, (did a search on this and nothing that 100% addressed my problem was found)

I have created a scrolling XML based image gallery using a mix of differant tutrials around the web. The gallery works great and im happy with it, but when i came to add a preloader to the gallery it did not work.

Pre Loader script
frame 1

Code:
bytes_loaded = Math.round(_root.getBytesLoaded());
bytes_total = Math.round(_root.getBytesTotal());
getPercent = bytes_loaded/bytes_total;
_root.loadBar._width = getPercent*100;
_root.loadText = Math.round(getPercent*100)+"%";
if (bytes_loaded == bytes_total) {
_root.gotoAndStop(3);
}
frame 2

Code:
gotoAndPlay(1);
Min thumbnail code frame 3

Code:
function loadXML(loaded) {
if (loaded) {
xmlNode = this.firstChild;
thumbnails = [];
total = xmlNode.childNodes.length;
for (i=0; i<total; i++) {
thumbnails[i] = xmlNode.childNodes[i].childNodes[2].firstChild.nodeValue;
thumbnails_fn(i);
}
firstImage();
} else {
content = "file not loaded!";
}
}
xmlData = new XML();
xmlData.ignoreWhite = true;
xmlData.onLoad = loadXML;
xmlData.load("images1.xml");
/////////////////////////////////////

function thumbNailScroller()
{
this.createEmptyMovieClip("tscroller", 1000);
scroll_speed = 30;
tscroller.onEnterFrame = function() {
if ((_root._ymouse>=thumb_mc._y) && (_root._ymouse<=thumb_mc._y+thumb_mc._height))
{
if ((_root._xmouse>=(hit_right._x-40)) && (thumb_mc.hitTest(hit_right)))
{
thumb_mc._x -= scroll_speed;
} else if ((_root._xmouse<=40) && (thumb_mc.hitTest(hit_left)))
{
thumb_mc._x += scroll_speed;
}
} else
{
delete tscroller.onEnterFrame;
}
};
}

function thumbnails_fn(k)
{
thumb_mc.createEmptyMovieClip("t"+k, thumb_mc.getNextHighestDepth());
tlistener = new Object();
tlistener.onLoadInit = function(target_mc)
{
target_mc._x = hit_left._x+(eval("thumb_mc.t"+k)._width+5)*k;
target_mc.pictureValue = k;
target_mc.onRelease = function()
{
_global.p = this.pictureValue-1;
getURL("javascript:Image('images1.html?p="+_global.p+"')");
//getURL("image.swf","_blank");
};
target_mc.onRollOver = function()
{
this._alpha = 50;
thumbNailScroller();
};
target_mc.onRollOut = function()
{
this._alpha = 100;
};
};
image_mcl = new MovieClipLoader();
image_mcl.addListener(tlistener);
image_mcl.loadClip(thumbnails[k], "thumb_mc.t"+k);
}

Basically I put the preloader on the first two frames of the movie and the content on the thired, once loaded the preloader takes you to frame three (content frame).
Now I think that preloader is loading the page fine but since the xml gallery is populated dynamically once the xml function is loaded the preloader only preloads a small movieclip before its actiually filled with images.


Here is the file (site) I have been working on, I would appreaciate it if a more experianced user of flash could skim over and tell me where im going wrong. I have tried to add a preloader within the loop that populates the gallery but have had no lucl. any help is appreaciated.

View Replies !    View Related
Rectangle Around Textbox And Images Issue
Hello people,

My question applies only when I work in 16 bit system resolution, so when I apply some text and apply 'Anti-alias for readability' with embedded chars, there is some strange filled rectangle showing around the text box. The same applies when I add any kind of filter to a text or image. You may see the exact problem by clicking on the link below:

http://img262.imageshack.us/img262/5171/ingmarksb2.swf

- Notice the rectangle around the text boxes ('anti-alias for readability' applied, it doesn't matters is it static or dynamic text)
- Notice the rectangle around the middle dark-gray box with glowing effect applied

I will say again, this problem occurs only in 16 bit system resolution, it is not applying in 32 bit. Is it possible that this is a nasty bug, or there is solution?
Please help me because this is getting really frustrating.
I am using Adobe Flash CS4, before that I used Macromedia Flash 8. Nothing changed since then.
Thank you for any possible answer

Ognen

View Replies !    View Related
Pulling Dynamic Images/JS Issue
Hi All,

I have a problem I was hoping I could get some help with. I am using Zoomify (www.zoomify.com) to zoom in on products. The products are loaded up dynamically based on a sting that is passed after the URL. Example: http://www.grjd.com/zoom/dynamic.html?zoomifyImagePath=back/&zoomifyZoom=25&zoomifyMinZoom=25

Problem is I am unable to get rid of IE’s ‘click to activate this control’ annoyance. Typically I use the general JS’s out there to remedy the issue, however the javascript that is currently available doesn’t jive with the javascript in the HTML (see below) that declares the variables that in turn pull in the dynamic images.

Does anyone have a remedy for this? Any help would VERY MUCH be appreciated.

Thanks,

Greg.

HTML Code:

<script language="javascript">
var urlString = document.location.href;
var paramIndex = urlString.indexOf("?")+1;
var paramString = urlString.substring(paramIndex,urlString.length);

document.write("<OBJECT CLASSID='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000'");
document.write("CODEBASE='

View Replies !    View Related
Issue With External Images Loading
I have a little gallery that I made (nothing terribly complicated) and would like the images to fully load before they fade in. So the process would be, first image loads in, click next, preloader bar shows over the current image (still showing), then once fully loaded, replaces the last image with the new one fading it in... hopefully that makes sense...

why does this not work? i'm using a movie clip loader...









Attach Code

p = 0;

var img_mcl = new MovieClipLoader();//create an instance of MovieClipLoader

img_mcl.onLoadStart = function (target) {
trace(image[p] + " started loading at = " + img_mcl.getProgress(target));
};

img_mcl.onLoadProgress = function (target, loaded, filesize) {
trace(image[p] + " still loading... " + loaded);
preloader_mc._visible = true; //shows preloader
preloader_mc.load_mc._xscale = 100 * loaded/filesize; //expands the loader in relation to the loaded total
};

img_mcl.onLoadComplete = function (target, loaded) {
preloader_mc._visible = false; //hides the preloader
trace(image[p] + " done loading.");
trace("total loaded: " + loaded);
image_mc._alpha = 0;
fadeIn(image_mc); //fade in image
};

img_mcl.onLoadInit = function (target) {
//trace(image[p] + " is now initialized");
};

img_mcl.onLoadError = function (target, errorCode) {
//trace("ERROR: " + errorCode);
};

function nextImage() {
if (p < (total-1)) {
p++;
if (loaded == filesize) {
img_mcl.loadClip(image[p], "image_mc");
}
}
};

function firstImage() {
if (loaded == filesize) {
img_mcl.loadClip(image[0], "image_mc");
}
};

function fadeIn(_mc) {
_mc._alpha = 0;
_mc.onEnterFrame = function() {
if (_mc._alpha < 100) {
_mc._alpha += 10; //fades in image
}
};
};

View Replies !    View Related
Loading Images And Resolution Issue
Hello All.
I seem to be having a silly issue in loading jpegs through an xml file. When images show up the resolution is completley shot! can someone please explain..whats going on.. Much appreciated. Kind of urgent so a response would be appreciated.

View Replies !    View Related
Issue With Linked Images (HTML)
Hi guys!

Long time lurker - first post .

I'm having some problems with loading linked images into Flash. The code is in HTML and stored in an external file on my server. This is an issue I just haven't found any solutions to, and I'm hoping someone here has some good pointers.

Let me start by providing you with the simple HTML code that's causing me the headaches:


Code:
<a href="http://www.link.com/link.html" target="_blank"><img src="getAdobeReader.gif"></a>
Now, at first everything looks just fine; the image is loaded and placing the mouse over the image correctly indicates that this is a link by changing the "pointy hand" icon. However, when trying to press the button nothing happens. When moving the mouse outside of the button it still looks like a hand. Now, when pressing the linked button a second time a new IE window opens and the correct URL loads correctly. The strange thing is, that the mouse needs to change position over the button before pressing the second time, otherwise it doesn't work (!). When replacing the image with a simple textlink instead it works perfectly.

Anyone ever seen this before? You can see this issue on the website I'm working on at this moment (work in progress mind you! ).

http://www.sjostaden2.se

Press the second button on the top menu (Föreningar), and then "Stadgar" on the left menu. You'll see the "get Adobe Reader" button on the right.

Thank you in advance!

Regards,
Patrick J.

View Replies !    View Related
Dynamically Loading Images Issue//
I'm doing a site where I have a main movie and sub movies that I load using the loadMovie command. In one of the sub movies I want to dynamically load images into a blank movie clip. I can get the images to load if the sub movie is viewed on it's own but, when the sub movie is loaded into the Main movie the images won't load. I guess I'm not sure what to replace the "_root" with. Here's the code (pic_holder is the blank clip):

on (release) {
_root.pic_holder.loadMovie("test1.jpg");
}

Since "_root" always references the Main move I tried the following variations with no success:

on (release) {
_parent.pic_holder.loadMovie("test1.jpg");
}

and

on (release) {
this.pic_holder.loadMovie("test1.jpg");
}


thanks

View Replies !    View Related
Loading Images And Resolution Issue
Hello All.
I seem to be having a silly issue in loading jpegs through an xml file. When images show up the resolution is completley shot! can someone please explain..whats going on.. Much appreciated. Kind of urgent so a response would be appreciated.

View Replies !    View Related
Images Within TextField (inline Issue)
Hi all,

Using a stylesheet and textfield, I know I can take some XML and create some styles text with rollovers and different fonts styles / sizes.
I've been trying to get this to work and have 2 issues, the first being quite minor.

The first issue is that if I wrap the XML data in CDATA, it's blank, although if I trace everything, it's there.
Taht's a minor issue at the moment though:

My major issue comes with this:
If I want to have some icons like smileys in a string of text, how do I get the images to follow inline?
I have everything set up correctly (as correctly as I think it should be and have read), but the text always breaks if there's an image.
If I change the CSS to inline, rather than block there's still no difference.

A solution I've thought of could be to scrap the stylesheet method and just leave the space where the icon would go blank.
Then use textwidth / character index and attach the icon graphic at the point found, but that would be quite a mission to calculate.

Anyway, here's the stuff I've got at the moment (attached all in zip file, but class codes below as well for a quick check )

Anybody have some suggestions?
Is this impossible?

Main class (document class)
Code:

package Smiley {
   
   import flash.text.TextField;
   import flash.display.MovieClip;
   
   public class Main extends MovieClip {
      
      private var __txt : TextField;
      
      public function Main() {
         
         __txt = this["txt"];
         __txt.background = true;
         __txt.multiline = true;
         
         new Style( __txt );
         new XMLData();
      }
   }
}


Style class
Code:

package Smiley {
   
   import flash.text.TextField;   
   import flash.events.Event;
   import flash.events.HTTPStatusEvent;
   import flash.events.IOErrorEvent;
   import flash.events.SecurityErrorEvent;
   import flash.net.URLLoader;
   import flash.net.URLRequest;
   import flash.text.StyleSheet;
   
   public class Style {
      
      private var __ss : StyleSheet;
      private var __txt : TextField;
      private static var __loader : URLLoader;
      
      public function Style( t : TextField ) {
         
         __txt = t;
         __ss = new StyleSheet();
         
         // set listeners to handle CSS loading
         __loader = new URLLoader();
         __loader.addEventListener( Event.COMPLETE, onLoaded);
         __loader.addEventListener( IOErrorEvent.IO_ERROR, handleIOError );
         __loader.addEventListener( HTTPStatusEvent.HTTP_STATUS, handleHttpStatus );
         __loader.addEventListener( SecurityErrorEvent.SECURITY_ERROR, handleSecurityError );
      }
      
      
      public static function loadStyles() : void {
         __loader.load( new URLRequest("example.css") );
      }
      
      
      private function onLoaded( e : Event ) : void {
         trace("CSS: onLoaded");
         __ss.parseCSS(__loader.data);
         parseStyle();
      }
      private function handleHttpStatus( e : HTTPStatusEvent ) : void {
         trace("CSS: HTTPStatusEvent");
      }
      private function handleIOError( e : IOErrorEvent ) : void {
         trace("CSS: IOErrorEvent");
      }
      private function handleSecurityError( e : SecurityErrorEvent ) : void {
         trace("CSS: SecurityErrorEvent");
      }
      
      private function parseStyle() : void {
         __txt.styleSheet = __ss;
         __txt.htmlText = XMLData.xml;
      }
   }
}


XMLData class
Code:

package Smiley {
   
   import flash.events.*;
   import flash.net.URLLoader;
   import flash.net.URLRequest;
   
   public class XMLData {
      
      public static var xml : XML;
      
      private var __loader : URLLoader;
      
      public function XMLData() {
         
         // set listeners to handle xml loading
         __loader = new URLLoader();
         __loader.addEventListener( Event.COMPLETE, onLoaded);
         __loader.addEventListener( IOErrorEvent.IO_ERROR, handleIOError );
         __loader.addEventListener( HTTPStatusEvent.HTTP_STATUS, handleHttpStatus );
         __loader.addEventListener( SecurityErrorEvent.SECURITY_ERROR, handleSecurityError );
         
         // initialise by loading the xml
         __loader.load( new URLRequest("example.xml") );
      }
      
      private function onLoaded( e : Event ) : void {
         trace("XML: onLoaded");
         xml = new XML(e.target.data);
         Style.loadStyles();
      }
      private function handleHttpStatus( e : HTTPStatusEvent ) : void {
         trace("XML: HTTPStatusEvent");
      }
      private function handleIOError( e : IOErrorEvent ) : void {
         trace("XML: IOErrorEvent");
      }
      private function handleSecurityError( e : SecurityErrorEvent ) : void {
         trace("XML: SecurityErrorEvent");
      }
   }
}


Example.css
Code:

myText {
   font-weight:normal;
   color:#000000;
   display:block;
}


Example.xml
Code:

<?xml version="1.0"?>
   <myStyleText>
      <myText>This is some text, <img src="smiley.gif" width="19" height="19" vspace="-5" hspace="0" border="0" /> which should not break.</myText>
      <myText><![CDATA[This is some text, <img src="smiley.gif" width="19" height="19" vspace="-5" hspace="0" border="0" /> which should not break.]]></myText>
   </myStyleText>

View Replies !    View Related
[F8] Preloading Issue- Images In Html Page
Im redesigning a site atm, and Im looking for a way to load images with flash instead of the old "one at a time"-oldfashioned way. I have 24 100x100 images to load so it wont look that nice if they don't load all together.

This is the site:
http://www.olssongerthel.se/nytt/index.html

Im also going to add a dhtml script that adds an OnMouse function which I don't know how to do in flash.. so Im looking for a way to make a flash preloader for the site, but the site itself shouldn't be flash.

I want a flash loader on top of the images (floating if possible) that loads all the images on the page, but the page itself shouldn't contain any flash after the loading is complete, because I'd like to use the dhtml script...


Is it possible? Anyone got any viable solutions?

View Replies !    View Related
No One Would Answer This On The Other Forum [F8] Scrolling Images Issue
I have six images that continuously scroll on mouseover, with only three visible at a time. On mouseout, not only do they need to ease while they stop scrolling, but they need to land back on the first three images.

Can anyone help with this code? I've been all over the web and flash forums and seen very similar issues, but so far haven't seen any code regarding the repositioning exactly where it started. This is my first post, I'm not very experienced with advanced actionscript... thanks!

View Replies !    View Related
Loading Images In Dynamically Created MC Issue
Hello !

i've been confronting myself to this issue for 5 hours now, i'm in need of help from the outside world

i'm trying to load a series of external jpg images.
What to be loaded is stored in an external xml file, which indicates the folder along with the file name pattern and the number of images. This is handy since images are numbered incrementally (image_1.jpg, image_2.jpg...)
Finally, i need to position these images as a strip, that is, one next to each other horizontally.

I get the info out of the xml file without issue, the url are correct (if i paste them in the browser, i see the image file) yet, it seems there is an issue with my loading mc code. Can you check and tell me what i'm doing wrong please?


ActionScript Code:
function doStrip(obj:XML)
{
    var project = obj.firstChild;
    var sequences = project.childNodes;
    var project_width:Number = 0;
    var pointerXpos:Number = 0;
    var totalImageCounter:Number = 0;
    var stripContainer:MovieClip = this.createEmptyMovieClip("stripContainer", this.getNextHighestDepth());
    stripContainer._x = 0;
    stripContainer._y = 0;
    stripContainer._height = 200;
    for (var i = 0; i<sequences.length; i++)
    {
        var folder:String = sequences[i].attributes['folder'];
        var numOfImages:Number = Number(sequences[i].attributes['numOfImages']);
        var type:String = sequences[i].attributes['type'];
        var namePattern:String = sequences[i].attributes['namePattern'];
        var imgWidth:Number = Number(sequences[i].attributes['imgWidth']);
        var sequenceWidth:Number = Number(numOfImages*imgWidth);
        project_width += sequenceWidth;
        for (var j = 1; j<=numOfImages; j++)
        {
            totalImageCounter++;
            var filename:String = namePattern.replace('#', j);
            var fileToLoad:String = absoluteUrl+'/'+project_folder+'/'+folder+'/'+filename;
            pointerXpos = Number(pointerXpos+imgWidth);
            instance = 'image'+totalImageCounter;
            var myimg:MovieClip = stripContainer.createEmptyMovieClip(instance, stripContainer.getNextHighestDepth());
            myimg.loadMovie(fileToLoad);
            myimg._x = pointerXpos;

        }
    }
}

Thanks a lot in advance, i look forward to reading your advises!

View Replies !    View Related
Image Gallery -- Issue Transitioning Between Images
I have an image gallery that is supposed to load an image pause on that image while loading the next and then fade out/fade in simultaneously. The script seems right to me except when it comes to which function is supposed to run mc_01up or mc_02up.

Code:
if (current == 1) {
mc_02_up();
} else {
mc_01_up();
}
Any help would be greatly appreciated.

-developmental

--Script--

Code:
//setup
delay = 3000;
filename = ["01.jpg", "02.jpg", "03.jpg"];
path1 = "http://130public.net/test_area/image_gallery/images/welcome/01/";
path2 = "http://130public.net/test_area/image_gallery/images/welcome/02/";
i = filename.length;
k = Math.floor(Math.random()*i);
//
mc_01.onEnterFrame = function() {
filesize = mc_01.getBytesTotal();
loaded = mc_01.getBytesLoaded();
preloader._visible = true;
if (loaded != filesize) {
preloader.preload_bar._xscale = 100*loaded/filesize;
} else {
preloader._visible = false;
}
};
//
function first_image() {
mc_01._alpha = 0;
mc_01.loadMovie(path1+filename[k], 0);
var current = 1;
if (loaded == filesize) {
fadein = new mx.transitions.Tween(mc_01, "_alpha", null, this._alpha, 100, 10, false);
slideshow();
}
}
//
function slideshow() {
myInterval = setInterval(pause_slideshow, delay);
function pause_slideshow() {
clearInterval(myInterval);
if (current == 1) {
mc_02_up();
} else {
mc_01_up();
}
}
}
//
function mc_01_up() {
var current = 1;
var fadeListener:Object = new Object();
fadeListener.onMotionFinished = function() {
mc_02.loadMovie(path2+filename[k], 0);
mc_02.onLoad = slideshow();
};
fadein = new mx.transitions.Tween(mc_01, "_alpha", null, this._alpha, 100, 10, false);
fadeout = new mx.transitions.Tween(mc_02, "_alpha", null, this._alpha, 0, 10, false);
fadeout.addListener(fadeListener);
}
//
function mc_02_up() {
var current = 2;
var fadeListener:Object = new Object();
fadeListener.onMotionFinished = function() {
mc_01.loadMovie(path1+filename[k], 0);
mc_01.onLoad = slideshow();
};
fadein = new mx.transitions.Tween(mc_02, "_alpha", null, this._alpha, 100, 10, false);
fadeout = new mx.transitions.Tween(mc_01, "_alpha", null, this._alpha, 0, 10, false);
fadeout.addListener(fadeListener);
}
//
first_image();
stop();
--Files--
.FLA
.SWF
.HTML

View Replies !    View Related
Loading Images In Dynamically Created MC Issue
Hello !

i've been confronting myself to this issue for 5 hours now, i'm in need of help from the outside world

i'm trying to load a series of external jpg images.
What to be loaded is stored in an external xml file, which indicates the folder along with the file name pattern and the number of images. This is handy since images are numbered incrementally (image_1.jpg, image_2.jpg...)
Finally, i need to position these images as a strip, that is, one next to each other horizontally.

I get the info out of the xml file without issue, the url are correct (if i paste them in the browser, i see the image file) yet, it seems there is an issue with my loading mc code. Can you check and tell me what i'm doing wrong please?


ActionScript Code:
function doStrip(obj:XML){    var project = obj.firstChild;    var sequences = project.childNodes;    var project_width:Number = 0;    var pointerXpos:Number = 0;    var totalImageCounter:Number = 0;    var stripContainer:MovieClip = this.createEmptyMovieClip("stripContainer", this.getNextHighestDepth());    stripContainer._x = 0;    stripContainer._y = 0;    stripContainer._height = 200;    for (var i = 0; i<sequences.length; i++)    {        var folder:String = sequences[i].attributes['folder'];        var numOfImages:Number = Number(sequences[i].attributes['numOfImages']);        var type:String = sequences[i].attributes['type'];        var namePattern:String = sequences[i].attributes['namePattern'];        var imgWidth:Number = Number(sequences[i].attributes['imgWidth']);        var sequenceWidth:Number = Number(numOfImages*imgWidth);        project_width += sequenceWidth;        for (var j = 1; j<=numOfImages; j++)        {            totalImageCounter++;            var filename:String = namePattern.replace('#', j);            var fileToLoad:String = absoluteUrl+'/'+project_folder+'/'+folder+'/'+filename;            pointerXpos = Number(pointerXpos+imgWidth);            instance = 'image'+totalImageCounter;            var myimg:MovieClip = stripContainer.createEmptyMovieClip(instance, stripContainer.getNextHighestDepth());            myimg.loadMovie(fileToLoad);            myimg._x = pointerXpos;        }    }}



Thanks a lot in advance, i look forward to reading your advises!

Alex

View Replies !    View Related
Button And Images Problem/ Help Needed., Script Issue.
Allright here's the deal,

Basicaly i created a white square and made it a movieclip and called it view.

Then made a bunch of very small icons "buttons" that each one would open a different picture in that movieclip. (like a gallery, multiple very small thumbnails that open up my images on my server into that movieclip)

so i didn't put any script on my movieclip, just on that one button. And that's what i wrote :

on (release) {
view.loadMovie("http://www.alxcote.com/2006/self.jpg");
}


Then i test it and it doesnt open anything in the movieclip. (i think i should add something to the clip, not sure)

any help would be greatly apreciated,

alx

View Replies !    View Related
Embeded Fonts + Html Images Alignment Issue
I'm experiencing a problem with using embeded fonts + html text + images.

The images aren't aligned properly after using an embedded font within a dynamic textfield -- the images are aligned to the top and overlap the pervious paragraph's content.

Is there a solution to this issue?

Thanks

View Replies !    View Related
[CS3] Smoothing With 8
Hi
I need to publish in flash 8
However i can't figure out how to add the smoothing that is done automatically in 7.
Can anyone help?

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

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 An Outline...
If i create a square, is there any way to "smooth" or "round" the outline aka the "stroke" line?

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
No Text Smoothing
How can I stop the text smoothing (anti alias) in Flash MX ?

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
Copyright © 2005-08 www.BigResource.com, All rights reserved