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




Getting Current Image / Total Images In XML



Having abit of a struggle here to get the current image in the XMLList that my mouse is rolling over!

My XML looks like this with afew more item tags.

Code:
<items>
<item>
<name>a name</name>
<image source="http://www.domain.com/images/image0.jpg" thumb="http://www.domain.com/thumbs/image0.jpg">description</image>
<image source="http://www.domain.com/images/image1.jpg" thumb="http://www.domain.com/thumbs/image1.jpg">description</image>
<image source="http://www.domain.com/images/image2.jpg" thumb="http://www.domain.com/thumbs/image2.jpg">description</image>
<image source="http://www.domain.com/images/image3.jpg" thumb="http://www.domain.com/thumbs/image3.jpg">description</image>
</item>
<items>
and my AS3 looks like this

ActionScript Code:
function xmlLoaded(event:Event):void{    xml = XML(event.target.data);    images = xml.item.image;    for (var i:int=0; i < imagesToLoad; i++)    {        startLoader=new Loader();        startLoader.load(new URLRequest(images[_randomArr[i]].attribute("thumb")));        startLoader.name=images[_randomArr[i]].attribute("source");        addChild(startLoader);        startLoader.addEventListener(MouseEvent.CLICK, showPicture);        startLoader.addEventListener(MouseEvent.ROLL_OVER, showInfo);        startLoader.addEventListener(MouseEvent.ROLL_OUT, removeInfo);    }    function showPicture(event:MouseEvent):void    {        imageLoader=new Loader();        imageLoader.load(new URLRequest(event.target.name));        addChild(imageLoader);    }    function showInfo(event:MouseEvent):void    {        imageText.x = event.target.x;        imageText.y = event.target.y;        for (var j:int = 0; j < images.length(); j++)        {            if (images[j].attribute("source") == event.target.name)            {                imageText.text = images.@source[j].parent().parent().name;            }        }        addChild(imageText);        imageNumber.x = event.target.x;        imageNumber.y = event.target.y;        for (var k:int = 0; k < images.length(); k++)        {            if (images[k].attribute("source") == event.target.name)            {                imageNumber.text = [k+1] + " / " + images.@source[k].parent().parent().image.length();            }        }        addChild(imageNumber);    }}


I managed to get the total number of images but I just dont know how to get the current image. If its 1 out of 4 or 2 out of 4 and so on.

What I´m getting now is the iteration the image has out of all the images in the portfolio, and not the iteration it has in the <item> tag.

I should add that all the images are added randomly, which ofcourse, confuses things

Any help in this matter is, like always, very appreciated!

Regards

/rundevo



KirupaForum > Flash > ActionScript 3.0
Posted on: 10-01-2008, 07:53 PM


View Complete Forum Thread with Replies

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

