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




Carousel Image Gallery Scale



I finished my first design in flsh 8 using autoscript. It is a carousel gallery of 14 images rotating around.I am very new to this area but i hava a knowledge on programming language.What i want is when an image comes in the center of the monitor to scale automatically, stay at the max scale for around 2 secs then scale back to its original size.when an image is in the proccess of scaling, the other images should stop and wait until the image gets its original size.actually the proccess goes like that:1st image in screen center - scale for 2 secs - remain at max size for 2 sec - scale back to original size - carousel rotation - 2nd image - scale.....and so onActually what i am lookin for is in url http://www.greekmilitary.net/I would be very gratefull if anyone can supply me with an appropriate actionscript code or any reference tutorials on this



KirupaForum > Flash > ActionScript 3.0
Posted on: 10-03-2007, 11:49 AM


View Complete Forum Thread with Replies

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

Carousel Image Gallery
i am interested to know how this IMAGE GALLERY was created and worked out.

i searched on FK and found THIS Carousel sorta thing but i was not successful implementing images within it.

anyhelp is greatly appreciated.

Bug In The Attached Carousel Image Gallery
I need to fix the bug in a carousel based image gallery. I tried to figure it out but I couldn't.
Can anybody help me in this. I would be glad if somebody can explain what's going on in the action script

PHP Photo Gallery - Scale Down Image
I'm working a Flash photo gallery that will be added to my website.

I want online users to add their photos.

Is there a php scripts that will generate a smaller image before submissting it to the gallery?

I dont want the have 5 mega pixel images loaded into the gallery because it would be too huge. I need them scaled down before it enters the gallery.

Does that make sense?

I would appreciate any help.

Keith

Carousel X-scale
hi! my first post here.
I don't know if this has already been asked (couldn't find it), but does anyone know how I can decrease the x-scale of the symbols on either side of the carousel, to achieve the effect of seeing them from the side?

Carousel X And Y Scale Distortion
Hi,

I have done all my carousels and published them and they all look fine.

When I load them into a carousel holder movie clip the carousel is stretching slightly, making my circle icons look oval.

Has anyone got any ideas as to why this might be occuring?

Thanks

Karl

Modify Carousel -looking To Change Position And Scale Images
Hi,

I watched the first two videos on the carousel and the first one is all I need. I'm not using the mouse function I just need the carousel to rotate to display some images. I would like to have the images scale bigger when they reach the front center position and I would also like to change the images in the back to be alittle lower and the images in the front to be a little higher. I'm stuck on figuring this out. I've pasted the code below. Any help would be greatly appreicated.

Code:

var numOfMags:Number = 17;
var radiusX:Number = 450;
var radiusY:Number = 150;
var centerX:Number = Stage.width/2;
var centerY:Number = Stage.height/2;
var speed:Number = 0.0007;

for(var i=0;i<numOfMags;i++)
{
   var t = this.attachMovie("mag"+i,"m"+i,i+1);
   t.angle = i * ((Math.PI*2)/numOfMags); 
   t.onEnterFrame = mover;
}

function mover()
{
   this._x = Math.cos(this.angle) * radiusX + centerX -48;
   this._y = Math.sin(this.angle) * radiusY + centerY -120;
   var s = this._y /(centerY+radiusY);
   this._xscale = this._yscale = s*100;
this.angle += this._parent.speed;
   this.swapDepths(Math.round(this._xscale) + 100);
}

//move logo forward so magazines look like they are rotating around it.
logo.swapDepths(150);

Video Gallery Carousel
I'm working on a project that's already been completed, not by me, except now another operation has to be added. Basically there is carousel that has thumbnails and when you click a thumbnail an external video loads and plays. But when the video is over it just stops and the player doesn't go anywhere. If you click the player however it will go back to the carousel. What it needs to do now though is automatically go back to the carousel when the video is done and I want to use that same function it uses when the player is clicked. Problem is I'm not sure where to start. Any ideas on how to go about this? Thanks!

Using The Carousel As A Photo Gallery?
Hi there,
I am wondering how hard it would be to use the carousel created by Lee in his tutorial and change it so instead of having a icon that moves beside the text when click, rather when clicked it enlages and becomes a photo so effectivly you have a carousel made up of lots of little photo icons that when clicked becomes bigger and the carousel disapears and when clicked photo shricks back into the carousel. I dont think it would be that hard to do Im just not very good with actionscript or xml. And I was wondering if someone who knows a bit more would be able to give me some advice on how to make this possible? I would really appriciate the help.
cheers :D

Carousel And Xml Picture Gallery Together
Hi,

for my hollyday pictures i put together a gallery. well, i have 11 gallerys and so i used the carousel tutorial to choose the gallery and the xml pictures as the gallery.

now, my problem is that on the click on an icon in the carousel the proper xml file for the gallery is not loaded. i tried it with a function, i tried to put the whole gallery code in the release function but the xml just doens't load.
does anyone have an idea?

EDIT: deletet the code

Carousel And Xml Picture Gallery Together
Hi,

for my hollyday pictures i put together a gallery. well, i have 11 gallerys and so i used the carousel tutorial to choose the gallery and the xml pictures as the gallery.

now, my problem is that on the click on an icon in the carousel the proper xml file for the gallery is not loaded. i tried it with a function, i tried to put the whole gallery code in the release function but the xml just doens't load.
does anyone have an idea?

Code:

import mx.utils.Delegate;
import mx.transitions.Tween;
import mx.transitions.easing.*;

_global.s = new Sound();
_global.s.attachSound("sound1");
textBox.text = "";

var numOfItems:Number;
var radiusX:Number = 300;
var radiusY:Number = 75;
var centerX:Number = Stage.width / 2;
var centerY:Number = Stage.height / 2;
var speed:Number = 0.05;
var perspective:Number = 130;
var home:MovieClip = this;
//-------------------set up for the picture gallery

fscommand("allowscale", false);

var x:XML = new XML ();
x.ignoreWhite = true;

var fullURL:Array = new Array;
var thumbURL:Array = new Array;
var moNames:Array = new Array;
var thumbX:Number = 15;
//---------------------------------------------------------------
picFolder = "beijing";

theText._alpha = 0;
bildg._alpha = 0;
stroke._alpha = 0;
panel._alpha = 0;

var tooltip:MovieClip = this.attachMovie("tooltip","tooltip",10000);
tooltip._alpha = 0;

var xml:XML = new XML();
xml.ignoreWhite = true;

