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




Gorillaz.com Panning & 3d



does anyone have any insight as to how the webmasters at gorillaz.com accomplished that particularly pleasing panning effect? are there any 3d plug-ins that can accomplish this?



ActionScript.org Forums > Flash General Questions > Other Flash General Questions
Posted on: 08-26-2005, 07:10 AM


View Complete Forum Thread with Replies

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

Gorillaz Like Web Site
Hello.
I'm a designer and right now I'm working on a project for some hotel. Anyways.. I would want to recreate that effect or should we say remake that style from the www.gorillaz.com.
Now, I need to create many rooms so one can explore the hotel (Hotel is very expensive so they can affort this what I'm doing). instead of just placing pictures in html, I would like to create pseudo 3D rooms with images and interactive content just like gorillaz web page. Does anyone have a source for that or something similar to that?

-Thank you very much.

Gorillaz LOADING
How to make loading thing like Gorillaz website?
I still dont know how people do those loading...and how they connect the loading thing to their website..Please teach me!

Scrolling Room As Seen On Http://www.gorillaz.com/Scene.php
Can anyone point me to a tutorial that would help me achieve the scrolling room effects as seen on http://www.gorillaz.com/Scene.php

I only need to scroll horizontally.

Thanks in advance

360 Panning Mc
Hi can anybody help.

My problem is that I have made a 360 panning mc. But when viewed on the net it runs very rough but fine on my pc or when viewed by going straight to its url.

To see what I mean goto http://businessdigital.com.au/virtual3.html that seems to run ok. Then for the way it should look goto http://www.businessdigital.com.au/main.html then once loaded about 100k click on the camera then view samples in the main window then enlarge image.

Any suggestion must appreciate.

Panning
hey, could anybody explain to me how i could get a panning effect in my a flash movie. Where it looks like the camera is going from one side to the other kind of thing. If the only way to do this frame-by-frame, making each frame a bit different or is there a much better and easier way? thanks in advance cyaz

Help With Panning
Hello, I want to make a portfolio for myself but the only problem is that I cant seem to find any tutorials on how to pan an image both the _x and _y axis'. Ive followed a tutorial by kirupa.com :http://www.kirupa.com/developer/flas..._image_pan.htm but that only does the x axis, and when i tried to make my own AS for the y axis i got it to pan up and down.. but it would just keep going down and the side you went to was inverted so that if you went to the right it would go left.
Also I was wondering if there is any tutorial on how to make a 2d/3d bg like the one found here:
http://www.chromazone-imaging.co.uk/flashindex.html
e.g. how the things in the BG seem to scroll over eachother depending on position of the mouse.

any help at all would be greatly appreciated, ive been trying to get help on image panning for 3-4 weeks now and cant find any good solution
-Thanks in advance, James

Panning
I wanted to know if someone could help me make an image and/or movie clip appear to pan across the stage... I can not figure it out.

Mc Panning
Code:
_root.onMouseMove = function() {
if (_root.video_target.hitTest(_root._xmouse, _root._ymouse, true)){
slide(video_target.slider, 5, 1, 1);
}
};


function slide(target:MovieClip, speed:Number, dir:Number, ver:Number) {
var xMove:Number = _xmouse/521;
var yMove:Number = _ymouse/315;
var xSpeed:Number;
var vSpeed:Number;
if (dir != 1) {
xSpeed = 1-xMove;
} else {
xSpeed = xMove;
}
if (ver != 1){
vSpeed = 1-yMove;
} else {
vSpeed = yMove;
}
target.destX = Math.round(-((target._width-521)*xSpeed));
target.destY = Math.round(-((target._height-315)*vSpeed));

target.onEnterFrame = function() {
if (target._x == target.destX) {
delete target.onEnterFrame;
} else {
target._x += Math.ceil((target.destX-target._x)*(speed/100));
}
if (target._y == target.destY){
delete target.onEnterFrame;
} else {
target._y += Math.ceil((target.destY-target._y)*(speed/100));
}
};
}
the preceding works exactly as i want it to.. the catch is, it only does so in it's own swf.. meaning, i want to use it as an external swf embedded in another movie... when it's on it's own, the panning will stop if the edge of mc hits the border, when it's called externally the panning won't stop!

i feel like i've tried everything i can (obviously not!).. where you see 521 and 315 there WAS Stage.width/height and that code was on the external swf itself, in an attempt to stop the panning when it should i tried putting the code in the parent movie and changing some variables, which worked the same with no avail.


here's a link if my babbling wasn't clear enough: http://www.jahdesign.com/flash/

also.. i would like for it to pan only if the mouse moves over the panning clip, it currently pans based on where the mouse is over the parent movie.. i've made multiple attempts at changing this as well, with no luck.. thanks

AS For Panning
pls view for example. http://www.leoburnett.ca/

i need to update my site a little. thanks

Help With Some Panning
I have this website I'm working on and I'm trying get this panning aspect to work right. The problem is that I'm not getting the numbers right somewhere and can't get the whole image that is panning to show up. Also when a browser window is resized I can't get the pan to resize as well, if that makes any sense. I've found website one that does what I want to do somewhat:

http://www.vermeersch.ca/

Just click on explore and you'll see how the panning works.

Here's my Actionscript:


Code:
stop();

import com.McSliderB;

Stage.scaleMode="noScale";
Stage.align="TL";

var myclip:MovieClip = _root.img;
var myeasing:Number = .9;
var myX:Number = 0;
var myY:Number = 0;
var myviewW:Number = 1440;
var myviewH:Number = 800;
var mystartX:Number = ((myclip._width - myviewW)/2); //want the image to start centered
var mystartY:Number = ((myclip._height - myviewH)/2); //want the image to start centered

//new McSlider(yourMovieClip, easing, clipX, clipY, aperature_width, aperature_height, initial_x_Offset, initial_y_Offset);
var nMC:McSliderB = new McSliderB(myclip, myeasing, myX, myY, myviewW, myviewH, mystartX, mystartY);
The "myview" dimensions are 1440x800 and my image is 3000x5000(huge I know), and the stage dimensions are 1800x1500. Not sure if the stage dimensions matter or not though but they seem to have some influence on whether the panning works right or not.

And here's the class, McSliderB:


Code:
import mx.utils.Delegate;
import flash.geom.Rectangle;

class com.McSliderB {
private var __mc:MovieClip;
private var __mcp:MovieClip;
private var __ease:Number;
private var __control:MovieClip;

private var __yDiff:Number;
private var __yScale:Number;
private var __yPos:Number;
private var __xDiff:Number;
private var __xScale:Number;
private var __xPos:Number;

private var __imgW:Number;
private var __imgH:Number;
private var __rect:Rectangle;


//new McSlider(yourMovieClip, easing, clipX, clipY, aperature_width, aperature_height, initial_x_Offset, initial_y_Offset);
public function McSliderB(_mc:MovieClip, _ease:Number, _clipX:Number, _clipY:Number, _apertureW:Number, _apertureH:Number, _xoff:Number, _yoff:Number) {
// your clip to pan
__mc = _mc;
// amount of easing - .7 works well
__ease = _ease;
// store the clip's parent in a variable, it will be used for _xmouse, _ymouse
__mcp = __mc._parent;
// get the initial width and height of the images
__imgW = __mc._width;
__imgH = __mc._height;
// position the clip to x, y
__mc._x = _clipX;
__mc._y = _clipY;

// turn on cache
__mc.cacheAsBitmap = true;

// I decided to run the onEnterframe within another clip vs. __mc
// just incase __mc contained an animation or some other onEnterFrame events
__control = __mc.createEmptyMovieClip("controller", __mc.getNextHighestDepth());

// create a new rectangle - position your clip to the offsets and aperature width / height

__rect = new Rectangle(_xoff, _yoff, _apertureW, _apertureH);
// set the clip's scrollRect
__mc.scrollRect = __rect;

// button events to control movement start / stop
__mc.onRollOver = Delegate.create(this,initiateMovement);
__mc.useHandCursor = false;
}

private function killMovement():Void {
delete __control.onEnterFrame;
}

private function initiateMovement():Void {
delete __mc.onRollOver;
__control.onEnterFrame = Delegate.create(this,calcXY);
}

private function calcXY():Void {
// calculate the Y offset / positions
__yDiff = __mcp._ymouse-__mc._y;
__yScale = __yDiff/__rect.height;
__yPos = __yScale*(__imgH-__rect.height);

// calculate the X offset / positions
__xDiff = __mcp._xmouse-__mc._x;
__xScale = __xDiff/__rect.width;
__xPos = __xScale*(__imgW-__rect.width);

// set the rectangles offsets
__rect.x = __xPos-(__xPos-__rect.x)*__ease;
__rect.y = __yPos-(__yPos-__rect.y)*__ease;

__mc.scrollRect = __rect;

//detect hit area
if(!__mc.hitTest(_root._xmouse, _root._ymouse, true)) {
killMovement();
__mc.onRollOver = Delegate.create(this,initiateMovement);
}
}
}
I grabbed that from an old thread here on Kirupa.

If anyone can help I'd greatly appreciate it, I'm really confused on what's going on.

Have A Look At This Panning...
www.eduardo-chillida.com/

A really nice example of pannaning and dissolve. Now, my question: can this be emulated using the slideshow by Todd Dominey?

It uses the mx.transitions classes and I've had some success but am stuck!

The code in question looks like this:

Scroll_x = new mx.transitions.Tween(thisLoader, "_x", mx.transitions.easing.Regular.easeInOut,-200,-150,10,true);

Fade = new mx.transitions.TransitionManager.start(thisLoader, {type: TransitionTypes[1], direction: 0, duration: _global.fadetime, easing: EasingCat[_l2], _maxDimension: thisLoader._height, shape: "CIRCLE"});

The images are loaded in from a folder using an XML script.

If anyone can point me in the right direction I'd be very grateful.

Sarah

Panning
does anyone have the code for a flash mx panning?? Or know of a site that could provide a tutorial for panning?

Panning Help
hey i am trying to pan an image in four directions but i can only get it to move left and right OR up and down...

not both =(

my code for left and right panning is

CODEthis.onMouseMove = function() {
constrainedMove(bg_mc, 4, 1);
};
function constrainedMove(target:MovieClip, speed:Number, dir:Number) {
var mousePercent:Number = _xmouse/Stage.width;
var mSpeed:Number;
if (dir == 0) {
mSpeed = 1-mousePercent;
} else {
mSpeed = mousePercent;
}
target.destX = Math.round(-((target._width-Stage.width)*mSpeed));
target.onEnterFrame = function() {
if (target._x == target.destX) {
delete target.onEnterFrame;
} else {
target._x += Math.ceil((target.destX-target._x)*(speed/100));
}
};
}

Panning An Mc
sorry i`m stuck again...learning actionscript is full of pitholes!! i have this code and it works a treat but only for horizontal panning...i have been playing with it for the last 2 hours to try to get it to work on the y axis as well to give a more 3d feel but to no avail. can anyone help me out please??
Code:

this.onMouseMove = function() {
//(target_mc,speed,direction)
constrainedMove(bg_mc, 4, 1);
};
function constrainedMove(target:MovieClip, speed:Number, dir:Number) {
var mousePercent:Number = _xmouse/Stage.width;
var mSpeed:Number;
if (dir == 1) {
mSpeed = mousePercent;
} else {
mSpeed = 1-mousePercent;
}
target.destX = Math.round(-((target._width-Stage.width)*mSpeed));
target.onEnterFrame = function() {
if (target._x == target.destX) {
delete target.onEnterFrame;
} else {
target._x += Math.ceil((target.destX-target._x)*(speed/100));
}
};
}
Code:

Panning
Does anyone know how to create a pan feature like so that when I move the cursor to the bottom left hand corner of the site it moves along to that position.

Any help would be really appreciated.

Help With Panning An Image
Hi,
In my movie, a user can pan a map image left, right, up and down. I have made buttons for each direction and they continuously scroll when the mouse is over the button. At the moment the map (movie clip called "map") keeps scrolling until it disappears off the movie but I would like the map to stop when the edge of the map reaches the end of the display area.
The movie size is 550px (width) by 520px (height). The map size is 519.9 (height) by 746.8 (width) and the dimensions are -9.7x (left), -195.1y (up), 510x (right) and 551.7y (down). I have a display area with the following dimensions 48.3x (left), 40.6y (up), 497.7x (right) and 434.6y (down). I only want the map to appear when it is in the display area.

The ActionScript code that makes the map scroll continuously is the following:-
setProperty ("/map", _y, Number(getProperty("/map", _y))+18);
x_value = getProperty("/map", _x);
y_value = getProperty("/map", _y);

I want the left map edge (-9.7x) to scroll across to the right but only as far as the left display area edge (48.3x) and then to stop scrolling. Does anyone know how to do this??? I have tried with some if statements but nothing has worked. Also, is _x the x value taken from the left or the centre???

Hope someone can help me!!

Sound Panning
I hope someone out there can help me with this. I can't seem to be able to get 2 sound objects to pan separately. This is what I have so far,

I've initialised 2 sound objects, mySound1 and mySound2:

mySound1 = new Sound();
mySound1.attachsound ("sound1");
mySound1.start( 0,999 );

mySound2 = new Sound();
mySound2.attachsound ("sound2");
mySound2.start( 0,999 );

Now I want to have the two sounds panning separately, i.e.

mySound1.setPan( -50 );
mySound2.setPan( 50 );

Except what ends up happening is that both mySound1 and mySound2 are panned at 50. I'm assuming that Flash does not provide the capabilities for panning 2 separate sound objects, does anyone know if this is so? And if not, how I could get around it?

Thanks!

Mike
[Edited by mikeoptix on 09-30-2001 at 09:02 AM]

Panning Slider
I've been looking for a easy to understand tut on panning sound
but failed to find one - could someone take a look at this file and help me understand the action script involved with the pan slider - please

http://www.members.cox.net/cuttlass1/slider.zip

yours,
cuttlass

Panning Up A Building
Thank you

Basically, Im trying to produce a building that gives the effect of scrolling up it in a game

Now I want rows of 3 windows that continually get produced, so they appear under the stage, then move up the stage, then get removed !

This will give the appearance of panning up the building.
so you get a grid like formation of windows in rows of 3.
Row appears, moves up, gets deleted

In these windows I will try and get different baddies to appear and do differnet things..(dont know how yet ???!!)

I could attach a sketch if it helps

Thanks again

Panning Screen
I am making a game were, i am hoping, if you walk or drive to an edge of the screen, it screen will follow you, giving to look of moving around in a large environment.

would i need to make the car stationary, and only have the backround move, would the car move, and the rest just pan with it.

any help would be great. Thanks

ZOOM IN, OUT And PANNING
does anyone know how to zoom in, out and pan on an object with flash? im trying to make something similar to this site http://www.customatix.com/static/cat...orfn_home.html
somebody please please help

Zooming In, Out And Panning
does anyone know how to zoom in, out and pan on an object with flash?
im trying to make something similar to this effect on this website http://www.customatix.com/static/cat...orfn_home.html
please help! please

Panning In Flash Mx
Grr. I've search a number of places but have had no success on finding an answer to my simple (i think) question.

I'm developing a website. The main page is a map of sorts. A user click on an area of the map and is brought to a close version of that section. This is done.

Now, what i'd like to do is when the user has clicked on the map and are brought o the closeup, is for them to be able to scroll around the map to the other sections as well, instead of having to go back to the main image map. I figure i'll use a 4 arrows for up down left and right. In any case, when they are moving around the map, they should also be able to click on the sections.

So yes, all i need to know is how to pan around an image. I've gone to google but almost everything i turn up involves panning audio and the rest is about zooming or 3d enviroments.

THank you for your help.

Panning Bitmaps
I am trying to create a very simple movie in which photographs slowly pan or zoom-in as one would see in a documentary video. This is easy enough to do, but when published, the bitmaps get a wierd jiggle effect as they slowly move. Is this just inherent in flash or is there a way to get a smoother transition? thanks
Dan

Zooming / Panning
So how do you get the camera to zoom inn and out? Do you rezise everything and motion tween or is there an easier way?

Panning Sound
hello,

Just wondering if there is a way to pan sound from left to right and right to left....by simply moving the mouse to the left side of the screen and the right side...
thanx!

Navigate While Panning
I want to create a panning effect for a graphic, something that loops, while at the same time, the user may stop at any position and click something in the graphic to get to another section. How do I do that???

Should I do that with a video or a panoramic graphic linked together?

Panning Question
If you click this link:
http://www.hybride.com/eng/hybrideeng.html
and then click on "about us" you'll see three little images at the on the screen. When you click them, it pans the main image, and also eases it to the resting position. Does anyone know the code for something like this, or where a good tutorial for it would be?

I appreciate the help.

-Brett

Zooming/panning?
Hmm, I dont have any examples, but i need some knowledge of how to incorporate a zoom/pan effect using flash mx. I dont have any specific ideas i want to use, which is why i post this to see what i come across. I dont know if you know what i mean, but basically if you watch a shockwave movie you see panning and zooming all the time. Any ideas using flash mx?

Panning Screen
from the site: http://gorillaz.com , how is the panning/movement of the screen created? the screen seems to follow the mouse position and the image appears to loop?

thanks...

Panning Scroll Bar....
Can anyone refer me to a good tutorial on how to build a panning scroll bar like the one seen on www.shopcomposition.com? I understand how to do a scroll bar but not how create it so that the item flies in from one side while an item exits out from other side. Do you have any good recommendations?

Thanks!

Furpants

Panning Image With AS
I am using the following code to pan an image based on the mouse position. All works fine except I want the image to slide to the correct position with easing if you move the mouse off of the stage and then reenter the mouse in a different position from when you left. Right now, what it does is snaps to the mouse instead of sliding to it.


Code:
_root.createEmptyMovieClip("holder", 1);
holder.attachMovie("image", "image", 1);
holder._x = 0;
holder._y = 0;
slope = (Stage.width - holder._width)/Stage.width;
vertSlope = (Stage.height - holder._height)/Stage.height;

curXPos = holder._x;
curYPos = holder._y;

_root.onMouseMove = function(){
_root.onEnterFrame = function(){
_root.holder._x = slope*_xmouse;
_root.holder._y = vertSlope*_ymouse;

curXPos = _root.holder._x = slope*_xmouse;
curYPos = _root.holder._y = vertSlope*_ymouse;
trace("x:" + curXPos);
trace("y:" + curYPos);
delete(this.onEnterFrame);
}
}
Can somebody take a look or give me an idea as to how I can make it slide to the mouse from the images current position with easing instead of snapping to it? Any help is greatly appreciated.

Panning Background - Please Help
Hello all.

I'm trying to create a scene where my background can pan.. when I scroll my cursor to near the end right of the screen, it will pan right, when the cursor is near the left end of the screen it pans left.

The best example of what I want to create is the bottom panning thumbnails:
this tutorial for thumbnails
Sadly, I do not know how to replace those codes. I need take away the XML and replace it with my background in a movie clip, I believe?

In the tutorial, they used 2 boundaries to set the area when the cursor enters the area it pans. When cursor is out of area the background stops panning, that's what I want most importantly.

Because I am currently relying on this: and the easing is too much to take!
http://www.kirupa.com/forum/showthread.php?t=202991

I would sincerely appreciate any help that would be useful, please, help me I'm so desperate now.

[CS3] Image Panning HELP
Hi,

here's my file :
http://www.muellerdesign.com/aftp/te...ate-Dv1.0.html

so I have sort of have an image reel than pans on mouse move and when you roll over on the image a white box pops in.

Each photo is an button that makes up 1 movie clip on the main timeline that gets controlled by a script on the main timeline also

here's what I want to happen:
I was hoping that when I roll over those white boxes that pop in, the main movie clip will go to a specific place on the stage (with easing) and the panning script on mouse over will be disabled until I roll out.

I'm a total newbie, and this is way too complicated for me, but i have to do it.
pls help:

here's the script for the panning


this.onMouseMove = function() {
constrainedMove(MC,5, 1);
};
function constrainedMove(target:MovieClip, speed:Number, dir:Number) {
var mousePercent:Number = _xmouse/Stage.width;
var mSpeed:Number;
if (dir == -1) {
mSpeed = 1-mousePercent;
} else {
mSpeed = mousePercent;
}
target.destX = Math.round(-((target._width-Stage.width)*mSpeed));
target.onEnterFrame = function() {
if (target._x == target.destX) {
delete target.onEnterFrame;
} else {
target._x += Math.ceil((target.destX-target._x)*(speed/100));
}
};
}

stop();



here's an actionscript for making movie clips move with ease to s specific place on the stage


onClipEvent (enterFrame) {
xMC = getProperty(_root.MC, _x);
moveMC = _root.xTargetMC - xMC;
setProperty(_root.MC, _x, yMC + (moveMC/10));
}


is there a way to combine these???? sorry im losing my mind.

HELP!

[F8] Panning Out From The Stage
i have a scene that shows a close up of the stage contents

i would like to, over a few seconds, reveal all the stage by 'panning outwards'

just like panning out using a video camera

how would i do this please?

Magnifying And Panning
Hi Guys

Need help!

I am creating a Map magnifying application which can also pan.

There are 2 maps that i have used. One is smaller version and other is large.
There is one more movieclip which moves only in the small map area. Following is the code used.

mySquare.onPress = function() {
if (this.hitTest(smallMap)) {
this.startDrag(this, 30, 215, 220, 360);
}
};
mySquare.onRelease = function() {
this.stopDrag();
};

By the above code the movieclip(mySquare) remains in the smallmap area.
The x and y coordinates of movieclip mySquare (multiplied by -2) is given to big map(myMap) which pans as the mySqaure movieclip moves.

Below is the script for that

onClipEvent (enterFrame) {
_root.myMap._x = (_root.mySquare._x*-2);
_root.myMap._y = (_root.mySquare._y*-2);
}

My problem is the coordinates of large map and small map don't match. I mean when i magnify a area in the small map it doesn't show the magnification of area selected by mySqaure but something else.

I would like to know if i am using correct logic. And if yes how do i solve it.

any help or suggestions are welcomed.

Yet Another Panning Question
hi
im trying to create my own panning function or class but i cant figure how to make some point of myMc static relative to the stage.
Open the fla to see what im talking about.
My aproach was to add the myMc._x+myMc.line._x to get my first relative point to reference later but since myMc.line._x is always the same after i increase or decrease scale this is not the solution.
My objective is to maintain static the myMc.line._x relative to the stage after increase or decrease myMc._xscale.
I have been reading about the subject but couldnt find a way to do it ,
the only thing i found that maybe can help is the method localToGlobal()
but dont know how to use it with my code.

Thanks.

Panning Problem..
Hi I've gotten this far with a little help. I have got the panning in motion to my liking but having trouble with the position of the "shape" mc. What I want is to be able to pan to the exact centre of the mc.
I want to be able to add more mc's all over the place and have it pan to the centre of every movie.

Can anyone help please.

Zooming And Panning
Hi you all!
I'm trying to build a MovieClipthat zooms and pans objects. I made the zoom, it is working fine.
The problem is to _x and _y of the zoomed MovieClip. I want it to be just like, lets say, the zooming with the magnifung glass in photoshop.
I have attached a Zip containing the FLA file.
Please help!

3d Panning Layer
hmm, so here it is

when I move the mouse, each layer moving at different speeds, but the movement is a bit buggy, it's like when moving diagonally it'll move like stair, instead of diagonal line

when moving horizontally or vertically, it's moving to the direction, stop then move a bit again.

anyone know how to fix this so they'll have smooth movements?

Image Panning
Hello,
how do get this effect?
http://www.theboondockstv.com/
http://game.timezero.ru/game.ru.html
thanks

Camera Panning
is there any way in Flash MX to create a camera pan without having to enlarge each movieclip? heres an example of it in Flash MX 2004...
Click Here well if you know how to do it please tell me how. i will credit you in every movie i make which has camera panning in it.

Panning Out From Stage
i have a close up of an graphic on stage and would like the movie to 'pan outwards' so that the viewer can see all of the graphic.
how would i do this please?

thank you very much!

Zooming Or Panning ?
I am working on a movie with multiple Animated gifs which i convert to graphic symbols. I would like to have closeup shots on some of there faces while there dialoge apears. The only way i know to do this is to just grab every thing, or at least everything that i want to be closer, and resize it bigger.
Is there a easy way to do this?

Thanks.

More On Zooming And Panning
I am building a photo gallery in which users will able to zoom and pan the loaded image into the holder movie clip, I need the actual big image to be scaled down to a certain size( the mask size ) and then on click I want to show the big without the mask and pan it around. this is what I build so far. I got it to drag around. Any help is much appreciated. Tahnks







Attach Code

import caurina.transitions.*;
holder.mask = masker;


var xml:XML;
var images:XMLList;
var spacing:Number = 10;
var thumbWidth:Number = 60;
var thumbHeight:Number = 60;
var counter:Number = 0;

var loader:Loader = new Loader();// for the big Image
//loader.alpha = 0;
holder.addChild(loader);
loader.contentLoaderInfo.addEventListener(Event.COMPLETE,largeImageLoaded);

var xmlLoader:URLLoader = new URLLoader();
xmlLoader.addEventListener(Event.COMPLETE,xmlLoaded);
xmlLoader.load(new URLRequest("gallery.xml"));



function xmlLoaded (e:Event):void {

xml = XML(e.target.data);
images = xml.image;

for(var i:uint=0; i<images.length();i++){
var thumb:MovieClip = new MovieClip();
var thumbLoader:Loader = new Loader();
thumb.x = 65*i + spacing;
thumb.y = 370;
thumb.src = images[counter].@url;
thumb.mouseChildren = false;
thumb.buttonMode = true;
thumbLoader.load(new URLRequest(images[counter].@thumb));
addChild(thumb);
//Tweener.addTween(thumb, {alpha:1, time:(.2*counter)+.5, transition: "easeInExpo"});
thumb.addChild(thumbLoader);
thumb.addEventListener(MouseEvent.CLICK, clickedThumb);
counter++;

}
loader.load(new URLRequest(images[0].@url));

}


function clickedThumb (e:MouseEvent):void {
/*if(loader.alpha > 0) {
Tweener.addTween(loader, {alpha:0, time:.5, onComplete: loadNewImg, onCompleteParams: [e]});
} else {
loadNewImg(e);
}
*/

holder.removeChild(loader);
loader.load(new URLRequest(e.target.src));


}
function loadNewImg(e:MouseEvent):void {
loader.load(new URLRequest(e.target.src));
}


function largeImageLoaded (e:Event):void {
holder.addChild(loader);

}

holder.addEventListener( MouseEvent.MOUSE_DOWN, holderMouseDown );
function holderMouseDown( evt:MouseEvent ):void {
var boundaryWidth:Number = new Number( holder.width - masker.width );
var boundaryHeight:Number = new Number( holder.height - masker.height );
var boundaryX:Number = new Number( masker.x -boundaryWidth );
var boundaryY:Number = new Number( masker.y - boundaryHeight );
var boundaries:Rectangle = new Rectangle( boundaryX, boundaryY, boundaryWidth, boundaryHeight );

holder.startDrag( false, boundaries );
}

holder.addEventListener( MouseEvent.MOUSE_UP, holderMouseUp );
function holderMouseUp( evt:MouseEvent ):void {
holder.stopDrag();
}

Panning Image Help
Hello

Im having a bit of trouble on the panning image im working on. Theres a couple things I wanna do to it but im not quite sure how. Im useing partial code form the infinate menu tutorial but added a y axis onto it. Im working with a really big image so Instead of making the image infinate, how would I set up boundries so that the image could scroll to a certain point and then stop when it reaches the end. the map movie code is just this.

onClipEvent (load)
{
xcenter=350;
ycenter=200;

speed=1/20;
}
onClipEvent (enterFrame)
{
var distance=_root._xmouse-xcenter;
_x+=(distance*speed);
var distance=_root._ymouse-ycenter;
_y+=(distance*speed);
}




I also wanted to make it so the camera zooms in at certain points on the image. Any help is very much appreciated as always.

Thanks in advance,
Zach

Sound Panning.
i'm making a game with tanks at the moment, and there will be explosions happening from side to side on the screen.

i was thinking that it would be good to pan the sounds, so explosions on the right of the stage would play on the right speaker etc.

i tried to do this by creating new sound objects for each explosion and then setting the pan for each, individually, but it seems that when i set the pan for one sound object, it sets that for all of them. is there a way around is?

thanks in adv

Panning A Movieclip?
what i want is a MC with little thumbnails.. the MC will be scaled largely and i want it to be moved left and right up and down using the mouse movement?

Panning Image
Hi, I need help with panning an image. I already made the panning but I cant stop the image when it reach the border of the mask. I look for tutorials in other sites and haven't found anything

If some one want to see my .fla here it is:
www.ebsolutions.ws/imagepanning.fla

Thank you

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