Upload Images And Change The Current Image
hi,i would like to know how can i do to make an upload on a flash movie what i wanna do is something like (hi5 a page that displays information an photos with the possility to change the photos uploading and deleting the phots on the flash page,if anybody can giv me a clue i would aprreciate.

thanks in advance

Getting The Current And Total Frames From An External Swf?
Hi there,

Im trying to goto the next scene when an external swf has reached it total frames. I just cant get the function to read the current / total frames and throws up an error every time.


Code:
stop();

var myRequest:URLRequest = new URLRequest("ani-preloader.swf");
var myLoader:Loader = new Loader();

myLoader.load(myRequest);
addChild(myLoader);

myLoader.addEventListener(Event.ENTER_FRAME, runOnce);

function runOnce(e:Event):void {

if (myLoader.currentFrame == myLoader.totalFrames) {

gotoAndPlay("day-movie");
myLoader.removeEventListener(Event.ENTER_FRAME, runOnce);
}
}
Iv tried loads of different things, this.currentFrame, e.target.currentFrame but just cant get it working.

Any ideas? Thanks for your time.

Current And Number Of Total Frames In Dynamic Text
At the moment I'm making a presentation for school in Flash MX 2004. I want some kind of progression bar in the presentation. This is how I have it in my mind:

2/15

2 is the current frame and 15 is the total number of frames. I know I have to do this with the use of ActionScript in combination with dynamic text labels. How can I read out the current frame number and the total number of frames?

The names of the dynamic text labels are:

"cFrame" and "tFrames"

Current And Number Of Total Frames In Dynamic Text
At the moment I'm making a presentation for school in Flash MX 2004. I want some kind of progression bar in the presentation. This is how I have it in my mind:

2/15

2 is the current frame and 15 is the total number of frames. I know I have to do this with the use of ActionScript in combination with dynamic text labels. How can I read out the current frame number and the total number of frames?

The names of the dynamic text labels are:

"cFrame" and "tFrames"

Current/total Time For Video Component Playback
I managed to get the 'total time' working but it only updates after the first video is played, here's my code :

Code:

n = Math.round(videoPlayer.totalTime);
mins = Math.floor(n/60);
secs = n - 60*mins;
secs<10 ? secs = "0"+secs : secs;

//Dynamic text field on the stage called 'tTotalTime'
tTotalTime.text = mins+":"+secs


But i'm not sure if 'videoPlayer.playheadTime' (to get the current video time) works because I call it when the video is just starting so even if it was working it would give me a responce of 0. So I guess what I would need to do is set it up so that it updates every second or so?

Also, how would I retrieve the filename of the video that is currently being played?

[F8] Getting Total Bytes Of Loaded Images
Hi all
is there anyway to amend the script below to give me the total bytes loaded of all the images, instead of one at a time? thanx in advanced.

PHP Code:




this.createEmptyMovieClip("image", this.getNextHighestDepth());
for (i=0; i<7; i++) {
    duplicateMovieClip("image", "mc"+i, this.getNextHighestDepth()+i);
}
pix = [path+"001.jpg", path+"004.jpg", path+"006.jpg", path+"asia.jpg", path+"007.jpg", path+"pk5.jpg", path+"pk3.jpg"];
n = 0;
mcs = [mc0, mc1, mc2, mc3, mc4, mc5, mc6];
mcs[n].loadMovie(pix[n]);
onEnterFrame = function () {
    ld = mcs[n].getBytesLoaded()/1000;
    tl = mcs[n].getBytesTotal()/1000;
    mcs[n]._xscale = mcs[n]._yscale=30;
    pc = (ld/tl)*100;
    if (pc == 100) {
        n++;
        mcs[n].loadMovie(pix[n]);
        pos.text += "Image "+n+" Size "+(ld+"
");
        dim.text = "loaded "+(n)+" of "+mcs.length;
    }
};

XML Gallery: Preload On Current Image/cross-fade Image
Hello,
I am new to action script but I am learning quickly.

I took the following tutorials and made a hybrid:
Photo Gallery Using XML and Flash
Photo Slideshow Using XML and Flash


I redesigned the interface and created this:
http://www.onarresdesign.com/greg/work2.html

Everything works great, but now I want to take it further than the tutorial.
I am trying to make the images cross-fade. I am open to any suggestions and I have tried many techniques with little success.

Here is the closest solution steps I have come up with:

Code:
1) First image preloads (grey background showing)
2) First image loaded into top level MC 1
3) First image fades in
4) First image in top level MC 1 remains visible
5) First image gets loaded into bottom level MC 2 behind current movie clip.
6) Top level MC 1 clears because its preloading next image
Bottom level MC 2 remains visible
7) Preloader shows on top of bottom level MC 2
8) Next image is loaded into top level MC 1
9) Next image fades in (cross-fade effect achieved because previous image is behind it)
10) Next image gets loaded into bottom level MC 2
Repeat process
I can't get the action script to do what I want. I have off set the moveclips to show that the images are loading into both movieclips. I currently have the 'nextImage()' function controlling this so it is understandable the both images are cleared because the function is loading new images into the movie clips at the same time. How do I get one movie clip to remain constant while the other is loading? It seems to be a matter of where the function is placed. Or so I think.

I would appreciate any help I can get on this. If would also appreciate any suggestions for making the code for the control buttons cleaner.

Thank you,
</asla>

Total Noob: Slideshow Of Tweened Images. How To Pause OnMouseover?
you can view the source for my slideshow here

i tried googling this topic and found some code but i couldn't get any of it to work...

thanks so much

Movie Clips. Image Sequences And Playback (total Newb)
I created a movie clip symbol, and imported an image sequence into it.

But when I put that movie clip symbol on the stage it only shows the first frame during playback.