xml.onLoad = function()
{
   var nodes = this.firstChild.childNodes;
   numOfItems = nodes.length;
   for(var i=0;i<numOfItems;i++)
   {
      var t = home.attachMovie("item","item"+i,i+1);
      t.angle = i * ((Math.PI*2)/numOfItems);
      t.onEnterFrame = mover;
      t.toolText = nodes[i].attributes.tooltip;
      t.content = nodes[i].attributes.content;
      t.folder = nodes[i].attributes.folder;
      t.icon.inner.loadMovie(nodes[i].attributes.image);
      t.r.inner.loadMovie(nodes[i].attributes.image);
      t.icon.onRollOver = over;
      t.icon.onRollOut = out;
      t.icon.onRelease = released;
   }
}

function over()
{
   //BONUS Section
   var sou:Sound = new Sound();
   sou.attachSound("sover");
   sou.start();
   
   home.tooltip.tipText.text = this._parent.toolText;
   home.tooltip._x = this._parent._x;
   home.tooltip._y = this._parent._y - this._parent._height/2;
   home.tooltip.onEnterFrame = Delegate.create(this,moveTip);
   home.tooltip._alpha = 100;
}

function out()
{
   delete home.tooltip.onEnterFrame;
   home.tooltip._alpha = 0;
}

function released()
{
   //BONUS Section
   var sou:Sound = new Sound();
   sou.attachSound("sdown");
   sou.start();
   
   home.tooltip._alpha = 0;
   for(var i=0;i<numOfItems;i++)
   {
      var t:MovieClip = home["item"+i];
      t.xPos = t._x;
      t.yPos = t._y;
      t.theScale = t._xscale;
      delete t.icon.onRollOver;
      delete t.icon.onRollOut;
      delete t.icon.onRelease;
      delete t.onEnterFrame;
      if(t != this._parent)
      {
         var tw:Tween = new Tween(t,"_xscale",Strong.easeOut,t._xscale,0,1,true);
         var tw2:Tween = new Tween(t,"_yscale",Strong.easeOut,t._yscale,0,1,true);
         var tw3:Tween = new Tween(t,"_alpha",Strong.easeOut,100,0,1,true);
      }
      else
      {
         var tw:Tween = new Tween(t,"_xscale",Strong.easeOut,t._xscale,100,1,true);
         var tw2:Tween = new Tween(t,"_yscale",Strong.easeOut,t._yscale,100,1,true);
         var tw3:Tween = new Tween(t,"_x",Strong.easeOut,t._x,100,1,true);
         var tw4:Tween = new Tween(t,"_y",Strong.easeOut,t._y,320,1,true);
         var tw5:Tween = new Tween(theText,"_alpha",Strong.easeOut,0,100,1,true);
         theText.text = t.content;
         
//----------------------------- release function to set new pic gallery         
         picFolder = t.folder;
         bildg._alpha = 100;
         stroke._alpha = 100;
         panel._alpha = 100;
         trace(picFolder);
x.load (picFolder+"/bilder.xml");// path to XML file         
         
         var s:Object = this;
         tw.onMotionStopped = function()
         {
            s.onRelease = unReleased;
         }
      }
   }
}

function unReleased()
{
   //BONUS Section
   var sou:Sound = new Sound();
   sou.attachSound("sdown");
   sou.start();
   
   delete this.onRelease;
   var tw:Tween = new Tween(theText,"_alpha",Strong.easeOut,100,0,0.5,true);
   bildg._alpha = 0;
   stroke._alpha = 0;
   panel._alpha = 0;
   
   for(var i=0;i<numOfItems;i++)
   {
      var t:MovieClip = home["item"+i];
      if(t != this._parent)
      {
         var tw:Tween = new Tween(t,"_xscale",Strong.easeOut,0,t.theScale,1,true);
         var tw2:Tween = new Tween(t,"_yscale",Strong.easeOut,0,t.theScale,1,true);
         var tw3:Tween = new Tween(t,"_alpha",Strong.easeOut,0,100,1,true);
      }
      else
      {
         var tw:Tween = new Tween(t,"_xscale",Strong.easeOut,100,t.theScale,1,true);
         var tw2:Tween = new Tween(t,"_yscale",Strong.easeOut,100,t.theScale,1,true);
         var tw3:Tween = new Tween(t,"_x",Strong.easeOut,t._x,t.xPos,1,true);
         var tw4:Tween = new Tween(t,"_y",Strong.easeOut,t._y,t.yPos,1,true);
         tw.onMotionStopped = function()
         {
            for(var i=0;i<numOfItems;i++)
            {
               var t:MovieClip = home["item"+i];
               t.icon.onRollOver = Delegate.create(t.icon,over);
               t.icon.onRollOut = Delegate.create(t.icon,out);
               t.icon.onRelease = Delegate.create(t.icon,released);
               t.onEnterFrame = mover;
            }
         }
      }
   }
}


function moveTip()
{
   home.tooltip._x = this._parent._x;
   home.tooltip._y = this._parent._y - this._parent._height/2;
}

xml.load("icons.xml");

function mover()
{
   this._x = Math.cos(this.angle) * radiusX + centerX;
   this._y = Math.sin(this.angle) * radiusY + centerY;
   var s = (this._y - perspective) /(centerY+radiusY-perspective);
   this._xscale = this._yscale = s*100;
   this.angle += this._parent.speed;
   this.swapDepths(Math.round(this._xscale) + 100);
}

this.onMouseMove = function()
{
   speed = (this._xmouse-centerX)/2500;
}
//------------------------------- picture gallery function

