Scrolling Reel Problem
I created a continous slide show usind the scrolling reel tuturial. The show works fine, the problem is when I load slideShow.swf into another movie clip in another movie.
I want the slideShow.swf to play when a certain button is pushed. So far in the home timeline on the first frame of the actions layer I have this:
button.onRelease = function() { if (_root.section != "slideShow.swf") { _root.section = "slideShow.swf"; _root.transition.gotoAndPlay("closing"); } };
the movie clip that the slideShow.swf is loading into has an instance name of "container."
This is the code on the first line of the slide show
slide_number = 17;
reel_speed = 1; slide_count = 3; m1 = _root.content.slide_1; m2 = _root.content.slide_2; m1._x = 0; m1._y = 0; m2._x = 600; m2._y = 0; _root.content.onEnterFrame = function() { _root.content.moveLeft(reel_speed); }; function moveLeft(nPixels) { m1._x -= nPixels; m2._x -= nPixels; if (m1._x<-600) { m1 = _root.content["slide_" + slide_count]; slide_count = slide_count += 1; if (slide_count > slide_number) { slide_count = 1; } m1._x = 550; m1._y = 0 } if (m2._x<-600) { m2 = _root.content["slide_" + slide_count]; slide_count = slide_count += 1; if (slide_count > slide_number) { slide_count = 1; } m2._x = 550; m2._y = 0; } }
What I have noticed is the first slide loads corectly, but then the rest don't work. Do I have a wrong path for all of the slides except for slide_1?
ActionScript.org Forums > ActionScript Forums Group > ActionScript 1.0 (and below)
Posted on: 03-22-2004, 07:33 PM
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Scrolling Picture Reel
Hi I need some help please. I am trying to accomplish a scrolling pic reel exactly like the one on this website http://www.lomamedia.com/V1.html. I want it in a bottom, scrolling continously without any pause or break in between and so far i have came up with this code only
onClipEvent(enterFrame){
this._x += 3
}
If someone knows the correct script please help. I can only use actionscript 1 that is what's compatible with my editor.
Scrolling Picture Reel
Hi I need some help please. I am trying to accomplish a scrolling pic reel exactly like the one on this website http://www.lomamedia.com/V1.html. I want it in a bottom, scrolling continously without any pause or break in between and so far i have came up with this code only
onClipEvent(enterFrame){
this._x += 3
}
If someone knows the correct script please help. I can only use actionscript 1 that is what's compatible with my editor.
Scrolling Picture Reel
Hi I need some help please. I am trying to accomplish a scrolling pic reel exactly like the one on this website http://www.lomamedia.com/V1.html. I want it in a bottom, scrolling continously without any pause or break in between and so far i have came up with this code only
onClipEvent(enterFrame){
this._x += 3
}
If someone knows the correct script please help. I can only use actionscript 1 that is what's compatible with my editor.
Demo Reel
I'm not sure if this is posted in the wrong forum. If it is, sorry
Ok, this is what I need done. First of all, if you have been to my site you know that my sister and I are a brother-sister tap team. We are looking to make a demo reel using some of our video clips that we have.
Now, I have no idea where to start .
If someone could please contact me on any of the instant messenger programs, or email me at michael@twofortap.com to help me, I would really appreciate it.
Thank you, and I hope to hear from someone soon!
Michael
www.twofortap.com
Cotton Reel
here's a little thing i made whilst i was messing around.
my idea was to create a 'cotton reel' that is on a spring so that you can pull string from it, and when you loosen your string, it rolls back up.
take a look
[swf=http://www.kirupa.com/forum/attachment.php?attachmentid=13863]height=700 width=700[/swf]
[edit]updated it so it's smoother when you roll over it - my friend complained [/edit]
Help With Picture Reel
I'm creating a picture show reel. It's very basic, but it's only for learning purposes. As far as I can tell, the Actionscript is correct. It's supposed to show three slides, but instead it's showing four. And the first two are overlapping each other. Can someone take a look at it for me? Thanks. I'll also post the code. It might be fruitless though if not looking at the FLA. It can be obtained from here
center = Stage.width/2;
cellWidth = reel_mc.cell_mc._width;
_root.onEnterFrame = function() {
leftStop = center-reel_mc._width+cellWidth/2;
rightStop = center-cellWidth/2;
reelSpeed = (_xmouse-center)/10;
reel_mc._x += reelSpeed;
if (reel_mc._xrightStop) {
reel_mc._x = rightStop;
}
};
function NewCell(num, details) {
oldClip = _root.reel_mc.cell_mc;
newClip = oldClip.duplicateMovieClip("cell"+num, num);
newClip._x = num*300;
}
NewCell(1, "");
NewCell(2, "");
NewCell(3, "");
Picture Reel Problem
*~ Made Using : FlashMX ~*
I have just tried to make a flash picture reel that loads up jpg's externaly and shows them in the picture viewer that you can scroll horizontaly (Newbie stuff or what! But that's me newbie ) Anyway when the pictures load up they don't load in the position of placeholder_mc and only one of them actually shows up? I need to know why they wont show in place? If you need to see the file I have ZIP'd it up and attatched it to this post with the pictures to.
Thanks in advance.
PS: I kinda need help A.S.A.P. so if you can be as quick as possible.
Cheers
Studentmonster
Reel Rolling Effect
How can i recreate the effect of reels on a fruit machine rolling and then stopping. I want to create a banner where the reels roll and then stop one by one with my title in each reel but i want it to look realistic.
Thanks for any help
Old Film Reel Effect
How can I do an old fashion film effect with scratches, the number countdown, and maybe even the sound of it all too? Is there a tutorial out there that will help? I am not sure if it would have to be a separate movie loaded on top of the main movie I want to show though.
Movie Reel Turning
Can anyone tell me the steps to make a movie reel turn while staying in one place?
Embedding A Demo Reel F8
What is the most effective way of showing video on the web?
Do I embed a flash video on my flash site or open a seperate url
as a quicktime or wmv?
Do I need a seperate streaming app or is flash effective enough?
The demo reel needs to be small but still have sharp image, It will be higher quality than normal as it is an efx reel.
Any ideas?
Ant
Continuous Movie Reel?
Hello guys...
I'm trying to dynamically bring in a selection of images in a row from left to right or right to left for the full width of the stage...
I've been to: http://www.actionscript.org/tutorial...el/index.shtml
but I need something that starts from the edge of one end and continues untill the other...
Cant figure out the script....please help
Flash Demo Reel: What's The Best Way To Put This Together?
Hey all,
I'm putting together a demo reel of a variety of Flash projects we've done.
I would like the resulting file to be controllable with a Flash controller, meaning I'd like users to be able to pause it, rewind, fast forward or scrub through it.
I already have a component for the VCR style controller but how would you suggest putting the various pieces together in a way that it will be controllable?
- Should I bring in each of the various Flash movies as a separate scene in an external movie, then export it as a SWF and load it into a holder MC?
- Should I bring each of the various movies into a separate slide? Would slides even work with a controller?
Is there a comletely different way altogether? What do you guys think?
Web Site Intro Reel
hi im designing a web site for my friend he is a rapper and he is going to have a show and we want to make a coming soon reel for his web site on the reel ive seen it before where you could see all the things the website does how can i do that does anyone know of any info for this.
Flash Reel 4 Real
Hi guys..
Been out searching for a job/internship.. came a cross this realy cool company http://www.ontwerp.tv/v4/ here in Johannesburg SA check them out.
Well the boss there told me i should prepare a reel that showcases my animation skills alongside my Design skills ( obvious ) using any software that am comfortable with (which is flash8 ), ever since ive been doing alot of research on this and came accross some realy cool animations out there like http://www.andreaswannerstedt.se/session/ .... done by the famous Andreas Wannerstedt ( got me all worked up )
I would like to adopt a simmilar idea as this http://www.andreaswannerstedt.se/session/ on my flash reel , but obviously diffrent colours , layout and content ,... my main problem is i am not so sure what processes to follow to achive this kind of clean effects...
( is it action scripts , or just filters or both ? and how does he get to have all the graphics interact that well switching from scene to scene)
So if theres any flash gurus out there who have any ideas please holla and lets discuss ...
Thanks ... help will be much appreciated ...
am at www.klausy.net & affiliated at www.elektroliquid.com
Flash Demo Reel: What's The Best Way To Put This Together?
Hey all,
I'm putting together a demo reel of a variety of Flash projects we've done.
I would like the resulting file to be controllable with a Flash controller, meaning I'd like users to be able to pause it, rewind, fast forward or scrub through it.
I already have a component for the VCR style controller but how would you suggest putting the various pieces together in a way that it will be controllable?
- Should I bring in each of the various Flash movies as a separate scene in an external movie, then export it as a SWF and load it into a holder MC?
- Should I bring each of the various movies into a separate slide? Would slides even work with a controller?
Is there a comletely different way altogether? What do you guys think?
Flash Picture Reel
I'm a noob at Flash, but I need to make this scrolling-picture movie from a folder of images. There will be no reaction from the mouse; it will just be a picture gallery that scrolls horizontally.
This is what my boss gave me:
Does someone know of a good tutorial I could look at?
Old Movie Reel Effect
I am wanting to make an old movie reel effect for my website using Flash 5. My navigation bar is going to come down and run by much like it would if it were going through a projector. When it stops I want all my links to look like slides from the reel. Any suggestions on where to start or how to go about doing this?
Flash Image Reel
hi guys !
from a long time ago i have been thinking how paramount pictures made the reel of the current movies playing
look at this : http://www.paramount.com/
anyone knows the logic behind that flash reel, or can give a link to a tutorial where teach this ?
cheerz !
How Do You Create A Movie Reel Effect?
I'm am developing in FLASH 5. What is the best way to create a movie reel effect. For instance if you what the perfed edges to acclerate in a forward motion for 20 frames and reverse for 10 frames at a slower rate and then back to a forward motion. Is this done with actionscript or can it be done without? Can you do this with a mask?
Old Time Movie Reel Countdown
Can anyone point me towards a tutorial or just a movie example of an old time movie reel countdown. Like a black and white 5,4,3,2,1 thing. I have one made, but it lacks the authentic look and feel so I need some pointers. I saw one of these quite some time ago, and now I can't locate anything on it.
thanks!
Script To Move A Reel Of Pics?
Hi there
I have a website I'm working on, and I have the stage 700x400 filled with the first image from a reel of pics (the reel has 5 pics, each 700x400).
I want it to work so that when I click on one of the buttons, the reel moves along to the next pic in line (gliding in, not just budging up). I guess that means once you've clicked 4 buttons, it will start moving backwards? Not sure, to be honest.
Any ideas what kind of thing I need for this?
All help gratefully received.
Steve
Looking For Mouse Reel Effect Like Www.skyimagestudios.com
Hey all, does any one know of a tutorial, or could point me in the right direction for a mouse reel effect like the one on http://www.skyimagestudios.com ? I've seen these around, I just can't find anything on it. Any help would be appreciated. Thx
Show Reel Wows (linking Several Files)
ok I've made 5 clips in Flash MX (they're all from different project files) .. but when I try to put them in a new project to produce a little show reel none of the clips work......
What's the best way to produce a little show reel??
ta,
mojo
Dynamic News Reel From XML - That Doesnt Scroll
Hi All,
Okay, I've created a flash (using MX) that I hard coded to have buttons (text w/ clear background) that scroll up to a point, stay there for 20 seconds or so and then scroll back down the way it came; then the next button scrolls up and so on ...
What I'd like to do is make this dynamic - meaning have a new button be created & placed into the animation dynamically from the text of a XML document (aka - not imaged based). That being said, though I've patched together a nice gallery using a similar technique, I'm really clueless on how to apply that to this. Creating/loading the XML I think I can handle. What I dont know is how to have the flash have the animated intro I want - then dynamically create all of the buttons (basically putting the new text on the clear background w/ the correct as link listed in the xml), have them go up then back down & move to the next. Then when all of the buttons are done, have the closing animation.
Does anyone know how to do what Im hoping to do? Know of any good tutorials on this (I've found things close but they arnt close enough)? Am I even being clear?
Thank you for any help you can toss me.
Creating A Showreel/demo Reel With Flash Movies
Hi,
I want to make a showreel/demoreel of my flash character animation work as opposed to making a portfolio website. It is purely flash movies with no interactivity and so I want to make a linear showreel (or just very long movie of my work). I have just found that it is near impossible to import flash .swf files as quicktime movies into After Effects as AE 7 doesn't seem to read the quicktime movies, or quicktime doesn't read the swfs, I don't really know.
Does anyone know of a quick way to edit my flash movies into a demo reel format? Are there any freeware packages that I could use. I would want to ouput to either swf or a quicktime file.
Many thanks in advance.
Simple /:xpos Scrolling, However Load External .swf When Scrolling Stops
Hi guys I need some help with a simple horizontal slider. (See attached)
Basically I have a horizontal slider with 3 buttons which make the slider go to a specific position using:
on (release) {
/:xpos = -376;
}
Now what I want to happen is that when the button is pressed I want it to load an external .swf movie (say video.swf onto level 1)
I have tried just adding using:
on (release) {
/:xpos = 0;
loadMovieNum("video.swf", 1);
}
which just loads the movie and then scrolls. However I need it to be the other way around. It scrolls to the location and then loads the movie.
I would really like it to use some type of statement telling it that if xpos = -350 then load .swf onto level 1 and if xpos has not yet reached -350 to do nothing.
However the major principal is to get the scroll and then the load, rather than the other way around.
Cheers
Dom
Scrolling Text Field That Stays Scrolling On Rollover
on (rollOver) {
mytext.scroll--;
mytext.maxscroll = x;
}
Here is my code, you have to keep clicking the button to scroll the text field, how do I code it to just have the mouse rollover the button and the text field will continue to scroll automatically? Thanks.....
On Press Scrolling Problem. Scrollbar. Scrolling. Button
How do I make this actually work for on press? It works fine for when you just click it, but the on press function doesnt work.
thanks for any help.
on (press) {
textbox.text._y += scrollVal;
if (textbox.text._y>upperLimit) {
textbox.text._y = upperLimit;
}
lineLoc = slider.line._x;
linelength = slider.line._width;
slider.handle._x = ((textbox.text._y/lowerLimit)*lineLength)+lineLoc;
}
Using Flash Scrolling Text Box To Create Scrolling Schedule
Hi All,
For work, I'm creating a PowerPoint presentation which needs to include a really long schedule. I wanted this schedule to crawl up the screen. I thought of doing this part in Flash and inserting it into the PPT. Has anyone had luck with this sort of thing using PPT and Flash? Is there a better strategy. I have CS3 Web and Production and will be doing this portion of the project this weekend and thought I'd ask some pros. Is there another CS3 product that might be better. I am more Familiar with After Effects but haven't used it for anything quite like this before.
Thanks!
How To Smooth The Movement (scrolling Background And Scrolling Menu ) ?
hi! i'm new here and also a beginner in flash.. i need some help on how to smooth the movement in my flash project.. scrolling background with scrolling menu.. i got this script from a tutorial and i did some adjustment on it.. but somehow both the background and menu movement are not smooth as i want. its kept jerky along their movement. this is the script that i use to move both background and menu.. hope someone can help me to repair or to alter this script.. thanks! =)
//scrolling background with scrolling menu
//when mouse moves left, background and menu moves right
if ((_xmouse>-0.5) && (_xmouse<230) && (_ymouse>-0.1) && (_ymouse<450)) {
_root.back._x =_root.back._x +6 ;
_root.menu_mc._x =_root.menu_mc._x +10 ;
}
// when mouse moves right, background and menu moves left
if ((_xmouse>400) && (_xmouse<616) && (_ymouse>-0.1) && (_ymouse<450)) {
_root.back._x =_root.back._x -6 ;
_root.menu_mc._x =_root.menu_mc._x -10 ;
}
if (_root.back._x>1309.5) {
_root.back._x = -79;
}
if (_root.back._x<-697.8) {
_root.back._x =679;
}
//----------------------------------------------
if (_root.menu_mc._x>1200.5) {
_root.menu_mc._x = -99;
}
if (_root.menu_mc._x<-730) {
_root.menu_mc._x =569;
}[/size][/size][/size][/size]
(quickie) Scrolling HTML Field Not Scrolling To The End
Hey guys and girls,
I've got some data from a file displaying in a wrapped, HTML textfield. text is formatted and appears as expected but as i try to scroll, it only scrolls one line down and stops.
the maxscroll property returns 5, and the scroll goes down to 2 and for some reason won't go further down.
but, and here's the fun part driving me f*3%# nuts... if i select the field and then use arrows, i can scroll it that way... but then once i've done that, the buttons work too. I tried using the selection object .. but nothing... and i've turned off the HTML and seen that scroll (probably coincidently) would have a maxscroll of 2.
so question is... what the ****? how can i get thing to work? thanks world. peace.
Question: Text Scrolling Vs. Clip Scrolling
I'm working on a scrollbar right now, and have it working quite nicely for scrolling a movie clip. But I began to wonder, which is better, scrolling a clip with text or scrolling the text itself?
Any thoughts on this flash community?
Personally, I like the fact that you can implement easing and get a smooth scroll by scrolling the clip, but then again, with the scroll wheel now available for the text scrolling, that's cool too.
Anyway, just curious on everyone's thoughts on this. Which do you like to see when you visit a site?
Automatic Scrolling On Mouse Over For Text Scrolling
hi all, ive made a scrolling text box with an up and down button as listed in the tutorials. i know how to make it move 1,2,3,etc lines at a time when the mouse is over but what code/variable do i need to replace the number with to make the text scroll continously as long as the mouse is over it?
thanks
bast
Stopping A Scrolling Thumbnail Scrolling On Its Loadup?
Firstly hey all hope you can help me with what is hopefully an easy question.
Firstly I've made a vertical scrolling verison based on the actionscript of this Tutorial. However because of the lopped motion Tween it begins scrolling instantly after its loaded. I want it to load frozen until the mouse is rolled-on is there anyway in actionscript or by editting the tweens to make it this possible???
This link is an example of my thumbnail scroller (sorry for the shameless self promo of my website!)
http://seantooley.com/pages/Scars&Sp...sGallery15.htm
This is a link to the tutorial I used (tutvid.com) Though it was good!.
http://www.youtube.com/watch?v=2TrIQ...1DBDD6&index=5
Lastly the actionscript if it helps. which I hope someone can! I would be a very grateful man to whoever can provide the answer !!
_root.onEnterFrame = function(){
if(_root._xmouse<240) {
myVar=false;
}
if(_root._xmouse>2) {
myVar=true;
}
if(_root._ymouse<13 and myVar==true) {
ImageBar.prevFrame();
}
if(_root._ymouse>445and myVar==true) {
ImageBar.nextFrame();
}
}
Thanks again Sean Tooley
Scrolling Flash Pane On Scrolling Web Page
This is a repost, but I've still not figured out a solution.
I have a Flash movie that appears on a webpage. The Flash contains scrolling content ( scrollpane, text field, whatever).
The containing webpage is tall, and therefore also has scrollbars.
My Problem: When users try to use the MouseWheel to scroll through my Flash scrolling data, the browser page scrolls as well. It's very annoying.
I would like to be able to have the MouseWheel scroll my Flash scrolling content when it's over the flash, but scroll the webpage when it's not over the Flash.
Does anybody know a way to supress wheel-based browser page-scrolling while my mouse is over a Flash movie??? Is there a way to eat/stop propagation, whatever, of the wheel event in the brwoser, either from Flash or from Javascript?
Scrolling A Dynamically Created Mc (rollover Scrolling)
I've been trying to find a way to do this for a while...
Anyone have any good tutes, examples on creating the horizontal scrolling menu with dynamically attached clips? the style where if the user mouses over the right hand side of the menu it slides left, etc?
there's lots of tutes out there for simple scrolling but not much that take a dynamically sized clip into consideration!
thanks for any input.
Scrolling Photo Gallery But Not Flat Scrolling, Please Help Out
Hey everyone...
First off all, I thank you all to read my first thread in this website and also thanks Kirupa to give me chance to learn from you all masters.
As I am designing a website in which I am stuck where there is a flash script required. I am looking for a script which makes a small 5 to 6 Image scrolling photo gallery.
My problem is I don’t want flat gallery I am looking for a gallery which shows the perspective image coming from a deeper wall (e.g. image attached). In this Image below asume gray is a piller and the image have to scroll from the deep part of the piller in perspective.
Hope you guys and gals can help me.. I'm really stuck here.
Thanks
Rupesh
My Scrolling Pane Won't Stop Scrolling OnRollOut...
I'm having trouble getting the scroll to stop, and can't find a problem in the code. It's in a movie clip called "timeline."
Code:
panel.onRollOver = panelOver;
function panelOver() {
this.onEnterFrame = scrollPanel;
delete this.onRollOver;
}
var b = stroke.getBounds(timeline);
function scrollPanel(){
if(_xmouse<b.xMin || _xmouse>b.xMax || _ymouse<b.yMin || _ymouse>b.yMax){
this.onRollOver = panelOver;
delete this.onEnterFrame;
}
if (panel._x>=-900) {
panel._x = -900;
}
if (panel._x<=-3100) {
panel._x = -3100;
}
var xdist = _xmouse-0;
panel._x += Math.round(-xdist/7);
}
You might notice that I have timeline specified in the var b bit of code, which was the only way I could get it to scroll smoothly - otherwise, it scroll jerky and only a few hundred pixels.
Scrolling Nav Versus Scrolling Textbox...who Will Win?
'ello boardsters...
problem: i have a movie, we'll call it Movie1.
Movie1 contains a scrolling navigation bar.
Movie1 also contains a blank movieclip- Holder- into which are loaded other, content, movies.
One of which- we'll call it Content1- contains a textScroller movieclip for updateable news- the text is loaded in from a .txt file.
the PROBLEM is... when Content1 is loaded into Movie1 and you use the scrollbar on Content1's textScroller, the scrolling navigation bar back in Movie1 gets stuck on one speed- too fast to make it useable.
why's it doing this? are the two in conflict somehow? i'm no programmer, i get my code on..well, flashkit actually! so i'd appreciate some help.
love ya all (particularly the helpful ones)
delilah
Difference Between Scrolling A MC And Scrolling A Textfield?
Hi there,
What is the difference from scrolling a textfield and scrolling a movieclip?
My scrollbar resizes automatically with textfields,
and I don't know how to scroll movieclips within the same scroller. Do I only have to change some names or something?
Thanks Already
Vertical Scrolling Menu Not Scrolling
i'm using flash mx
i inserted this code from a friend who had a horizontally scrolling menu and altered it slightly to suit my vertical menu. when i test it nothing moves.
i have this action placed in frame 3 of my movie:
center = 220.5;
reelPos = reel._y;
topStop = -360;
bottomStop = 360;
and in frame 4 i have this action:
if (_xmouse<774 & _xmouse>10) {
reelSpeed = (_ymouse-center)/10;
reelPos = Math.round (reelPos+reelSpeed);
if (reelPos<topStop) {
reelPos = topStop;
}
if (reelPos>bottomStop) {
reelPos = bottomStop;
}
reel._y = reelPos;
}
what am i missing here?
Scrolling Text Stops Scrolling
i just finished a messing with a site somebody wanted me to update. Since i really am new at flash, i am still learning about action scripting. I entered the content into a text box that has some scrpiting to scroll down under a mask. It scrolls just fine, but it stops before the entire field is seen. No matter how long the text field gets, it always stops at the same place when viewing the movie.It does this with all the fields at the same point...here is what it says in the "positioning movie" what is this saying?...any help woud be great
*the problem is this isnt something i made, so it makes it that much more difficult.
y = getProperty("../movie", _y);
if (y<70) {
gotoAndStop(10);
} else {
setProperty("../movie", _y, y-6);
}
[F8] Scrolling Thumbnails - Not Scrolling - Involves Xml
Howdy,
I have been working on a site that will display a portfolio for a friend of mine who is a photographer. I want to have thumbnails that can be scrolled on the bottom of the page, and an area where the thumbnail is presented when selected. I have the thumbnails appearing. I have them loading, however, I can't get them to scroll when the mouse moves to the left or right of the row of images.
The file can be viewed at... http:www.prestigeinteractive.com/anneliephotography
Here is the code I used for the slideshow:
Code:
var slideshow_mc:MovieClip = this;
var image_Array:Array = new Array();
var description_Array:Array = new Array();
var thumbnails_Array:Array = new Array();
var currentPicture:Number = 0;
function loadXML(loaded) {
if (loaded) {
xmlNode = this.firstChild; //here "this" refers to the XML object. This should be okay, I think
total = xmlNode.childNodes.length;
for (i=0; i<total; i++) {
image_Array[i] = xmlNode.childNodes[i].childNodes[0].firstChild.nodeValue;
description_Array[i] = xmlNode.childNodes[i].childNodes[1].firstChild.nodeValue;
thumbnails_Array[i] = xmlNode.childNodes[i].childNodes[2].firstChild.nodeValue;
thumbnails_fn(i);
}
firstImage();
} else {
content = "file not loaded!";
//added this so that it shows in your thumbnails
desc_txt.text = "file not loaded!";
}
}
xmlData = new XML(); //prepare XML object
xmlData.ignoreWhite = true; //tell XML to ignore empties (unnecessary in this application b/c XML is well-formed
xmlData.onLoad = loadXML; //function to load when XML loads.
//I had to change this line to make sure that it's loading from the correct location, because you're loading the
//file from one level up
xmlData.load("./flash_files/images.xml"); //load XML data; when loaded, run loadXML
/////////////////////////////////////
listen = new Object();
listen.onKeyDown = function() {
if (Key.getCode() == Key.LEFT) {
prevImage();
} else if (Key.getCode() == Key.RIGHT) {
nextImage();
}
};
Key.addListener(listen);
previous_btn.onRelease = function() {
prevImage();
};
next_btn.onRelease = function() {
nextImage();
};
/////////////////////////////////////
currentPicture = 0;
slideshow_mc.onEnterFrame = function() {
filesize = picture.getBytesTotal();
loaded = picture.getBytesLoaded();
preloader._visible = true;
if (loaded != filesize) {
preloader.preload_bar._xscale = 100*loaded/filesize;
} else {
preloader._visible = false;
if (picture._alpha<100) {
picture._alpha += 10;
}
}
};
function nextImage() {
if (currentPicture<(total-1)) {
currentPicture++;
if (loaded == filesize) {
picture._alpha = 0;
picture.loadMovie(image_Array[currentPicture], 1);
desc_txt.text = description_Array[currentPicture];
picture_num();
}
}
}
function prevImage() {
if (currentPicture>0) {
currentPicture--;
picture._alpha = 0;
picture.loadMovie(image_Array[currentPicture], 1);
desc_txt.text = description_Array[currentPicture];
picture_num();
}
}
function firstImage() {
if (loaded == filesize) {
picture._alpha = 0;
picture.loadMovie(image_Array[0], 1);
desc_txt.text = description_Array[0];
picture_num();
}
}
function picture_num() {
current_pos = currentPicture+1;
pos_txt.text = current_pos+" / "+total;
}
//I think I know what this function is doing, but I'm not sure exactly how it works
function thumbNailScroller() {
// thumbnail code!
slideshow_mc.createEmptyMovieClip("tscroller", 1000);
scroll_speed = 10;
tscroller.onEnterFrame = function() {
if ((_root._ymouse>=thumbnail_mc._y) && (_root._ymouse<=thumbnail_mc._y+thumbnail_mc._height)) {
if ((_root._xmouse>=(hit_right._x-40)) && (thumbnail_mc.hitTest(hit_right))) {
thumbnail_mc._x -= scroll_speed;
} else if ((_root._xmouse<=40) && (thumbnail_mc.hitTest(hit_left))) {
thumbnail_mc._x += scroll_speed;
}
} else {
delete tscroller.onEnterFrame;
}
};
}
function thumbnails_fn(thumbnailNumber) {
thumbnail_mc.createEmptyMovieClip("t"+thumbnailNumber, thumbnail_mc.getNextHighestDepth());
tlistener = new Object();
tlistener.onLoadInit = function(target_mc) {
//target_mc is the thumbnail that was just loaded
target_mc._x = hit_left._x+(eval("thumbnail_mc.t"+thumbnailNumber)._width+5)*thumbnailNumber;
target_mc.pictureValue = thumbnailNumber; //here you're assigning a value to the thumbnail object
target_mc.onRelease = function() {
//target_mc is the thumbnail that was just loaded
//"this" should be okay below, but it COULD be problematic, depending on the scope
//when the click is evaluated; here could be a problem area, but I'm not sure
currentPicture = this.pictureValue-1;
nextImage();
};
target_mc.onRollOver = function() {
//target_mc is the thumbnail that was just loaded
//"this" should be okay below, but it COULD be problematic, depending on the scope
//when the click is evaluated; here could be a problem area, but I'm not sure
this._alpha = 50; //here "this" refers to the target_mc MovieClip; it can stay
thumbNailScroller();
};
target_mc.onRollOut = function() {
//"this" should be okay below, but it COULD be problematic, depending on the scope
//when the click is evaluated; here could be a problem area, but I'm not sure
this._alpha = 100;
};
};
image_mcl = new MovieClipLoader();
image_mcl.addListener(tlistener); //listener to see when thumbnail is loaded
image_mcl.loadClip(thumbnails_Array[thumbnailNumber], "thumbnail_mc.t"+thumbnailNumber);
}
Thanks for your help,
Greg
Vertical Scrolling To Horizontal Scrolling...HELP
So I created a movie with 6 thumbnails on the left side which, when clicked, scroll the full-sized images on the right to show the respective image. However, with the current code, the large images scroll vertically. I want them to scroll horizontally (and then I can move my thumbs to the bottom so as not to be in the way). I'm pasting the code I used below, can someone help me with what changes I would need to make to the code to switch from vertical to horizontal scrolling? Thanks!!
this.createEmptyMovieClip("images", 100);
this.attachMovie("mask","mask", 101);
mask._x = images._x = 550;
mask._y = target = 311.8;
images._y = -1000;
images.setMask(mask);
speed = 7;
for (var i=1; i<7; i++) {
var img = images.attachMovie("image"+i, "image"+i, i);
img._y = img._height*i;
var thumb = this["thumb"+i];
thumb._alpha = 60;
thumb.pos = target+(i*-img._height);
thumb.onPress = function() {
target = this.pos;
};
thumb.onRollOver = function() {
this._alpha = 100;
};
thumb.onRollOut = function() {
this._alpha = 60;
};
}
this.onEnterFrame = function() {
images._y += (target-images._y)/speed;
};
Instead Of Scrolling Text - Scrolling Image
Ive learned how to add a scroll bar to my text boxes - but since I cant make the text in the textboxes do actionscript - I was thinking I could replace the text with an image of the text - and then add buttons to the words.
Simply what im asking is - how can I make an image (it will be of text) scroll inside of a specified area so that it looks just like dynamically loaded text with a scrollbar?
|