I'm sure it is something obvious, but google isn't being my friend today. I can fake my way to flash usually, but its not working this time.

Fading Image On Top Of Current 1
hi,

I have 4 buttons and i have 4 images. When the user clicks the second button, i want the 2nd image to fade on top of 1st image. And when the user clicks the 3rd button, i want the 3rd image to fade on top of the 2nd image. And, if the user then clicks on the 1st button, then i want the 1st image to fade on top of current image (3rd image).

here is an example of what i'm looking for:

http://69.20.52.206/laring/portfolio/main3.html

click the buttons on the above site, see how the images in the middle rectangle fade on top of the current ones when you click the different buttons? that's exactly what i want.

I tried searching for tutorials that would explain this, but no luck.

Thanks,
Baljinder

Loading Images From A Current Folder/subfolder And Display On Webpage
Hi,

Is is easy to use flash to read all images from the current fold/subfold and load them onto webpage? In addition, when mouse is over an image, it displays image full size on the right. Is flash best for this?

I'm new to this and I get confused with all frames and symbols. could someone please show me some samples or point me to some links that show this?

Thanks in advance for those who can help :)

Saving Current View As An Image
Hi,

I have a movie with interactive elemnts (dragging items) to plan tactics for a game.

Basically, I wondered if there's an option to make it so you place the items where you wan't them, hit a button and it'll save the current SWF view (like a print screen of only the SWF) to a file (Whether they can specify what and where isn't vital but would be nice).

If this can be achieved then I would greatly appreciate any help.

You can view the file (still being worked on) at www.no-recoil.com/Userimages/Test-ASC.swf

Click on the top left button and drag the disc around. the X button closes the disc. Basically there will be lots of the discs in various positions and I was wondering if there's anyway to save it as an image to show the rest of the clan their idea's on the positions.

Thanks a lot.

Current Image Select Button
i trying a xml gallery tutorial and i want to add a select button with the next and previous

right now i have the next and previous buttons but dont know how to make the select button
so user can click on it and select whatever thumbnail currently display on the slideshow and will open bigger image and text

anyone knows how to do this?


Code:


slides_xml = new XML();
slides_xml.onLoad = startSlideShow;
slides_xml.load("slides.xml");
slides_xml.ignoreWhite = true;
//
// Show the first slide and intialize variables
function startSlideShow(success) {
if (success == true) {
rootNode = slides_xml.firstChild;
totalSlides = rootNode.childNodes.length;
firstSlideNode = rootNode.firstChild;
currentSlideNode = firstSlideNode;
currentIndex = 1;
updateSlide(firstSlideNode);

}
}
//
// Updates the current slide with new image and text
function updateSlide(newSlideNode) {
imagePath = newSlideNode.atributes.jpegURL;
slideText = newSlideNode.firstChild.nodeValue;
loadMovie(imagePath, targetClip);
}
//
// Event handler for 'Next slide' button
next_btn.onRelease = function() {
nextSlideNode = currentSlideNode.nextSibling;
if (nextSlideNode == null) {
break;
} else {
currentIndex++;
updateSlide(nextSlideNode);
currentSlideNode = nextSlideNode;
}
};
//
// Event handler for 'Previous slide' button
back_btn.onRelease = function() {
previousSlideNode = currentSlideNode.previousSibling;
if (previousSlideNode == null) {
break;
} else {
currentIndex--;
currentSlideNode = previousSlideNode;
updateSlide(previousSlideNode);
}
};



//
// Event handler for 'select slide' button
select_btn.onRelease = function() {
currentSlideNode = currentSlideNode.currentSibling;
if (currentSlideNode == null) {
break;
} else {
currentIndex++;
updateSlide(currentSlideNode);
currentSlideNode = currentSlideNode;
}
};

Total Visits/total Sound Plays
How can I get a "total visits"type function but instead of recording the number of visits, it records the number of sounds streamed from that flash movie and makes it visible

Total Visits/total Sound Plays
How can I get a "total visits"type function but instead of recording the number of visits, it records the number of sounds streamed from that flash movie and makes it visible

Total Visits/ Total Sounds Played
How can I get a "total visits" type function that makes the number of times a page has been visited visible, but instead of recording the number of visits, it records the number of sounds streamed from that flash movie and makes it visible. (Not pages but externally loaded and streamed sound.)