x.onLoad = function(){ //Function runs after XML is loaded
    var photos:Array = this.firstChild.childNodes;//Defines variable for length of XML file
   for (i=0;i<photos.length;i++) {//For loop to step through all entry lines of XML file
      fullURL.push(photos[i].attributes.urls);//Each loop, adds URL for full sized image to Array fullURL
      thumbURL.push(photos[i].attributes.thumbs);
      moNames.push(photos[i].attributes.namen);//Each loop, adds URL for thumbnails to Array thumbURL
      trace(i+". Full Image = "+fullURL[i]+"  Thumb Image = "+thumbURL[i]+"namen = "+moNames[i]);      
      var t = panel.attachMovie("b","b"+i,i);//Each loop, Define local variable 't' as a new instance of 'b' movie clip, given unique instance name of 'b' plus the index number of the For loop
      t.img.loadMovie(thumbURL[i]);// Each loop, load thumbnail image from XML data into variable movie clip
      t._y = 0;//Set Y coordinate of variable movie clip
      t._x = thumbX;//Set X coordinate of variable movie clip based on variable thumbX
      t.numb = i;//Set sub-variable 'numb' inside variable t to hold index number
      t._alpha = 50;//Set the Alpha value of the variable movie clip to 75% - for onRollOver highlight action
      thumbX += 180;//Increment thumbX value so next thumbnail is placed xxx pixels to the right of the one before
      
      t.onRollOver = function () {//define onRollOver event of the variable movie clip
         this._alpha = 100;//Set thumbnail alpha to 100% for highlight
         modeltext.chick.text = moNames[this.numb];
      }
      t.onRollOut = function () {//define onRollOut event of the variable movie clip
         this._alpha = 50;//Reset thumbnail alpha to 75%
      }
      t.onPress = function () {//define onPress event of the variable movie clip
         this._rotation += 3;//rotates thumbnail 3 degrees to indicate it's been pressed
         this._x += 3;//Offset X coordinate by 3 pixels to keep clip centered during rotation
         this._y -= 3;//Offset Y coordinate by 3 pixels to keep clip centered during rotation
      }
      t.onReleaseOutside = function () {//define onRelease event of the variable movie clip
         this._rotation -= 3;//rotate thumbnail back 3 degrees
         this._x -= 3;//Reset X coordinate by 3 pixels to keep clip centered during rotation
         this._y += 3;//Reset Y coordinate by 3 pixels to keep clip centered during rotation
         this._alpha = 50;//Reset thumbnail alpha to 75%

      }
      t.onRelease  = function () {//define onRelease function to load full sized image
         this._rotation -= 3;//rotate thumbnail back 3 degrees
         this._x -= 3;//Reset X coordinate by 3 pixels to keep clip centered during
         this._y += 3;//Reset Y coordinate by 3 pixels to keep clip centered during
         this._alpha = 50;//Reset thumbnail alpha to 75%
         trace(bild);
         _global.bild = fullURL[this.numb];
         _root.bildg.loadMovie("bildg.swf");
      }
   }
}
x.load (picFolder+"/bilder.xml");// path to XML file

panel.onRollOver = panelOver;

function panelOver() {
   this.onEnterFrame = scrollPanel;
   delete this.onRollOver;
}

var b = stroke.getBounds(_root);

function scrollPanel() {
   if (_xmouse<b.xMin||_xmouse>b.xMax||_ymouse<b.yMin||_ymouse>b.yMax) {
   this.onRollOver = panelOver;
   delete this.onEnterFrame;
   }
   var xDist = _xmouse - 400;
   
   if (panel._x >= 10) {
   panel._x = 10;
   }
   if (panel._x <= -(thumbX-780)) {
   panel._x = -(thumbX-780);
   }
   
   panel._x += -xDist/65;
}

stop();

Carousel View XML Gallery Problem
Carousel View XML Gallery Problem

I have hosted the source files for carousel view xml galllery following URL http://www.sstudio.in/carousel.zip. It has some problem with picture width that is the width and height of the picture is fixed.

But i need reduce the picture dimesions according to the stage size.

Please help me to fix this problem.

Activate Carousel Gallery OnRollOver...
hey there


could someone please explain to me how i would deactivate a carousel gallery until rollOver? reason being it doesn’t look to good when the page loads with something spinning real fast.


is it possible??


I’m running Flash CS3 with actionScript 2.0.
Help would be appreciated


::Thanks in advance::

[F8] Webcam Image Processing And Image Scale
Hi,

Im trying to do some image processing from a live local web cam feed. The input from the web cam placed directly into a video frame looks fine, but when i place that data into a bitmap data object it seems to be scaled to the top left quarter into a space of around 160x120.

Heres action script code, cut to only show the problem.


PHP Code:



import flash.display.*;
//import flash.geom.*;

//Webcam initalisation
cam = Camera.get();
cam.setMode(320,240,30,true);
inputVideo.attachVideo(cam);

//Create output data
outputVideo = new BitmapData(320, 240);
onEnterFrame = function () {
    outputVideo.draw(inputVideo);
}

_root.attachBitmap(outputVideo,10);




Thanks in advance for any hints you can provide,
Chris.

AS3 Image Carousel
Hi I am trying to replicate the an image carousel like the one on nissanusa.com.

I have created a movie(image1) with five layers containing the images.

and given them instance names ClipA, ClipB, etc.

I then moved ClipA from the top layer to below ClipB but then the listeners dont catch any mose roll over.

Any Ideas?

Is there a way to dynamically move them up or down layers?


image1.clipA.addEventListener(MouseEvent.ROLL_OVER,overFunction1);
image1.clipA.addEventListener(MouseEvent.ROLL_OUT,outFunction1);

image1.clipB.addEventListener(MouseEvent.ROLL_OVER,overFunction2);
image1.clipB.addEventListener(MouseEvent.ROLL_OUT,outFunction1);


function overFunction1(obj:Object) {
trace ("on roll called");
display_txt.text = "CLIP A";
bgdark.visible = true;
image1.stop();
image1.clipA.gotoAndStop(10);
image1.clipB.gotoAndStop(20);
image1.clipC.gotoAndStop(20);
image1.clipD.gotoAndStop(20);
image1.clipE.gotoAndStop(20);
}


Thanks

Chris

XML Gallery Tutorial Dynamic Scale Fix
Evening,

I am pretty new to actionscript and was trying to build a gallery based on the Kirupa xml gallery tutorial, with thumbnails. I am wanting to load larger images into the movie clip and then dynamically, porportionally scale it based on the container frame size. Later I want to add a zoom button that will enlarge the pic to its full size so that the user can scroll around it with their mouse. Kind of like this:

www.theloomisagency.com

For now I am just trying to get the scaling code to work. I have attached my code, but as you master coders probably see, it produces unpredictable results. The images scale different sizes and are located in different positions. Here is the code


