Help With Image Viewer
Here's my problem. I have created this image viewer but when I click to enlarge one of the images I want the user's ability to rotate the viewer to be disabled. Presently, when the image enlarges the user can still rotate the viewer and click on other images and enlarge them. As you can imagine this makes things look a bit confusing. Can any help me figure out what I need to do to make this happen? I don't want the user to be able to rotate the viewer until after he/she has already clicked on the enlarged image and it has finished scaling back down to its original size.
I have attached the FLA in a Zip file.
This is the code on the 2nd frame of the images' button. This also acts as a frame for the image. Here is where the rotation and scaling are handled.
code: // user transforms if (pressv!=0) { this.panel+=pressv; pressv=pressv*.975; if ((pressv<.45) && (pressv>-.45)) { this.rotographic.panelBtn.enabled=true; pressv=0; } } // 3d transforms theta+=_parent.speed; xbit=Math.sin(Math.PI/180 * theta); ybit=Math.cos(Math.PI/180 * theta); this._xscale=ybit*this.panel; this._x=xbit*this.radius; this._alpha=30+(ybit+1)*50; this._yscale=this.panel-3+(ybit+1)*3; stack=Math.round((ybit+1)*radius*2); if (stack==100) { stack=101; } this.swapDepths(stack);
FlashKit > Flash Help > Flash ActionScript
Posted on: 06-12-2005, 08:04 PM
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Image Viewer Help Please
Hello, everyone. I am using Flash MX btw. I am trying to make an image viewer using the sample that comes with Flash MX as a template. It works fine, but i can't publish it for flash 5 because it says some stuff is not supported, blah blah. I'm not good enough at this stuff to know what part of the script is only for MX, and even if I did, I wouldn't know how to change it. I am hoping that if I post the code here, perhaps someone could assist me in 'converting' it to Flash 5. Basically, i want the same effect, just for 5 instead of MX. Thanks in advance... .
p.s. i'll attatch the code as a text file cuz otherwise it is too long here
Image Viewer
I would like to learn how to make a image view like the one in the link below. Is their a sample anywhere or a book or webpage I can read to start to under stand how this was done.
check out this sample
Image Viewer
Hi All,
I am trying to create an Image Viewer or someting like a Slide Show...
It has 2 Sections.... One the THUMBNAILS (Comprising 9 thumbnails at a time... of a total of 90).
The second section would be the Picture selected.
I want to add 2 buttons.. One would scroll the Thumbnails for the Next Set of 9 Thumbnails when pressed. and the other button to the previous set..
I have managed to do that arranging the 90 thumbnails in a Layer and grouping the same and Masking to show the 9 alone and trying to Move the _x of the Group (Converted to movie object) when pressed the button.
But in this case the Thumbnails (that are Buttons themselves do not woek)... If I make the Group as a Converted Graphic Object the _x property movement does not work but the Thumbnails click works....
Please help me out of this... I am a REAL newbie and trying hard to learn this... please lemme know how I can accomplish this and Just in case if this is not sufficient information, do lemme know...
With a Lot of thanx,
Wishy
Help Me Please Image Viewer
I have gone through the tutorial via http://www.kirupa.com/developer/mx/photogallery.htm
to create a useful photo gallery which i have done successfully in a NEW FLASH MX DOCUMENT. Now I want to apply this to my site
When my site has loaded and I click on my playlists page I created a button and put the following code on it:
on (release) {
gotoAndPlay (2);
}
On this page I made it so that when I go to frame 2 it would play the image viewer. It does this ok but I can't seem to alter the size of the image. The strange thing is that I can alter the size of the image in the NEW FLASH DOCUMENT but on my site the image won't move.
I rekon the problem lies with the page. I need to try another method.
I have trialed and errored just about everything.
I have tried to move the rectangle shape I made but the image doesn't move at all. Why does it move in the NEW FLASH DOCUMENT and not my site. I don't understand
HELP ME PLEASE
PLEASE SUPPLY LINKS TO DOCUMENTATION THAT CAN HELP
Help Me Please Image Viewer
I have gone through the tutorial via http://www.kirupa.com/developer/mx/photogallery.htm
to create a useful photo gallery which i have done successfully in a NEW FLASH MX DOCUMENT. Now I want to apply this to my site
When my site has loaded and I click on my playlists page I created a button and put the following code on it:
on (release) {
gotoAndPlay (2);
}
On this page I made it so that when I go to frame 2 it would play the image viewer. It does this ok but I can't seem to alter the size of the image. The strange thing is that I can alter the size of the image in the NEW FLASH DOCUMENT but on my site the image won't move.
I rekon the problem lies with the page. I need to try another method.
I have trialed and errored just about everything.
I have tried to move the rectangle shape I made but the image doesn't move at all. Why does it move in the NEW FLASH DOCUMENT and not my site. I don't understand
HELP ME PLEASE
PLEASE SUPPLY LINKS TO DOCUMENTATION THAT CAN HELP
Help Me Please Image Viewer
I have gone through the tutorial via http://www.kirupa.com/developer/mx/photogallery.htm
to create a useful photo gallery which i have done successfully in a NEW FLASH MX DOCUMENT. Now I want to apply this to my site
When my site has loaded and I click on my playlists page I created a button and put the following code on it:
on (release) {
gotoAndPlay (2);
}
On this page I made it so that when I go to frame 2 it would play the image viewer. It does this ok but I can't seem to alter the size of the image. The strange thing is that I can alter the size of the image in the NEW FLASH DOCUMENT but on my site the image won't move.
I rekon the problem lies with the page. I need to try another method.
I have trialed and errored just about everything.
I have tried to move the rectangle shape I made but the image doesn't move at all. Why does it move in the NEW FLASH DOCUMENT and not my site. I don't understand
HELP ME PLEASE
PLEASE SUPPLY LINKS TO DOCUMENTATION THAT CAN HELP
Image Viewer
Hi all ..
Anyone know where to find a tutor or fla.
that can help me do a viewer that enlarge a picture and got
a navigation like small window, where to drag and zoom
Please see the illustration
Have a Nice day
Flemming
Image Viewer
I'm not sure I should be using flash for this but maybe someone can help. I'm working on a page in dreamweaver. I want to create a window that will display alternating jpeg images from a file. I would like the images to either fade in and out of each other or some other changeover effect - I don't want them to just replace each other. I also would like the user to be able to click on the image and be able to link to another page.
Should I be doing this in Dreamweaver or is this a dreamweaver/Flash combination with the image window coming from flash? And if it is a flash issue can somene point me in the right direction on how to accomplish this (I just need a direction)
Thank you very much.
Image Viewer
Hello,
i want to create an image viewer just like this on:
http://www.airtightinteractive.com/d...pan/index.html
The meaning is to save images in a directory and then load them this way into flash. Does anybody know how to start with it ? or where i can find a tutorial ?
Help With Image Viewer
Hi,
I am trying to make a horizontal image scroller the same as used on (I dont need to have the start and end images fly on/off):
http://www.shopcomposition.com/
I have got the mouse wheel scroll to work the same, but I cant work out the scrollbar.
It needs to scroll smoothly when dragging, but ease to the correct location when the scrollbar dragger is released.
I have attached what I have so far. Any help would be greatly appreciated.
Image Viewer - Please Help
Can someone please post a link to a tutorial on how to setup a flash image viewer. It should be like the below -
< |thumbnail 1| |thumbnail 2| >
When you click on the left right arrow, the thumbnail should scroll. When you click on the thumbnail, the enlarged image should appear above. It is enough if it is static (hardcoded) and not dynamic.
Thanks a lot.
Image Viewer
i want to build a image viewer which scrolls the images across the screen horizontally. i have found a few tutorials on different ones but not what i am looking for.
could someone please point me in the direction of a good tutorial on how to do this. i only need to no how to get them to scroll continuously across the screen.
XML Image Viewer Help
Hello, I'm working on this XML Image Viewer that is based off an excellent one found on kirupa.com by iKim. Everything works fine so far in the attached document...but I am running into a problem. I have it so the grid maker function spaces out 16 thumbs evenly, corresponding to the 16 entries in the XML doc. Great...but does anybody know how I could add more XML entries and develop the interface to only load 16 at a time, and then having a "next" button to then show the next set of thumbs?? I've tried many things...pulling my hair out!
Image Viewer
can anyone give me a hint how to get such an image viewer like ths one seen on the page of heroic alarma man:
http://www.alarmaman.com/photo/?reqPhotoAlbum=14
ive got the thumbnails on my page, now i just need such a viewer...
thanks
Image Viewer
I'm putting together a flash movie and I'd like to have thumbnails that users can click on to enlarge. However, I want to do it internally and not call up a javascript pop-up window. I've seen this done so many times where a thumbnail is clicked, a larger version of the image appears and the rest of the stage greys out but I can't for the life of me find any scripts online.
Also, since my images have smallish text that gets warped when not viewed at 100%, the thumbnails and full-sized images need to be separate files. Anyone have any ideas?
Image Viewer
Hey world. Is there any way that you can browse for an image, and then show the image selected?
thx in advance
Image Viewer
Does anybody know of an image view that scrolls images across the screen (left to right) but if the cursor is over the viewer it stops scrolling. If you put mouse towards left/right of the viewer the images scroll in that direction. When cursor leaves viewer the viewer carries on scrolling as before.
Hope I haven't lost anybody.
SkyteMedia.com =P
FMX - Image Viewer W/ Nav
Can someone help?
I'm trying to convert an image viewer into an nav bar. The images are blurred and as the mask rolls over, the sharper image then becomes visible in its place. All the pics are in one MC. I want to add AS to make each image at on release go to a separate url. Any help is greatly appreciated.
Thanks
Rev C
(file too large to upload here)
Image Viewer
here is some code for a rotating crank that controls an image gallery.
refer to the "image viewer stops?" thread in the flash mx forum (sorry don't know how to link to a forum yet!) for more info. attached is the fla.
i want to be able to crank clockwise to scroll images forward and counterclockwise to scroll images backwards. If i keep cranking, i want the images to continue to change, if i stop cranking, i want it to stp on that image. it doesn't sem tooooo hard, i'm just numb from tryig to figure it out.
thanks!
---------------------------------------
[as] code for crank
---------------------------------------
mc.btn.onPress = function() {
scrolling = true;
};
mc.btn.onmouseUp = function() {
scrolling = false;
};
mc.onEnterFrame = function() {
if (scrolling) {
var dx = mc._x-_xmouse;
var dy = mc._y-_ymouse;
var rad = Math.atan2(-dy, -dx);
var angle = (rad*180)/Math.PI;
mc._rotation = angle;
if (angle>85 && angle<=90) {
_root.changePhoto(1);
} else if (angle>175 && angle<=180) {
_root.changePhoto(-1);
}
}
};
Image Viewer
Ok,
everybody has seen those fancy image galleries that preload and show thumbnails and smoothly autoresize depending on the picture's size.
I've tried to search here and there on the forum but I can't find some kind of step by step lesson... Or at least a simple simple FLA that I can, after learning from it, recreate and make better with animations & co.
what I'd love to know:
-how to make single thumbnail image have a preload (for example 20 thumbnails shown and everyone has its indipendent thumbnail preload, how can I do it?)
-how to interface smartly images/folders with Flash through XML (that's quite easy but I'm still confused with strings in flash )
-how then to preload the opened image (quite similar to point one)
if anyone has some "lesson" or would like to discuss about these things on this page it would be nice.
Thanks,
b°k
Xml Image Viewer Again :(
I notice a lot of people putting in requests on the xml image viewer here at kirupa. I have a question hope it is not too much to ask, on the image viewer it uses a main image and also a thumbnail image, now for me I have to update a lot of images on my webpage and at the moment the xml gallery has been a god send big thanks to kirupa. Back to my question would it be much work to adjust that code so the main image is resized to a thumbnail and get rid off creating the thumbnails.
If this isnt too much coding would be nice to see a single image viewer that creates thumbnails from its main image...
regards
Image Viewer
Going out on a limb here. Have a look at the galleries in this photographic portfolio:
http://www.rsteenphoto.com/index2.php
If any1 has time can they point out the main steps I would take to recreate the image gallery? Is everything just loaded from movie clips and external jpgs or is it all XML?
cheers.
XML Image Viewer
hi. this is my first post ever....
okay...i have a site with 18 thumbnails. the thumbs are loaded into the root movie via an external SWF. i have the picture viewer loading into the root menu. it looks nice, but i can't get it to load the correct images. it always starts with the 1st image. is there anyway around this. what command to i need to put on the thumbnails?
thanks.
- humandudeman
FMX - Image Viewer W/ Nav
Can someone help?
I'm trying to convert an image viewer into an nav bar. The images are blurred and as the mask rolls over, the sharper image then becomes visible in its place. All the pics are in one MC. I want to add AS to make each image at on release go to a separate url. Any help is greatly appreciated.
Thanks
Rev C
(file too large to upload here)
Image Viewer
here is some code for a rotating crank that controls an image gallery.
refer to the "image viewer stops?" thread in the flash mx forum (sorry don't know how to link to a forum yet!) for more info. attached is the fla.
i want to be able to crank clockwise to scroll images forward and counterclockwise to scroll images backwards. If i keep cranking, i want the images to continue to change, if i stop cranking, i want it to stp on that image. it doesn't sem tooooo hard, i'm just numb from tryig to figure it out.
thanks!
---------------------------------------
[as] code for crank
---------------------------------------
mc.btn.onPress = function() {
scrolling = true;
};
mc.btn.onmouseUp = function() {
scrolling = false;
};
mc.onEnterFrame = function() {
if (scrolling) {
var dx = mc._x-_xmouse;
var dy = mc._y-_ymouse;
var rad = Math.atan2(-dy, -dx);
var angle = (rad*180)/Math.PI;
mc._rotation = angle;
if (angle>85 && angle<=90) {
_root.changePhoto(1);
} else if (angle>175 && angle<=180) {
_root.changePhoto(-1);
}
}
};
Image Viewer
Ok,
everybody has seen those fancy image galleries that preload and show thumbnails and smoothly autoresize depending on the picture's size.
I've tried to search here and there on the forum but I can't find some kind of step by step lesson... Or at least a simple simple FLA that I can, after learning from it, recreate and make better with animations & co.
what I'd love to know:
-how to make single thumbnail image have a preload (for example 20 thumbnails shown and everyone has its indipendent thumbnail preload, how can I do it?)
-how to interface smartly images/folders with Flash through XML (that's quite easy but I'm still confused with strings in flash )
-how then to preload the opened image (quite similar to point one)
if anyone has some "lesson" or would like to discuss about these things on this page it would be nice.
Thanks,
b°k
Image Viewer
Hi,
I'm working on a little promotional site for the music scene here in town. We're looking to create a page where people can view all the fliers for the upcoming shows. They'll be various sizes so resizing of the large image is a must.
I was really liking the idea of doing a left and right scroll show like this.
http://www.paolosantambrogio.com/
I'm experienced with xml and general grids but I was wondering if someone could tell me how exactly they achieve the resize effect on the large image as well as the spacing of the thumbnails on the left and right. I know within the xml being loaded you probably need to specify the height and width of the large image being viewed, which isn't hard to specify of course.
It's just the actionscripting used to create the grid, resize, spacing, etc.
Any help would be greatly appreciated
Image Viewer
Last edited by panzer : 2002-10-28 at 08:41.
HI !!!! I have developed quite image viewers for web-sites i make.. first ones were quite sad, because i had to make a swf file for each jpg, and the client had to give me images.
Thanx to MX, i had made this better, client uploads images through online form, but i have to save how many images are at the directory, to know if i have to jump to first image in my viewer when user is in last one.
Is there any way to know how many files are in a directory ?? that way you can make a universal image viewer in flash very easy ..
P.S:I don't like using non universal technologies as JavaScript, and i'm looking for something with pure Flash, i know how to do with PHP or JSP, but sometimes it requires to pay for JSP or PHP hosting only for that.
Sorry for the bad english ....
Image Viewer Help
Hello, I have been having a problem in ActionScript 2.0, still very inexperienced with flash and I'm wondering if it is just a problem with my syntax or something.
I am trying to make a button when clicked load a movie clip, sounds simple I kno but for some reason i can't see what the problem is.
the code is as follows, there will be multiple buttons loading into the same clip container
//code//
_root.createEmptyMovieClip("container",1);
tile1_btn.onRelease = function () {
container.attachMovie("large1_mc","large1_mc",this.getNextHighestDepth());
large1_mc._x=(Stage.width-large1_mc._width)/2;
large1_mc._y = (Stage.height-large1_mc._height)/2;
//code//
Something tells me the solution is very simple but I can't seem to find what's wrong since when it runs flash states no errors which is even more frustrating. Any help whatsoever is much appreciated.
Image Viewer/ Browser
Can anyone tell me how to make a simple image viewer based on the images in a folder for a photo album type interface
thanks
Toxxus
Image Viewer Problems
I'm trying to make an image viewer where the control of the 7 images is via 7 different buttons; however, I want the images to fade in and out between each other, not just appear.
Now the problem is, how do I make, say button 4 to show picture 4 when I was just looking at 7 and make the transition look right? I'm I just asking too much? I tried everything that I can think of and I can’t seem to figure it out.
Now if I am asking too much, then how about using just 2 buttons to view back and forth? Can that be done because I can’t figure that one out?
I look forward to your suggestions. Thanks.
XML Image Viewer Question
Hello all,
I'm currently working on a modified version of Macromedias Image Viewer.
With the added features from tupps my movie now has auto play, stop, go to end slide (swf's) etc.
At the moment i have the following code:
PHP Code:
<?xml version="1.0"?>
<Slides>
<slideNode jpegURL="images/pic_1.swf">Picture 1</slideNode>
<slideNode jpegURL="images/pic_2.swf">Picture 2</slideNode>
<slideNode jpegURL="images/pic_3.swf">Picture 3</slideNode>
<slideNode jpegURL="images/pic_4.swf">Picture 4</slideNode>
<slideNode jpegURL="images/pic_5.swf">Picture 5</slideNode>
<slideNode jpegURL="images/pic_6.swf">Picture 6</slideNode>
<slideNode jpegURL="images/pic_7.swf">Picture 7</slideNode>
<slideNode jpegURL="images/pic_8.swf">Picture 8</slideNode>
<slideNode jpegURL="images/pic_9.swf">Picture 9</slideNode>
</Slides>
This group of slides (swf's) is one Presentation
What i now want to be able to do is add a combo box that displays the Presentation title in it and any other Presentation titles that may exist (at a later date).
Can anyone tell me how i go about this? Can i add a <Presentation> tag to my xml file with the name of that Presentation or do i need to create a new xml file for each Presentation?
Any ideas greatly appreciated.
Regards,
Suzy
Image Viewer; The Light Way
here is a little, waaaaay simple flash site I made for a friend of mine
http://www.gianoliconfezioni.it/index.htm
I've got a little question to ask, somethin' I've seen in some sites but I can't understand the way it works...
look at the 'tour' section (the bottom-left link in the index); it's a slideshow of pictures...LOTS of 'em. The download of this section would be a lot faster if only I could learn the way to load every picture with a little preloader only when I need it instead of the whole, heavy section. It could work not only for simple pictures but even for whole pages in a flash site; somethin' I would be VERY interested in. Is there a tutorial/movie to help me with this task?
Image Viewer Component
Hi,
Does anyone know of the best image viewer component out there? I need to show screen shots on my site through a pop up href link.
Thanks
Flash Image Viewer
Hi, I am about to start working on a portfolio to display my photography, and I found a free download of a flash-xml scrip that pretty much does what I am looking for, but I wan't to be able to modify the FLA file and I did not have the option to download it fomr this site. Here is the viewer
http://www.e-simpson.net/TestPortfolio/
I did a few test shots
I am pretty much wondering if somebody knows where I can find a similar flash file where I can view the FLA file? I want to be able to midify it and call the movie up withing another flash file, and obviously not have a link to somebody elses site in my flash file.
Thanks
Caleb
Looking For A Good Image Viewer
Hi there,
I've been browsing for an image viewer for ages. I'm looking for a dynamic image viewer that loads the images using a text or xml file and it needs a thumbnail view. I found a perfect one called simpleviewer http://www.airtightinteractive.com/simpleviewer/lores/
but they don't include the fla. does anyone have any suggestions????
Dynamic Image Viewer
Hi,
I'm looking at making an flash picture viewer to plug into a website, I know that with flash MX you can script it to display jpegs from a folder within a website. For example if you had a folder full of pictures you could make flash display those dynamically instead of embedding the pictures into the flash file - with me?
OK, I know how to do all that bit, what I'm wondering is this . . .
Can flash look at the 'picture' folder and return the amount of images/files within the folder?
If so - how?
Mike
Best Image Viewer I've Ever Seen...does Anyone Have The Code?
Hello all,
I was looking at this viewer and was wondering if someone has a tutorial, or source files of something similar to this. They are selling there, but I really want to learn how to make it myself.
http://imagevuex.inn.no/imagevue/?co...e=config10.ini
Thanks in advance,
Tv Image Viewer Problems
I am trying to make an image viewer that loads external images and displays them on a TV screen (so viewing a different image is like changing the channel). I am having alot of issues with the scripting end of this though, I have it so that the image loads but the display effect I want is messed up and my preloader display doesnt work at all.
Essentially, there are two frames of interest: frame 2 which is used for preloading and frame 3 which is used to do the image effect.
So what I have is an empty movie clip with an instance named "container" which is replaced with the image when it is loaded. It exists in both frames.
I also have a preloader bar with an instance named "loadbar" which only exists in frame 2.
The image to load is in a variable called "currentImage". The effect I'm going for is to have a preloader bar load the image and when it's loaded have an effect on the image where it starts centered on the tv screen with a size of about 20x20pixels then expands horizontally all the way and finishes by filling out vertically - all while increasing opacity.
If it helps the size and positioning of the TV screen is:
width: 295
height: 166
x-pos: 25
y-pos: 73
Here is the actionscript I have:
frame 2:
Code:
stop();
//set screen width/height/etc.
screen_width=294;
screen_height=168;
screen_x=25;
screen_y=73;
//load image
function preloadImage(){
var loaded=container.getBytesLoaded();
var total=container.getBytesTotal();
if(loaded==total && total>25 && container._width!=undefined){
clearInterval(preloadID);
delete preloadID;
//center the container
container._alpha=0;
container._width=20;
container._height=20;
container._x=screen_x+((screen_width-container._width)/2);
container._y=screen_y+((screen_height-container._height)/2);
//go to frame 3
gotoAndPlay(3);
}
else{
//update preload bar
loadbar._width=(197/(loaded/total));
}
}
container.loadMovie(currentImage);
preloadID=setInterval(preloadImage,50);
frame 3:
Code:
stop();
function resizeImage(){
//we want a tv effect, so the width opens first
//check the width
if(container._width<screen_width){
if(container._width+10>screen_width){
container._width=screen_width;
container._x=screen_x;
}
else{
container._width+=10;
container._x=-5;
container._alpha+=10;
}
}
else if(container._height<screen_height){
if(container._height+10>screen_height){
container._height=screen_height;
container._y=screen_y;
}
else{
container._height+=10;
container._y-=5;
container._alpha+=10;
}
}
else{
//make sure the alpha is max
if(container._alpha<100){
container._alpha=100;
}
//it is resized, so kill the interval and move on
clearInterval(resizeID);
delete resizeID;
gotoAndPlay(4);
}
}
//do the resize animation
resizeID=setInterval(resizeImage,10);
Thanks for any help with this.
3D Image Viewer With Zoom
I am creating a 3D image viewer for some clients, what I have so far is this
www.studio2photo.com
click on the 360 VR section
I would like to add a zoom in/zoom out feature...so shoppers can zoom in on different areas of the products...
I've tried some simple methods, scaling etc, but when you zoom in the image is very pixelated...so my thought was to have a second mc that had bigger files so they would look proper when resized, make sense?
I'm having problems with my buttons responded well between the two mcs (small and large)
Do I need to assign depths to each to respond better? Should I do a loadMovieClip (when the + button is pushed it goes to a diff mc) so that my files aren't so big as a published swf? Is it possible to track what frame you are on and go to the corresponding on in the bigger mc?
I've tried experimenting with the tutorials on FK and most don't jump between 2 clips...but for it to look right, it really should be 2...
Any thoughts???
[F8] Dynamic Image Viewer
Ok, basically what I am trying to do is create an image viewer that I can update dynamically. The flash file loads the jpeg file names, and then inserts them into an array. Then, I would like to output the jpeg files to the screen. I need a function to run when they are onRollOver and onRollOut. To keep it simple, I won't show my code in its entirety. I have two bits of code that I have tried using, but both of them have their own distinct errors.
CODE 1:
Code:
displayThumbs = function(my_ar:Array):Void {
for (var i=0; i<my_ar.length; i++) {
var container:MovieClip = createEmptyMovieClip("container"+i, _root.getNextHighestDepth());
mcLoader.loadClip(my_ar[i], container);
container._x = THUMB_SPACE + (PIC_WIDTH * i) + (THUMB_SPACE*i);
container._y = 30;
trace(container._name);
container.onRollOver = createTextBox;
container.onRollOut = removeTextBox;
}
};
testfunction1 = function():Void {
trace("work number 1");
};
testfunction2 = function():Void {
trace("work number 2");
};
When I run CODE 1, all the images display correctly, but the rollover events don't work. I thought it might be a good idea if I placed all of the image mc into one larger mc, so I tried this.
CODE 2:
Code:
displayThumbs = function(my_ar:Array):Void {
var mega_c:MovieClip = createEmptyMovieClip("mega_c", _root.getNextHighestDepth());
for (var i=0; i<my_ar.length; i++) {
var container:MovieClip = mega_c.createEmptyMovieClip("container"+i, _root.getNextHighestDepth());
mcLoader.loadClip(my_ar[i], container);
container._x = THUMB_SPACE + (PIC_WIDTH * i) + (THUMB_SPACE*i);
container._y = 30;
trace(container._name);
mega_c.onRollOver = testfunction1;
mega_c.onRollOut = testfunction2;
}
};
testfunction1 = function():Void {
trace("work number 1");
};
testfunction2 = function():Void {
trace("work number 2");
};
Now when CODE 2 runs, it only displays the last image, but the rollover functions work. AHH! Help please. Thanks. If you need anymore information, I'll post the rest of code, maybe that can shed some light on the situation.
Need Simple Image Viewer
Hi guys.. I've been searching for a few days for a tutorial to make a simple pop-up image viewer.
All I'm looking to do is have a window pop-up within my swf file to show a picture. I do not want a browser window, and I do not want a thumbnail gallery/slide show.
I've tried searching terms like; floating; pop-up, pop, window, panel, popupmanager. nothing contains the information I seek.
please can you point me to an appropriate tutorial?
thank you
Dynamic Image Viewer...Possible?
I need to make a dynamic horizontal scroller whick houses images and descriptions. I am thinking XML, but don't really know where to start, as I am not a huge programmer...(but trying) There are gonna be 60+ images and descriptions to load from a database, so I can't load them all at once; otherwise, I could do this. Here is a mock up flash file I did for client approval:
http://www.mfgtoolkit.com/new/
Any help or steer in the right direction is well appreciated...Thanks so much
Random Image Viewer
I'm very green with flash and actionscript but i'm trying my best. I'm creating a website completely in flash (i.e. the website and all of it's pages are just one swf). On the front page of the website i would like to have a picture displayed, however i would like it to change to another random picture either on refreshing the browser or every 10 seconds, whichever is easiest. I know that including all of the pictures in the actual swf will make the load time even longer for my website and i was told to use a blank movie clip and then import the pictures externally. i have no idea what this means. can anybody help me out or point me in the direction of a solution to my problem? thanks
Sliding Image Viewer
I've made an image viewer that makes use of the "film strip" approach with a long mc that slides into place when buttons are pressed which is viewed by a basic mask, the client has informed me now that he wants it to make use of both landscape and portrait shaped photos and that he doesn't want either to have a border. So,
this means that the image viewer itself needs to be able to change. As it is the viewer itself is just a mask, i am able to make the viewer mask(on the layer above the film strip) shape for a landscape or portrait, the thing is that i want this to happen when the mc has finished moving because it looks messy having it tween as the film strip moves underneath, what i need to be able to do is detect when the slide mc has finished moving and then output a gotoAndPlay command.
this is the as on the strip:
ActionScript Code:
// ON the movieclip
onClipEvent (load) {
// Initial pos
_root.xpos=97;
}
onClipEvent (enterFrame) {
// MOVING SCRIPT PART
var speed = 8;
var viscosity = 1.5;
xpos = _root.xpos;
//X Pos
difference = xpos-this._x;
xvelocity = (xvelocity+(difference)/speed)/viscosity;
this._x += xvelocity;
}
example button for a landscape img:
ActionScript Code:
on (press) {
if (isPortrait == true) {
_root.mask_mc.gotoAndPlay(11);
_root.border_mc.gotoAndPlay(11);
}
_root.xpos = -102;
isPortrait = false;
}
and a portrait:
ActionScript Code:
on (press) {
if (isPortrait == true) {
_root.xpos = -266;
} else {
_root.border_mc.gotoAndPlay(2);
_root.mask_mc.gotoAndPlay(2);
_root.xpos = -266;
var isPortrait = true;
}
}
mask_mc and border_mc are the viewing mask and a border around it, going to frame 2 plays an animation that tweens them to portrait from landscape, playing 11 reverses this.
Thanks.
Sliding Image Viewer
I created an image viewer that loads external JPEGs into a movieClip and then, when clicking a next button, slides the masked MC over to view the next image. (See attached file).
Currently, if the user continues to click "next" it keeps sliding the MC over 60 pixels. I want the images to appear to loop, like have image #1 appear after image #6, but I'm unsure of the best way to do it. I thought I could have some code check and see if the last image is being viewed and if so, have it somehow revert back to its original position. But I'm wondering if there's a better way.
Also... is there a way for ActionScript to check and see how many JPEGs are in a folder and then load them all in the viewer instead of predetermining a maximum or minimum amount for the viewer?
Thanks in advance.
Ultra Image Viewer
Does anyone know where I can find a FLA file that will do exactly what this one does:
HOME SHOPPING NETWORK EXAMPLE If you click on the necklace image, check out all the zooming, sliding and also check out the alternate views and really smooth transition. I would like to either build this or find one that is already made.
Image Viewer Used In Dreamweaver
I've made a website for a restaurant/art gallery, and I've used Dreamweaver's Image Viewer to make a slideshow of images that a photographer sent me (http://lamatatinta.com/Sub-pages/Espacio_de_arte.html) for the current show in the gallery.
For reasons that are known to me, when some (but not all) of the images appear in the slideshow, they've got a link that goes to Adobe.com.
In the Flash element pull-down, there's nothing in imageLinks; and I've tried using Photoshop to re-save one of the problematic images with a new name, but the links remain.
I'd appreciate any suggestions from people who know more about Flash than I do--which is, I'm sure, just about everyone on this forum!
Thanks,
Richard
Image Viewer Question
Dear All,
Has anyone come a cross a good tutorial that clearly explains how to create
an image viewer that displays a list of thumbnail images, dynamically loaded
from a directory, and the ability to click on any of these images to zoom in
on them?
Thanks again.
Alastair MacFarlane
|