tks
ken

Loading An Image Separately Into The Current Movie...
I want to have a separate loader inside my current movie to load images separately. Otherwise it would take forever to load my movie with like 12 different images in it. Each image would have a thumbnail, then when you click on it, the loader would pop up on a top area and the image would load. How do I do this?

XML Gallery With Thumbs - Current Image State?
Hey all,

I am having trouble making some additions to the tutorial found here.

I have the XML gallery with the scrolling thumbnails. I would like to make it so that when you click a thumbnail, not only does the new image load, but the thumbnail you've just clicked shows that that is the current image you're viewing. For example, here is what I have:

1 - all thumbnails load at 25% opacity
2 - on rollover, they go to 50% opacity
3 - on rollout, they go back to 25% opacity.

What I want is that when you click one, it goes to 100% and stays there until you click another.

Here's what I tried:

I made this function

function resetAlpha (){
target_mc.enabled = true;
target_mc.alpha = 25;
}

then in the onRelease for the thumbnails, I have:

target_mc.onRelease = function() {
resetAlpha();
this._alpha = 100;
this.enabled = false;
p = this.pictureValue-1;
nextImage();
}

I thought that by doing this it would reset all the thumbs back to 25% opacity, re-enable all of them, but then disable the one that was just clicked and make it 100% opacity. But what is happening is that none of them are resetting and that when I click them, they all stay 100% and disabled. Is there anyone who can shed some light on this problem? I didn't post all of the source code because you can see it in the tutorial more clearly. I would really appreciate some help if anyone can offer it.

Thanks,
Tom

Total Visits/total Plays
How can I get a "total visits"type function but instead of recording the number of visits, it records the number of sounds streamed from that flash movie and makes it visible

Total, Total Newbie Question
Um, i cant quite get my character, call him bob, to fall and walk, jump and turn around on a platfrom. this is the basis for all my games!

Read Current URL Of Current Page Into Flash
Third try:

Flash 7 -

Is there any way at all to read the current URL of the current browser page of a Swf ?

I have 450 links from various places to a Single Page with a Single Swf on it. The Swf will take a ?arg from the URL path and then show the correct animation.

Links to the page appear like these -

mysite/mypage.htm?1234
mysite/mypage.htm?1004
mysite/mypage.htm?0034

My Swf needs to know what the 4-digit number is when the page is opened in browsers.

Note: Using Javascript to build the Embed/Object at runtime is not an acceptable solution in this case.

Thanks

Current Scene, Current Frame? How?
I want to get the current frame in the current scene.

Right now, I have a movieclip symbol within a scene, and I need to get the current scene/total scenes within the current scene, not the current movieclip, and not the entire flash movie.

I have tried _root["scene1"]._currentframe and _root.scene1._currentframe and _parent._currentframe ... none of them work?


What must I do?

[F8] Images From Same Image Don't Work
OK, I hope someone understands this. I had a large sprite sheet, which i loaded into flash and took apart, saving different sprites as graphics.

I then copied these over into another .fla. When i export however, I get the right shape of the image but it is filled with a different part of the original image.

The images work perfectly well in an empty stage, but not in the .fla i need them to. Why is this? What is the difference between a new flash document and a in use one?

Thanks

Many Images Tumbling Into One Image
I am sitting here wondering how this can be accomplished in Flash? via Actionscript...?
I saw it on a website. Bunch of rectangles/fragments coming together to form one complete image. How can I do that on my homepage? Do I break everything up into fragments...just how can I accomplish the tumbling into one image?
Hope this is easy to do! I just need this done on my homepage.
Mary Alice
art.design@adelphia.net

Create 1 Image From 2 Images
I would just like to know how I would go about creating one image from two or more images stacked on top of each other.

I would like to use this for a number of smaller things e.g. creating images with a watermark over the top of them automatically, putting a clearcut image onto a background automatically, etc.

I hope you get what I am trying to say. The main thing is that I have a background image (maybe uploaded by the user), then it puts the watermark image over the top and joins them together into one flattened image file (watermark image would probably be a PNG with a transparent background so the image under it shows through). I am just not sure how I would achieve this in AS3.