Code:
var frame_pos_x = this.img_frame._x;
var frame_pos_y = this.img_frame._y;
var maxWidth = this.img_frame._width;
var maxHeight = this.img_frame._height;
//
function sizer() {
var myWidth = this.picture._width;
var myHeight = this.picture._height;
// Calculate percentage by which image will need to change to fit
if (myWidth>maxWidth) {
var xscalePercent = (myWidth*100)/maxWidth;
}
if (myHeight>maxHeight) {
var yscalePercent = (myHeight*100)/maxHeight;
}
// Multiply both height and width by the bigger percentage
if (xscalePercent>yscalePercent) {
this.picture._width /= (xscalePercent/100);
this.picture._height /= (xscalePercent/100);
} else {
this.picture._width /= (yscalePercent/100);
this.picture._height /= (yscalePercent/100);
}
// centers jpg on stage
this.picture._x = frame_pos_x+((maxWidth-this.picture._width)/2);
this.picture._y = frame_pos_y+((maxHeight-this.picture._height)/2);
}
///////////////////////////////////////////////////////////////////
function loadXML(loaded) {
if (loaded) {
xmlNode = this.firstChild;
image = [];
description = [];
thumbnails = [];
total = xmlNode.childNodes.length;
for (i=0; i<total; i++) {
image[i] = xmlNode.childNodes[i].childNodes[0].firstChild.nodeValue;
description[i] = xmlNode.childNodes[i].childNodes[1].firstChild.nodeValue;
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("images.xml");
/////////////////////////////////////
listen = new Object();
listen.onKeyDown = function() {
if (Key.getCode() == Key.LEFT) {
prevImage();
} else if (Key.getCode() == Key.RIGHT) {
nextImage();
}
};
Key.addListener(listen);
previous_btn.onRelease = function() {
prevImage();
};
next_btn.onRelease = function() {
nextImage();
};
/////////////////////////////////////
p = 0;
this.onEnterFrame = function() {
filesize = picture.getBytesTotal();
loaded = picture.getBytesLoaded();
preloader._visible = true;
if (loaded != filesize) {
preloader.preload_bar._xscale = 100*loaded/filesize;
} else {
preloader._visible = false;
if (picture._alpha<100) {
picture._alpha += 10;
}
}
};
function nextImage() {
if (p<(total-1)) {
p++;
if (loaded == filesize) {
picture._alpha = 0;
picture.loadMovie(image[p], 1);
sizer();
desc_txt.text = description[p];
picture_num();
}
}
}
function prevImage() {
if (p>0) {
p--;
picture._alpha = 0;
picture.loadMovie(image[p], 1);
sizer();
desc_txt.text = description[p];
picture_num();
}
}
function firstImage() {
if (loaded == filesize) {
picture._alpha = 0;
picture.loadMovie(image[0], 1);
sizer();
desc_txt.text = description[0];
picture_num();
}
}
function picture_num() {
current_pos = p+1;
pos_txt.text = current_pos+" / "+total;
}
function thumbNailScroller() {
// thumbnail code!
this.createEmptyMovieClip("tscroller", 1000);
scroll_speed = 10;
tscroller.onEnterFrame = function() {
if ((this._ymouse>=thumbnail_mc._y) && (this._ymouse<=thumbnail_mc._y+thumbnail_mc._height)) {
if ((this._xmouse>=(hit_right._x-40)) && (thumbnail_mc.hitTest(hit_right))) {
thumbnail_mc._x -= scroll_speed;
} else if ((this._xmouse<=(hit_left._x+40)) && (thumbnail_mc.hitTest(hit_left))) {
thumbnail_mc._x += scroll_speed;
}
} else {
delete tscroller.onEnterFrame;
}
};
}
function thumbnails_fn(k) {
thumbnail_mc.createEmptyMovieClip("t"+k, thumbnail_mc.getNextHighestDepth());
tlistener = new Object();
tlistener.onLoadInit = function(target_mc) {
target_mc._x = hit_left._x+(target_mc._width+5)*k;
target_mc.pictureValue = k;
target_mc.onRelease = function() {
p = this.pictureValue-1;
nextImage();
};
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], "thumbnail_mc.t"+k);
}
Any help would be GREAT. I have been trying to get it to work for DAYS. Thanks for all your help!

Sincerely,
JD

Anyone Know Any Image Carousel Tutorial?
Hi,

I'm looking for an image carousel (rotating like those found in carnival rides) done in Flash5. Preferably horizontally rotating and customizable...

Anyone seen one lately? Somewhat looks like this except this one is done with java applets and is more like a ferris wheel rather than a carousel.


Thanks!

I Need An Image Carousel, Scroller Like This One...
Hi there,

Im looking to build a scrolling image carousel like the one shown here

http://www.nikoleramsay.com/

The requirements are:
The images must be loaded in individually to reduce preload time.
For it to be scrolling.
To have a dragable bar
To remain 100% width in any browser.

Does any know of a script, a site, a tutorial that might help me complete this? Doesn’t have to be a free script, i don’t mind paying for this.

To be honest, any help in the right direction would be fantastically helpful here.

Tim

I Need An Image Carousel, Scroller Like This One...
Hi there,

Im looking to build a scrolling image carousel like the one shown here

http://www.nikoleramsay.com/

The requirements are:
The images must be loaded in individually to reduce preload time.
For it to be scrolling.
To have a dragable bar
To remain 100% width in any browser.

Does any know of a script, a site, a tutorial that might help me complete this? Doesn’t have to be a free script, i don’t mind paying for this.

To be honest, any help in the right direction would be fantastically helpful here.

Tim

Carousel Image Quality
Trying to figure out how to make the images in my carousel not jump around so much. Does anybody know of an effect, file type, flash setting or anything else that can help smoooth this out?

Thanks fo the help.

if you want to see what im talking about go here
http://www.symbioticmeg.com

A Static Image To 3D Carousel
I did the fantastic 3D carousel tutorial and got it working properly. I'd like to put a statis picture in the middle of the carousel though, something that the items revolve around, so I'd need the items to go behind the image somehow. I imagine this can be accomplished by a mask but I have no idea how to mask the dynamically created items and now they just move on top of the middle image. Can someone help me with this?

Carousel Tut. Image Instead Of Text
Hi
I am trying to work with the carousel tutorial. It is possible to display text on the right when an icon is clicked. Is it possible to display an image instead of the text (reading from the Xml)?

Henk

Carousel - Foreground Image
What would be the best way to overlay an image on the carousel script. I'm trying to make the icons in the rear pass behind the overlayed image.

Here's an example of what's happening now when I simply place the image on it's own layer.

http://pmgroup.com/ready2go/_caro2/caro ... enter.html

Scale/resize Function Into Kirupa Xml Gallery
Hello all!

I want to add the 'popular" scale and resize function to my kirupa based xml gallery..

(theorie. ..create a picturecontainer that scales itself to the jpg dimension and then displays this jpg...with an gradual fade-in...

here is my Actionscript... implementing of scale/grow funtion is needed..


ActionScript Code:
function loadXML(loaded) {
    if (loaded) {
        xmlNode = this.firstChild;
        image = [];
        description = [];
        total = xmlNode.childNodes.length;
        for (i=0; i<total; i++) {
            image[i] = xmlNode.childNodes[i].childNodes[0].firstChild.nodeValue;
            description[i] = xmlNode.childNodes[i].childNodes[1].firstChild.nodeValue;
        }
        firstImage();
    } else {
        content = "file not loaded!";
    }
}
xmlData = new XML();
xmlData.ignoreWhite = true;
xmlData.onLoad = loadXML;
xmlData.load("images.xml");
/////////////////////////////////////
listen = new Object();
listen.onKeyDown = function() {
    if (Key.getCode() == Key.LEFT) {
        prevImage();
    } else if (Key.getCode() == Key.RIGHT) {
        nextImage();
    }
};
Key.addListener(listen);
previous_btn.onRelease = function() {
    prevImage();
};
next_btn.onRelease = function() {
    nextImage();
};
/////////////////////////////////////
p = 0;
this.onEnterFrame = function() {
    filesize = picture.getBytesTotal();
    loaded = picture.getBytesLoaded();
    preloader._visible = true;
    if (loaded != filesize) {
        preloader.preload_bar._xscale = 100*loaded/filesize;
    } else {
        preloader._visible = false;
        if (picture._alpha<100) {
            picture._alpha += 10;
        }
    }
};
function nextImage() {
    if (p<(total-1)) {
        p++;
        if (loaded == filesize) {
            picture._alpha = 0;
            picture.loadMovie(image[p], 1);
            desc_txt.text = description[p];
            picture_num();
        }
    }
}
function prevImage() {
    if (p>0) {
        p--;
        picture._alpha = 0;
        picture.loadMovie(image[p], 1);
        desc_txt.text = description[p];
        picture_num();
    }
}
function firstImage() {
    if (loaded == filesize) {
        picture._alpha = 0;
        picture.loadMovie(image[0], 1);
        picture._x -= _width/2;
        picture._y -= _width/2;
        desc_txt.text = description[0];
        picture_num();
    }
}
function picture_num() {
    current_pos = p+1;
    pos_txt.text = current_pos+" / "+total;
}




hope that someone can help me out here..!!..



Best,

arn

Best Practices - Flash Image Carousel
When creating an image Carousel in flash for a web page, what are the best practices for loading quickly and changing images?

So for instance, on an ecommerce site, the home page often has a block created in flash in which 4-6 images are included with arrows or image numbers are displayed at the bottom as buttons. The images automatically change to the next ever x seconds unless the user selects an image number or the forward/back arrows.

Obviously, smaller the image the better. But how about best practices for things like:

Do you include one image in the block and then load dynamically the other images? Should all images be dynamically loaded if you want to change them on a daily/weekly basis? Any suggestions for making sure the images, especially the first one is loaded quickly?

Anyone have sample ~gpl code that demonstrates a block like this?

Two examples - kohls.com, jcrew.com

Image In Center Of Carousel Menu?
Hi, I recently built myself a carousel menu that works well, and was just wondering if it was possible to place a movieclip at it's center? the problem i've been having is that the icons at the back still seem to display overtop of the central movie clip, is there perhaps some way to set the depth of the movie clip I want in the center, so that the icons in front pass in front of the movie clip while the ones in back pass behind?


sorry if this is a bit confusing, i've been up all night trying to figure this out =/

thx in adv.

-wraith

3D Carousel Weird Image At Loading?
Hello

The 3d carousel is fantastic but i seem to have encountered an issue


when it loads it has a very odd royal blue blue box about 2 inches tall by half inch wide appear on the screen briefly. this appears in the upper left portion of the screen


any ideas what this might be? would like to make it go away! since it is all loading dynamically i have no idea where this little gremlin is coming from


thanks

justin

Carousel - Image Instead Of Text Upon ROLLOVER
I watched all 3 Carousel tutorials but can not figure out how to use an image instead of dynamic text for the rollover bubble that appears above each icon. I found a few threads on this forum with similar questions but none were answered.

Thanks in advance for your help.

Gallery Shape Scale Adjust To Size Of Jpeg
Hi everyone!

I've seen it done loads of times before, but can't figure out how to actually achieve the effect. I assume its some complex Actionscript, but can't find any examples on the internet that I can use.

I've got a selection of jpeg images that i want to load from a folder. Some are portrait, some are landscape, hence the need for the gallery shape to adjust its scale to the dimensions of jpeg +5 pixels on edge side for a border (so +10px to each the H and W values of the jpeg). I want this to tween and work whatever shape or size of image is in the folder.

Alongside this i want thumbnails of the images loading using a clean preloader, nothing too fancy.

If anyone has some code to get me started, or even better a link to a useful site, I'd be most grateful!

Like I say, I've looked on Flashkit, all over Google and a number of other Flash sites but haven't found what i'm looking for.

Cheers!

How Can I Load An External Image Using This Carousel Code
I found this beautiful carousel ported to actionscript 3.0.
http://board.flashkit.com/board/atta...7&d=1188450564

How can I change the code so I can click one of the carousel images and have it load the companion large image located in a different folder into a movieclip on stage.

I am a newbie to AS3 and struggling to learn how to do things.

Hopefully, someday I will be smart enough to contribute to the forum with intelligent submissions.

This Is A Fix To The Image Gallery Tutorial - Makes It A Fully Dynamic Gallery
After searching and reading a couple of hundred post on the truly GREAT Kirupa image gallery tutorial - and wondering why nobody has written a new tutorial or at least updated the "old" one to avoid overloading the net with flash image gallery questions.

Im trying to create a new thread that will serve as a basic startingpoint for all Kirupa gallery questions. Im no überscripter nor do I know a lot about flash, but with a little common sense and perhaps some help from all of you... oh well - here goes:

Quick Checklist:

If your JPG's wont load - Make sure you don't save them as progressive JPG's, as they wont load in Flash.
If your images dont align to the photo container movieclip it is probably because your registration point of the photo MC is set to center instead of topleft.
Below is the code I have pieced together from different posts on the subject (I would like to credit all the authors, but that would require me reading all the posts again, as I have forgotten where I got them.

It produces a gallery that loads files dynamicaly thru a phpscript and checks for maximum image height/width and scales the images to fit within the photo MC. It also sets the center of the displayed images to a given coordinate (x,y).

All in all this is a install and forget image gallery, where the only maintaining required is uploading new pictures to the image folder.

On the server the file/directory structure is:
gallery swf
filearray.php
images/file_x.jpg
file_y.jpg
etc...

This is the filearray.php - modify this to check for files in the path set in the actionscript line: this.pathToPics = "images/";


PHP Code:



  <?php  if ($dir = opendir("images")) {    while (($file = readdir($dir)) !== false) {          $cont++;      if ($file == "." || $file == "..") { } else {              $string.= ($file);          $string.= "&";          }        }      closedir($dir);  }  print($string);  ?>





This is the modified actionscript from the original Kirupa gallery script:


ActionScript Code:
// This loads the array created by filearray.php and puts it into pArray   lv = new LoadVars();  lv.load("filearray.php");  lv.onData = function(text){  pArray = text.split("&");  for (i=0; i<pArray.length-1; i++) {  trace(pArray[i]);  }  }    // variables ------------------------------------------  // put the path to your pics here, include the slashes (ie. "pics/")  // leave it blank if they're in the same directory  this.pathToPics = "images/";  // fill this array with your pics (set from filearray.php)  this.pArray = pArray;            this.fadeSpeed = 20;  this.pIndex = 0;    // MovieClip methods ----------------------------------  // d=direction; should 1 or -1 but can be any number  //loads an image automatically when you run animation  loadMovie(this.pathToPics+this.pArray[0], _root.photo);    // Center the photo at (x,y) the coordinates are set in line 69  MovieClip.prototype.centered = function(x, y) {  this._x = x-this._width/2;  this._y = y-this._height/2;  };  // Makes sure that the image fits within (wMax, hMax)  MovieClip.prototype.resize = function(wMax, hMax) {  while (this._width>wMax || this._height>hMax) {  this._xscale = this._yscale -= 1;  }  };  // This line sets max width and max height (wMax, hMax)  photo.resize(397, 297);    MovieClip.prototype.changePhoto = function(d) {      // make sure pIndex falls within pArray.length      this.pIndex = (this.pIndex+d)%this.pArray.length;      if (this.pIndex<0) {          this.pIndex += this.pArray.length;      }      this.onEnterFrame = fadeOut;  };  MovieClip.prototype.fadeOut = function() {      if (this.photo._alpha>this.fadeSpeed) {          this.photo._alpha -= this.fadeSpeed;      } else {          this.loadPhoto();      }  };  MovieClip.prototype.loadPhoto = function() {      // specify the movieclip to load images into      var p = _root.photo;      //------------------------------------------      p._alpha = 0;      p.loadMovie(this.pathToPics+this.pArray[this.pIndex]);      this.onEnterFrame = loadMeter;  };  MovieClip.prototype.loadMeter = function() {      var i, l, t;      l = this.photo.getBytesLoaded();      t = this.photo.getBytesTotal();      if (t>0 && t == l) {          this.onEnterFrame = fadeIn;          // This line sets the (x,y) center of the image on the stage          this.photo.centered(249, 213);      } else {          trace(l/t);      }  };  MovieClip.prototype.fadeIn = function() {      if (this.photo._alpha<100-this.fadeSpeed) {          this.photo._alpha += this.fadeSpeed;      } else {          this.photo._alpha = 100;          this.onEnterFrame = null;      }  };


This should do it - the only thing I (think) I need some help with is changing the script to actually load the FIRST image, when the gallery loads. For some reason beyond my knowledge you have to click the next button for a image to load... What part of the script needs to be changed to make sure that a image is loaded on startup???

I hope someone will take the time to help develope this gallery tutorial / help file... It would be great if you added som more steps to the quick checklist... and of course fixed the load image on start problem....

This Is A Fix To The Image Gallery Tutorial - Makes It A Fully Dynamic Gallery
After searching and reading a couple of hundred post on the truly GREAT Kirupa image gallery tutorial - and wondering why nobody has written a new tutorial or at least updated the "old" one to avoid overloading the net with flash image gallery questions.

Im trying to create a new thread that will serve as a basic startingpoint for all Kirupa gallery questions. Im no überscripter nor do I know a lot about flash, but with a little common sense and perhaps some help from all of you... oh well - here goes:

Quick Checklist:

If your JPG's wont load - Make sure you don't save them as progressive JPG's, as they wont load in Flash.
If your images dont align to the photo container movieclip it is probably because your registration point of the photo MC is set to center instead of topleft.
Below is the code I have pieced together from different posts on the subject (I would like to credit all the authors, but that would require me reading all the posts again, as I have forgotten where I got them.

It produces a gallery that loads files dynamicaly thru a phpscript and checks for maximum image height/width and scales the images to fit within the photo MC. It also sets the center of the displayed images to a given coordinate (x,y).

All in all this is a install and forget image gallery, where the only maintaining required is uploading new pictures to the image folder.

On the server the file/directory structure is:
gallery swf
filearray.php
images/file_x.jpg
file_y.jpg
etc...

This is the filearray.php - modify this to check for files in the path set in the actionscript line: this.pathToPics = "images/";


PHP Code:



  <?php  if ($dir = opendir("images")) {    while (($file = readdir($dir)) !== false) {          $cont++;      if ($file == "." || $file == "..") { } else {              $string.= ($file);          $string.= "&";          }        }      closedir($dir);  }  print($string);  ?>





This is the modified actionscript from the original Kirupa gallery script:


ActionScript Code:
// This loads the array created by filearray.php and puts it into pArray   lv = new LoadVars();  lv.load("filearray.php");  lv.onData = function(text){  pArray = text.split("&");  for (i=0; i<pArray.length-1; i++) {  trace(pArray[i]);  }  }    // variables ------------------------------------------  // put the path to your pics here, include the slashes (ie. "pics/")  // leave it blank if they're in the same directory  this.pathToPics = "images/";  // fill this array with your pics (set from filearray.php)  this.pArray = pArray;            this.fadeSpeed = 20;  this.pIndex = 0;    // MovieClip methods ----------------------------------  // d=direction; should 1 or -1 but can be any number  //loads an image automatically when you run animation  loadMovie(this.pathToPics+this.pArray[0], _root.photo);    // Center the photo at (x,y) the coordinates are set in line 69  MovieClip.prototype.centered = function(x, y) {  this._x = x-this._width/2;  this._y = y-this._height/2;  };  // Makes sure that the image fits within (wMax, hMax)  MovieClip.prototype.resize = function(wMax, hMax) {  while (this._width>wMax || this._height>hMax) {  this._xscale = this._yscale -= 1;  }  };  // This line sets max width and max height (wMax, hMax)  photo.resize(397, 297);    MovieClip.prototype.changePhoto = function(d) {      // make sure pIndex falls within pArray.length      this.pIndex = (this.pIndex+d)%this.pArray.length;      if (this.pIndex<0) {          this.pIndex += this.pArray.length;      }      this.onEnterFrame = fadeOut;  };  MovieClip.prototype.fadeOut = function() {      if (this.photo._alpha>this.fadeSpeed) {          this.photo._alpha -= this.fadeSpeed;      } else {          this.loadPhoto();      }  };  MovieClip.prototype.loadPhoto = function() {      // specify the movieclip to load images into      var p = _root.photo;      //------------------------------------------      p._alpha = 0;      p.loadMovie(this.pathToPics+this.pArray[this.pIndex]);      this.onEnterFrame = loadMeter;  };  MovieClip.prototype.loadMeter = function() {      var i, l, t;      l = this.photo.getBytesLoaded();      t = this.photo.getBytesTotal();      if (t>0 && t == l) {          this.onEnterFrame = fadeIn;          // This line sets the (x,y) center of the image on the stage          this.photo.centered(249, 213);      } else {          trace(l/t);      }  };  MovieClip.prototype.fadeIn = function() {      if (this.photo._alpha<100-this.fadeSpeed) {          this.photo._alpha += this.fadeSpeed;      } else {          this.photo._alpha = 100;          this.onEnterFrame = null;      }  };


This should do it - the only thing I (think) I need some help with is changing the script to actually load the FIRST image, when the gallery loads. For some reason beyond my knowledge you have to click the next button for a image to load... What part of the script needs to be changed to make sure that a image is loaded on startup???

I hope someone will take the time to help develope this gallery tutorial / help file... It would be great if you added som more steps to the quick checklist... and of course fixed the load image on start problem....

Can't Find A Simple Image Rotator Tutorial (not Carousel)
Hi,

I need to make a simple movie that rotates through images/swfs, in order, and has a small navigation to select any of the images in the rotator. Probably will only contain 3 - 6 images/swfs at a time. I have come across many pre-made flash image rotators, but I need something a bit more open that I can customize to my liking. I'm not necessarily looking for ease of use or automated. I know enough AS that I understand it, I just need help writing it sometimes. Kinda like when you can read a language, but you're not fluent in writing it. Anyway, I'm not asking for someone to write AS for me, but if anyone has something already on hand that they don't mind sharing or if you know of a tutorial that may help, I would appreciate it. Thanks.

Image Scale
I have a small square grid of images
and want to have these expand to show the whole image over the square area.

I think this is done with masks does anyone no of a tutorial or no of a fla.

cheers

Scale Image
Hi all,

I had create a program which allow user to drag different images onto the stage and the user will be able to drag many images onto the stage.
Now the problem is I need to be able to let the user to scale the image that they chosen that had been dragged onto the stage. Can anyone help me how should I do it. Thanks for your help.

Regards
Fernado

Scale An Image With AS?
when i use

image._xscale = 50;
image._yscale = 50;

it does it in percent, how can i scale it in actual pixels?

Image Won't Scale
This is actually part of a larger code, but in debugging I pulled this out to see what it is doing. For soem reason, the moment I include the iamge into the MC [imageContainer0] (whether code created, or and instance named item) the scaling no longer works. If I pull the image line out, the scaling works. Any thoughts?

scale = 5;
scaleDone = "no";
//load image for offSet
imageContainer0.loadMovie("0001.jpg");
//set X and Y
imageContainer0._x = 100;
imageContainer0._y = 100;

//scale item
if (scaleDone == "no")
{
imageContainer0.onEnterFrame=function()
{
if (this._xscale<500)
{
this._xscale+=scale;
this._yscale+=scale;
};
} ;
};
scaleDone = "yes"

stop();

How To Scale Image
I have a few images within flash that need to to be 100% in width no matter what the screen size. These images are currently movie clips. Since I am completely new to this, How would I create an image that grows with the browesr window? I can easily create an image that has a width of 2000px, but I am guessing there is a better way. Any ideas are greatly appreciated.

Re: Image Pan/scale
Hello all,
I recently posted an issue I was having in regards to a continuous panning image, with nested buttons triggering a zoom and scale, then subsequent return. It has driven me to the brink of madness...

The site has tentatively gone live, with the as-is version of this flash in place. Since then, I have a more refined version, and am nearly ready to hand over to them. Here's my issue: the continuous scroll, turned on through setting a variable to true in the root, is refusing to change to false (i.e. stop scrolling) when a button is clicked. Aside from massaging some of the dest_x's and dest_y's, I think it will be running well...except for this issue. Here's the main script:

---------------------------
onClipEvent (enterFrame) {
trace("zoomstate: "+_root.zoomstate);
_root.scrollmc = true;

if (_root.zoomstate == "zoomin") { //zoom the movie clip in
trace("loop: zooming in");
//Change x-position
_root.change_x = _root.panimage._x+_root.dest_x;
_root.panimage._x = _root.change_x/2;
//Change y-position
_root.change_y = _root.panimage._y+_root.dest_y;
_root.panimage._y = _root.change_y/2;
//Change scale
_root.change_scale = _root.panimage._yscale+100;
_root.panimage._yscale = _root.change_scale/2;
_root.panimage._xscale = _root.change_scale/2;
//Output x/y position
trace("xpos = "+_root.panimage._x);
trace("ypos = "+_root.panimage._y);
if ((_root.panimage._x/_root.dest_x)>0.99) { //If close enough to dest_x, escape loop
_root.panimage._x = _root.dest_x;
_root.panimage._y = _root.dest_y;
_root.panimage._yscale = 100;
_root.panimage._xscale = 100;
_root.zoomstate = "zoomedin";
trace("zoomstate: "+_root.zoomstate);
trace("currentscene: "+_root.currentscene);
_root.overlay.gotoAndPlay(_root.currentscene);

}
} else if (_root.zoomstate == "zoomout") { //zoom the movie clip out
trace("loop: zooming out");
//Change x-position
_root.dest_x = _root.orig_x;
_root.change_x = _root.panimage._x+_root.dest_x;
_root.panimage._x = _root.change_x/2;
//Change y-position
_root.dest_y = _root.orig_y;
_root.change_y = _root.panimage._y+_root.dest_y;
_root.panimage._y = _root.change_y/2;
//Change scale
_root.change_scale = _root.panimage._yscale+50;
_root.panimage._yscale = _root.change_scale/2;
_root.panimage._xscale = _root.change_scale/2;
if ((_root.panimage._x/_root.dest_x)>0.99) { //If close enough to dest_x, escape loop
_root.panimage._x = _root.dest_x;
_root.panimage._y = _root.dest_y;
_root.panimage._yscale = 50;
_root.panimage._xscale = 50;
_root.zoomstate = "zoomedout";
trace("zoomstate: "+_root.zoomstate);
//turn scrolling back on
}
}

//controll scrolling
trace("scroll= " + _root.scrollmc);
if (_root.scrollmc == true) {
//start scrolling
_root.panimage._x = _root.panimage._x+1;
//when mouse moves left, navigation panel moves right
if ((_xmouse>30) && (_xmouse<238) && (_ymouse>-255) && (_ymouse<-75)) {
_root.panimage._x = _root.panimage._x+3;
}
//when mouse moves right, navigation panel moves left
if ((_xmouse>398) && (_xmouse<616) && (_ymouse>-255) && (_ymouse<-75)) {
_root.panimage._x = _root.panimage._x-6;
}
//when navigation panel reaches it's maximum x-value it resets itself
if (_root.panimage._x>0) {
_root.panimage._x = -1486;
}
if (_root.panimage._x<-1540) {
_root.panimage._x = -52;
}
}
}


---------------------------

And here's a sample of one of the button scripts:
--------------------
on(press, release) {
_root.scrollmc = false;
_root.dest_x = 300;
_root.orig_x = _root.panimage._x;
_root.dest_y = -40;
_root.orig_y = _root.panimage._y;
_root.zoomstate = "zoomin";
_root.currentscene = "phone-start";
}

----------------------------

I'm also afraid that the escape conditional on the 'zoom out' state is jacked up:
----------------------------
if ((_root.panimage._x/_root.dest_x)>0.99) { //If close enough to dest_x, escape loop

-----------------------------

but my major issue is how to stop the scroll during scale/shift, then restart it when scaled back out. Any help from any experts would be so incredibly welcome, andI would be forever grateful. Krilnon was originally helping me with this; Krilnon - if you'd like, take a look and tell me your ideas. The live version is at:

http://www.noscamnc.gov

That is the older, now-live version. Here's an internal link to the new version, so you can see both the progress and the errors:

http://dev2.capstrat.com/clients/doj

I'm panicked for time - this is making me crazy. Thanks again!

How Do I Scale Down A .SWF Image
www11.brinkster.com/esrev...e4.swf.swf

Copy And Paste To View...


Now how do I make this smaller so it only displays the letters or just reduce the box ? Thx

Scale Control Of Image
I would just like someone to explain the following code. I have been fooling around with it, but would rather like a explaination for what everything means. I wouldn't mind knowing how to control where the x,y point decides when the image enlarges.

y = getProperty("../dragControl", _y);
X = getProperty("../dragControl", _x);
if (Number(y)>230 or Number(x)>1) {
midY = y-(300/2);
if (Number(midY)<0) {
midY = -midY;
}
setProperty("../nav", _xscale, midX);
setProperty("../nav", _yscale, midY);
if (Number(getProperty("../nav", _yscale))<100) {
setProperty("../nav", _xscale, "100");
setProperty("../nav", _yscale, "100");
}
if (Number(getProperty("../nav", _xscale))>30) {
setProperty("../nav", _xscale, "30");
setProperty("../nav", _yscale, "30");
}
}

Image And Test Scale
Does anyone know that answer to why when a scene is in a scene or a movie or something is inside something that an image or text that was once on the main level of the file is somewhat distorted, or scaled down. This has happened to me in many different situations.

If you would like to see an example of what i am talking about please look here. On this page there is a scroll bar on the left (this is where the distortion is taking place) and on the right are the same types of links only they are in the main level of the movie. The original text and image sizes are exactly the same but look much different.

http://scsracing.com/

Scale Background Image
I want to be able to scale a background JPG in a flash file while still maintaining it's aspect ratio.

I've searched for this and seen others had the same question but no info on how to pull it off.

Anyone have a reference, link or know how to do this?

[cs3 AS2.0] Scale LoadMovie Image?
i was wondering if theres any way to scale a loadIn movie using script... or would i have to edit the actual image i am loading in?

this is the code that dynamically loads the image:


PHP Code:



loadMovie("joe.jpg", _parent._parent.about_section.targetArea);




i want to scale down "joe.jpg" using script...

Image Background And Scale
I need a code that will allow me to take an image named "background" and have it replace the background color feature for my website design. I need it to also scale approp. when the browser window is resized. I already have everything set for full screen flash, just need the ActionScript Code that will load the image as background when you visit the site and resize browser.

I have done some research and even looked around the forums - I have not found anything that was useful or that worked.

Thank you in advance for any help anyone can offer!

Scale Background Image
I managed to run across this code which resizes my background image to the size of the window, but it does not work well with vertical formatted images. It cuts off the bottom of the image when using this code.


Code:
stop();
Stage.scaleMode = "noScale";
Stage.align = "TL";

bg.onResize = function() {
var imageAspectRatio = bg._width / bg._height;
var stageAspectRatio = Stage.width / Stage.height;
if (stageAspectRatio >= imageAspectRatio) {
bg._width = Stage.width;
bg._height = Stage.width / imageAspectRatio;
} else {
bg._height = Stage.height;
bg._width = Stage.height * imageAspectRatio;
}
bg._x = Stage.width /2 ;
bg._y = Stage.height /2;
};
Stage.addListener(bg);
bg.onResize();
How could I change this code so that it will change the aspect ratio if there is a vertical image instead of horizontal? Instead of it cutting off the bottom of the image, I would rather it scale to the height and leave blanks areas to the right and left.

Thanks...

How To Scale Image...not Text?
I have made this gallery:

http://pakulaphoto.com/photo_gal.html

Does anyone have any ideas on how i could make it so the image scales but the text stays at a fixed size?

The flash gallery right now is just a standard .swf file and in dreamweaver i told it to scale the flash movie to 100% width. When i do this however my text scales when i want it to stay a fixed size.

thanks in advance for any help.

Image Scale Question
I'm new to flash, and have an app that I'm trying to customise. It's a nice xml-based photo gallery that loads images from a folder on the server. When it loads the pictures, it stretches them vertically and horizontally to fit the picture area... but how can I stop it doing this? It works perfectly if the images are the right size and dimensions, but for what I'm looking to do, they probably won't be, so I'd like it to just display the images at their original size.

I have the .fla (obviously!) but I can't find in the parameters or actionscript where I'd need to alter the settings.

The gallery app is here:
http://www.1251comms.com/gallery/
if anyone has any ideas, I'd be really grateful

Scale Background Image
I managed to run across this code which resizes my background image to the size of the window, but it does not work well with vertical formatted images. It cuts off the bottom of the image when using this code.


Code:
stop();
Stage.scaleMode = "noScale";
Stage.align = "TL";

bg.onResize = function() {
var imageAspectRatio = bg._width / bg._height;
var stageAspectRatio = Stage.width / Stage.height;
if (stageAspectRatio >= imageAspectRatio) {
bg._width = Stage.width;
bg._height = Stage.width / imageAspectRatio;
} else {
bg._height = Stage.height;
bg._width = Stage.height * imageAspectRatio;
}
bg._x = Stage.width /2 ;
bg._y = Stage.height /2;
};
Stage.addListener(bg);
bg.onResize();
How could I change this code so that it will change the aspect ratio if there is a vertical image instead of horizontal? Instead of it cutting off the bottom of the image, I would rather it scale to the height and leave blanks areas to the right and left.

Thanks...

Image Scale Animation
Why is it that when you animate a photograph (especially animating scaleX or scaleY), it looks so crappy? I've tried caching as a bitmap, turning off compression, etc, but nothing helps. What's the story here?

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