Whats a better way to remove an old image or an image that is not there at all?I am working with this XML slideshow and I have tweaked it the way I want, except the first image that loads doesn't disappear. How can I make this statement better? I've tried if (previous || imgHolder.numChildren > 0 ) as well and didn't work
I have an image gallery but I can't seem to get the previous image removed. I have two functions:
ActionScript Code: function clearLoader():void { try { var li:LoaderInfo = slideLoader.contentLoaderInfo;
[Code]....
But in some way not the previous image is removed, but the one before that. Annoying, because if image 1 is larger than image 2, image 1 stays on the background. It is only when loading image 3 the first image is removed from the stage.
I am rebuilding my website and need to remove a mc when another mc is clicked. [URL]. The movie clips are pages and if you check the link you will see the pages aren't removed they simply stay on the page when the new mc appears. This is the relevant part of the .as which appears to have a remove code but doesn't seem to take affect.
function navigate (e:MouseEvent):void { trace (e.target.name); // Remove the current movie clip container_mc.removeChildAt (0); switch (e.target.name) { [Code] .....
how to remove a mc when another mc is clicked.The movie clips are pages and if you check the link you will see the pages aren't removed they simply stay on the page when the new mc appears.This is the relevant part of the .as which appears to have a remove code but doesn't seem to take affect.
------ function navigate (e:MouseEvent):void { trace (e.target.name);
I have a datagrid in a flash app. The intial use works fine. The flash has the ability to recalculate the needed data which I then use to repopulate the existing datagrid. What is the best way to clear out a datagrid and repopulate it?I tried:ifxGrid.dataProvider.removeAll();but it does not clear out the previous dataifxGrid.removeAllColumns();this worked a little but not entirely.So what's currently happening is that the new data is appended to the old data. So if I had 50 rows in the 1st calculation and then I have 70 rows in the 2nd calculation I end up with 120 rows of data in my datagrid.
I am creating images by loading in thumbnails and creating a bitmap of each form the press of a navigation button. However I cant seem to remove child of the previous button pressed. You can see thge example here [URL].
Code: function loadImage():void { var loader:Loader = new Loader(); var urlRequest:URLRequest = new URLRequest(imageURLs[loadedImages]); loader.load(urlRequest); loader.contentLoaderInfo.addEventListener(Event.COMPLETE, imageLoaded); [Code] .....
I'm trying to create a movie clip with images that will slide from one image to another using next and previous buttons. I want a sliding effect. For example on this site: [URL] The right side large image you can slide the image by using the arrows. That's exactly what I want...but in flash.
Ive just completed the Kirupa XML Slideshow today and have it all working well. But i cant figure out how to fade out the previous image as the next image fades in.
how to activate the animation that removes the previous page items before loading new page when you click on a menu button. like this website [URL] When you click on a menu button, current items are removed with nice animation before new items appears.
(I'm using flash CS4.) I've created a movie for my home page, which can been seen at: [URL] In the movie first there are pics of a building, then my drawings of a building, and finally words that fade in. This consists of three jpegs that I turned into symbols, to get them to tween. The problem is when the words fade in. I tried doing this two different ways, and only one worked, but there is a flaw in it. To get the words to fade in I copied the drawing jpeg and put the words on it, and then saved it as a separate jpeg. Unfortunately, the tweening out of the jpeg #2 and the tweening in of Jpeg #3 with the text on it don't sequence perfectly so you will notice that the center building fades out a little bit as the words fade in. My second attempt was to make a symbol of just the text in the proper location, while not using a background, but when I converted it into a symbol, it took on the same size background as the stage, and thus covered up the everything as it tweened in, and I was left with just text at the end of the movie. ...I know I've probably worded this poorly, because I don't know all the flash terminology yet. .
I want to use a next/previous image thing, which loads the next image from an array into a second movieclip(which will be hidden)... then swap the visiblity of mc_1 and mc_2 ...attach a preloader and stuff.its basically an effort to save some peoples on 56K dial-up lines.so it alternates between mc_1 and mc_2 (which is the easy bit)
this code works, although when I rerun the function by clicking on "box" it just loads the image at pic[0] (winterrangep1.jpg) while tracing this.picNumber in the loadNextNumber function I get NaN.That only becomes NaN when _root.box is clicked, not when it is run from the _root.
On the timeline I have a bunch of buttons which point to different frame labels with images and content. Is there a way that I can make the images fade so that no matter what order a button is clicked, the images will still fade in/out from the previous image?
I'm having problems with my AS2 and XML (on Flash 8). I finally figured how to create a simple slideshow which incorporates a "Next" and "Previous" button...but what i'm struggling with is: "How to click on the 'next' button so that the existing image scrolls to the left as the new image from the right moves to the center. And the opposite for the 'previous' button". Currently I have the existing image disappearing (alpha 0) and then the new image scrolls to the center from the right - which is not what I want to do.
Here's my current script: import mx.transitions.Tween; import mx.transitions.easing.*; function loadXML(loaded) { if (loaded) { xmlNode = this.firstChild; [Code] .....
I'm using Kirupa's xml image gallery and what I'm trying to accomplish is to have the gallery loop forward and back, that is when a user clicks the forward button and it comes to the last image it will automatically "loop" and go to the first one and if the user clicks the back button and he's on the first image it will go backwards. I was able to get the forward loop working, but not the back one.
Here's my code: function nextImage() { if (p<(total-1)) { p++; if (loaded == filesize) { picture._alpha = 0; picture.loadMovie(image[p], 1); slideshow(); [Code] .....
I try to implement a gallery of image with two buttons on each side of the picture to go to the next or the previous image.
This is my code: leftButton.addEventListener(MouseEvent.CLICK, ButtonLeftHandler); rightButton.addEventListener(MouseEvent.CLICK, ButtonRightHandler); function ButtonLeftHandler(event:MouseEvent):void { trace("Mouse Button Left clicked"); picIndex--; [Code] .....
On my output, I get Sequence Stopped When I clicked on a button. I don't get the trace message "Mouse button left..." My sequence is blocked.
I found a script with a preloader for images which references the jpg names usingin an array which works great for what I wanted to do, but I would like to set up a button that allows the previous name on the list to be loaded and shown. Sorry Im a noob so Im trying to understand all this code. I tried making the +1's negative but that didn't seem to work.
I have started brazing up recently. I'm presently stuck on a project and I need your assistance. I'm loading xternal data from xml and I want the next and previous button to pick the next data from the xml and display. If the user presses the button when the end of file as been reached the next button display only the last data, so for the previous button it displays the first data. I have included a transition effect on display of each image upon user interaction with the buttons. Also I want the first data to be displayed before user interacts with the buttons.
I have made a Photogallery in Flash, which displays one image at a time using the tutorial on this website. Now I want the user to be able to cycle through the images using the Mouse Wheel (scroll up = display previous image, scroll down = next image).Heres what Ive got so far:
Code: Mouse.addListener(mouseListener); var mouseListener:Object = new Object();
Any way to add 2 buttons : next_image, prev_image to this gallery [URL], when the image is loaded at full size I want that 2 buttons to apper and when I press them to load me next image or pre image
The source cod is this import caurina.transitions.*; var folder:String = "photos/"; var css_file:String = "flashmo_202_style.css"; var show_tooltip:Boolean = true; // true OR false var tween_duration:Number = 0.6; [Code] .....
I have a gallery where if a thumbnail is selected it preloads, then fades out the current image and fades in the next.
If the user selects a thumbnail then selects a different thumbnail before the previous image has fully loaded (and faded to alpha=100) it is problematic. How could I code this so that a thumbnail could only be selected if there is an image displayed on screen?
My files are here [URL]
I also need to do exactly the same thing with the main menu buttons. I've attached the .fla + dummy .swfs
I'm trying to create an image viewer, with a next and previous button. The buttons work, but the problem is that when the button is clicked before the image runs its full course, it messes up the position of the image. eg. if the image is set to move 400px and the next button is clicked when the image is at 300px, it moves from the 300px mark and not the 400px mark causing part of the second image to show under the mask.
I need to somehow disable the button after it is clicked and then enable it once the image has moved the full course. Here is a snippet of my code
i purchased a slideshow.but slideshow's next&prev button doesnt skip if an image is lost. i want the slider to jump to the next image which is exist. check out the code below.
HTML Code: function TRANSITION(obj:Object, B:int = -1){ var _a:int = c_pos var _b:int
I created a gallery following this tutorial [URL] And I am proud of myself because I am a begginer I won't to add two buttons to this gallery one that will go to the last picture of gallery and another that will take me to the first one. And I just don't know how to make it I gues my quetion is how to modify that code , so the button won't go to previous image but it will take my to the last one
hows things, this is my first post on kirupa. Which i have found to be a great source of information regarding AS3 flash and so much more. I've set up an array which contains images fro a folder. when you click the thumbnail a larger version of the image with the name appears. I want to be able to click the previous or next button and move through the array eg;
var imgArray:Array = new Array (img1, img2, img3, img4)
if img3 is displayed and you press the previous button it loads img2 same with the next button
I need to make a series of 35 buttons that display an image when clicked. However, I need the previous displayed image to disappear when any other button is clicked.I have this to toggle the images on/off:[code]Any idea what I can add to the function to turn all the other buttons visibility to false when any other button is clicked?
I have a Flash as 3.0 project that has 16 movieclips, each movieclip contains 3 images. The first image is the same for all 16 mc's the second image is different for all and the third image is different for all. I have the fla set up so when it is called it will play the first mc and stop. Buttons on the rightside would be used to move the playhead to the desired framename to play all the others.
My question is, each image fades in each clip like a build then stops. Is there a way to code this so when you select a new image to play the stopped previous clip on stage can play backwards so instead of fading in it would fade out, THEN the playhead would move to the frame name and play the newly called clip? So it would work like this
I have a player that loads both images and videos. I am having a problem removing the previous child from the holder and am close to using tricks to fix it. I'd rather not. Here's the code that loads the image:
Code: var _mediaLoader:Loader = new Loader(); _mediaLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, imageLoaded); _mediaLoader.load(new URLRequest("blah.jpg"); function imageLoaded(e:Event):void{ videoConsole.imgHolder_mc.addChild(_mediaLoader); }
And my flv loader is a bunch of mumbo jumbo with this code at the end: Code: videoConsole.imgHolder_mc.addChild(flvPlayer); So, how can I remove the previous child, if there is one, when loading the next item on the playlist?