At the end I would like to let the user save the image to there computer, but that is a different question. Its generating the image at runtime that is my main problem.

Thanks.

Image Gallery Using Xml And Fade In And Out Images
Could anybody help me out with this task, What i need to build is a image gallery that pulls the images from an xml file and displays them as thumbnails in a scroll pane then once the vistor clicks on the thumbnail the original size fades in and then when another image is selected, then the first image fades out and the second image fades in. Any help would be great...thanks in advance.

DJSTYXX

Image Scroller Not Displaying All Images...
Hi there all,

Could someone PLEASE have a look at this fla?
The scroller does not display all the images in my movieclip. It keeps on jumping when it gets to the end! It just needs to be a continuous motion - no beginning or end, just keep on looping.


Any ideas???
Thanks

Import Image Sequence: Images Not At 0,0?
Hi there:

I'm importing an image sequence (71 images) to my stage. Both the Stage and the images are 1200px square. When I import the images, they all end up at roughly x:242 y:2. Am I doing something wrong, or is there an easy way to get them back to the top left of stage?

I have to do this for 32 FLAs each of 71 frames, and would hate to have to manually set each image to the proper position...

Thanks in advance!

Can't See Images In External Swf Image Gallery
I used the tutorial on this site to make a simple image gallery. I also used a tutorial on this site to load external SWFs using MIDFRAME.

www.inest.ro/cort/galerie.swf - this works
www.inest.ro/cort/ - it doesn't display the photos when loaded in the main SWF (go to "galerie" to see)

I need help.

Get Image Dimensions Of Imported Images
Is there a way to get the height and width of an image that was loaded via an xml file? I am making an Image Viewer and I want the display to resize to the dimensions of the image loaded.

Thanks

Cannot Set Image Size Of XML Loaded Images
I'm Loading an image into a MC based on an XML file. I'm setting the initial alpha to 0, loading the image, then setting the alpha to 100 once I see that it is fully loaded. The problem is that I want the image to be resized, which is not working. Every time I check the size of the MC once the image is loaded I get 0x0. Here preload code.


ActionScript Code:
function preload(num) {        eval("image"+num).loadMovie(url[num],1);        eval("image"+num).onEnterFrame = function() {                var bytesloaded = this.getBytesLoaded();        var bytestotal = this.getBytesTotal();        var percent = Math.floor(bytesloaded/bytestotal*100);                trace(this._width);                if(percent >= 100 && this._width > 0 && this._height > 0){                         trace(this._width);            this._alpha = 100;            delete this.onEnterFrame;                     }        };    };

Random Images That Create Another Image
http://www.ramonfauria.com/experience/

this is the site where i saw this ideia, and its great
i need to make something similiar to this, i have time to do it ( the project is one month away ) but i dont even know where to start :S
can you give me some advices?

thanks,
ptfury

HELP: Scroll Text And Images On Background Image
[Repost in appropriate forum]

Hi there,

I'm a complete newbie to Flash MX, but learning fast...
I've been seraching through previous posts - but I haven't been able to find and answer.

I wish to be able to scroll text and images within a scrollpane box on top of the main background image/jpg of the movie and have the scrollpane box transparent. I've tried it with text and a scrollbar and it works good (see example). It seems that when you make the MC with the text and images you want to display, it retains the white background when you view it.

I've attached a little example test url to show what I'm talking about, it shows both the scrollpane (on the Left) that is not transparent with the background and the scrollbar on the right that is.... This is the effect that I'm trying to accomplish. I also have a shadow and a semi-transperent box on which I placed the scroll boxes, might be a bit hard to see with the backgound pic on this example.

If their is an entirely different way to get the same effect, I would like if you would share it.

Any help appriciated
many thanks,
JD

Here is my example..!

Importing Images, Image Editor At RUNTIME
Hi guys,

Is it possible to import an image into an flash movie that's supposed to work as an image editor?

Basically in the image editor, I want to open a dialog box that can browse the user's computer and upload his gif or jpeg, display in the image editor's workspace.

Has anyone done this before?

Getty Images - Changing Image Each Visit
Anyone know hoe t do this in HTML? I would love to have it so that every time someone visits my home page, the browser picks between like five images to display.

Anyone have a clue?

Displacing Surrounding Images When Roll Over On An Image
Hi I need some help here. How can I display the images like whats seen on http://www.topix.com.
If I roll over on an image the surrounding images should be displaced.
Need help on this one as soon as possible.

Thanks

Aneesha

Creating Many Images Using One External Image File
Hello all,

I'm rather new to actionscripting and am trying to display 2 images using the same external file. I have tried a lot of different things and I'm not sure what I'm doing wrong.

I understand that to insert an external image (jpg or otherwise) I must:
1) create an instance of the loader class
2) add the loader instance to the display list
3) call the loader()method to pull it in an external asset

So my corresponding code is this and it works fine with just one image:

var brickRq:URLRequest = new URLReques("target.png");

var brickLoader:Loader = new Loader(); // step 1
brickLoader.load(brickRq); // step 2
brickLoader.x = 15; // set coords
brickLoader.y = 35;
addChild(brickLoader); // step 3

But if I try to add a second brick, only the second brick appears and this is the way I add the second brick.

brickLoader.x = 35; //new coords
brickLoader.y = 55;
addChild(brickLoader);

Whatever the last x,y value is, that image is displayed but what about the first image? I've tried to create a sprite and loaded the image into the sprite but I am encountering the same problem. I've been stuck on this for days.

If anyone has any ideas or hints what I should be doing, please, I would appreciate it.

-m

Importing Images From After Effects - Image Size Changes
Hi,

When I import an image sequence (or single image) from AE the png files import HUGE -- an 800 x 547 image imports as a 2267712.0 x 1550548.1 image.

These images open correctly in Photoshop and Fireworks only Flash seems to do this. Any help would be greatly appreciated!

Thanks!

Changing Image On Stage Using Images From Library
I am a relative newbie to Flash (with way too much Director experience) so I am getting confused.

I have a dozen jpgs in the library, and I need to switch which one is on stage at any given time via an actionscript.

I learned how to do that with external jpg images using loadMovie, but can't find a way to do the same thing when the images are inside the library.

Any help will be greatly appreciated!

Image Gallery - Resize The Images, Not The Slideshow
I'm working on an xml driven flash website where clients can modify an xml file directly to change the appearance of the site (eventually i'll make a flash/php dashboard GUI). The site will have listings each with a photo.
I'm trying to find a way around having the clients have to crop images to thumbnail and enlarged view size themselves. In other words the images would be displayed scaled to fit within a movie clip. Does anyone know if this is even possible? It seems that an image is an image at its pixel dimensions and there's no real way around that...

I guess my target demographic is pretty tech savvy (relatively) and could probably crop images with a basic image editor... it would be nice to find them some kind of batch processor or something. Although at the most clients will probably only add five or ten listings a month or so. if anyone has any insight into this dilemma that would be appreciated!

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

XML Image Viewer Calling Images In Folder
Is there any way to program XML to call on ALL the images in a folder and have them work in a flash slide show. Rather than identifiying them by thier specific names can a system be used to identify what order they are to be presented regardless of how many you add or remove from the folder?

in other words is their a way to make an XML viewer that is adaptive and not restricted to "specified" images in a folder. It will just display the all the images that are currently in that folder.

any ideas?

Preload Images In Background As Viewer Looks At First Image
Hi everyone, thank you ahead of time...

I have a swf file calling an xml file w/ several images. I want the first image to load in the swf, then the additional images in the xml file to load invisibly in the cache while the viewer looks at the first image.

the point is to create a seamless flow through a gallery, rather than having each iamge preload.

please please help, I just cant find a good script for this

Thank you!!

Image Gallery Problem (images Not Showing Up)
so i was working on a tutorial (http://www.youtube.com/watch?v=cylX1lThTN0)

the video is great and even though it's in as 2.0 i was able to write all the code for as 3.0

but for some reason when i type


Code:
thumb1.addEventListener(MouseEvent.CLICK, thumb1click);
function thumb1click(event:MouseEvent):void
{
gotoAndPlay("img1");
trace("button 1 click works fine");
}
what i don't understand is that


Code:
thumb1.addEventListener(MouseEvent.MOUSE_OVER, thumb1Over);
function thumb1Over(event:MouseEvent):void
{
thumb1.alpha = 1;
}

thumb1.addEventListener(MouseEvent.MOUSE_OUT, thumb1Out);
function thumb1Out(event:MouseEvent):void
{
thumb1.alpha = .5;
}
which is written on the same actions frame work just fine but not the click that shows the pictures.

i have attached a link to download my fla (my file is too big to upload) in case anyone would be nice enough to try to help me figure it out. if it seems too involved, then i understand.

i tried everything from making sure my pictures were sent to front, checking the alpha transparency, etc ...

i used trace statements on the buttons and they work fine. i did everything i could think of and i just can't get the last step to work.

help is greatly appreciated.

http://rapidshare.com/files/135742581/myGallery.zip (just click Free User to download)

thanks

Image Gallery - Resize The Images, Not The Slideshow
I'm working on an xml driven flash website where clients can modify an xml file directly to change the appearance of the site (eventually i'll make a flash/php dashboard GUI). The site will have listings each with a photo.
I'm trying to find a way around having the clients have to crop images to thumbnail and enlarged view size themselves. In other words the images would be displayed scaled to fit within a movie clip. Does anyone know if this is even possible? It seems that an image is an image at its pixel dimensions and there's no real way around that...

I guess my target demographic is pretty tech savvy (relatively) and could probably crop images with a basic image editor... it would be nice to find them some kind of batch processor or something. Although at the most clients will probably only add five or ten listings a month or so. if anyone has any insight into this dilemma that would be appreciated!

Createing A Quad Image With Rotating Images..
Here's what I'm trying to mimic..

http://www.clemetzoo.com/

Now, I know how to do the mouseovers to change colors and to tweens to cause dropdowns, etc...but what I"m having problem is mimicing the fading quad images.

I found this example, and it works fine for a single movie clip, but I've been unable to cause it to do 2 or more movies at same time.

http://actionscript-toolbox.com/samplemx_slideshow.php

Here's my action script I created based on thier example..I added a second "blank" clip from the library they supply ad x=400 and named it quad2.


Code:
pic_arr = ["flower_pink.jpg", "flower_yellow.jpg",
"flower_purple.jpg", "flower_red.jpg",
"flower_orange.jpg"];
color_arr = [0xf75eb0, 0xf6f818, 0xbb57c8, 0xdf1734, 0xfe9809];

quad1.attachMovie("slideshow", "uuShow1", 1, {
_x:0, _y:0, _visible:false, fps:12, nFrames:24, alphaIncr:10,
slides_arr:pic_arr, slideDepth:50, repeat:true});
quad2.attachMovie("slideshow", "uuShow2", 2, {
_x:400, _y:0, _visible:false, fps:12, nFrames:24, alphaIncr:10,
slides_arr:pic_arr, slideDepth:50, repeat:true});

quad1.uuShow1.addListener(quad1);
quad2.uuShow2.addListener(quad2);

quad1.onAllSlidesLoaded = function() {
this.uuShow1._visible = true;
this.uuShow1.beginTransitions();
};

quad2.onAllSlidesLoaded = function() {
this.uuShow2._visible = true;
this.uuShow2.beginTransitions();
};
Any thoughts sor suggestions would be appreciated. I'm pretty much a novice with flash and I need to create this by next week...

Image Error When Images Fade In Through Alpha Transparency
http://www.syntronix.de/flashintro.htm

in the last frame of the images that fade in there is an error i cant remove - they make a small flip - like if they are moved 1px horizontally

thanx for your help

tim

How To Do Scrolling Rollover Images W/result Image In Another Location
Hi-
New to FlashMX but I have used Flash 4/5. I'm out of practice using Flash and I can't remember how to get started on this:

I want to have a Flash site that has small images that scroll across the screen, when the user rolls over the images, a larger version of the image shows up in another part of the same page (no popups). I know how to do this in Dreamweaver with layers, but I can't figure it out. Otherwise called "disjointed rollovers".

I tried doing buttons(small images), with an image in the OVER state, but the image scrolls with the button/small image.

Where to start?
Thanks,
MFB

Re Sizing Image With Action Script, Multiple Images
Hi all

Ho have a digital camera , i can make a mini movie, a squence of 8 pics , when I import them it ask "It appears that the image is a squence, do you want to import all of them" I say yes then it imports them as 8 keyframes, now I want to resize them with actionScript.

any takes

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