[CS3] Movieclip Scrolls With Mouse HELP
Hi, so the I got a movie clip move with the mouse and it works great BUT this is what I want it to do.
* I want it to scroll as I move my mouse over from left to right (this works) * I have a button on top of the movieclip that if I rollover it I want the movieclip to go to a specific location on the stage, and stop interacting with the mouse. (can't make this work)
any suggestions...
FlashKit > Flash Help > Flash ActionScript
Posted on: 05-28-2008, 07:55 PM
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Banner Scrolls With Mouse?
Hey everyone
I have quite a question this time :-)
I'm building my own homepage and I trying to make a menu. The whole idea is to have 2 movieclips: 1 menu_mc and 1 banner_mc. In the banner_mc I have 5 pictures matching my 5 menu-titles (in the menu_mc). When my mouse i over the first menu title, I want the banner to slide until the 1st picture is centered in the movieclip. And if I move my mouse down to the second menu title, I want the banner to slide left and center the second image. Not jump to the second image, but slide. I have made all 5 pictures as 1 big horizontal banner, so the 5 pictures is in a row. I've attached a picture file, to help you understand.
I can't figure out how to do this... can you help me?
- greetings from Rune
Movie Clip Scrolls With Mouse
Does anyone know the most efficient way to achive this scrolling movie clip effect?
http://www.salvacampillo.com
Any help would be greatly appreciated. Thanks!
Movie Clip Scrolls With Mouse
Does anyone know the most efficient way to achive this scrolling movie clip effect?
http://www.salvacampillo.com
Any help would be greatly appreciated. Thanks!
Mouse Movement Scrolls Timeline?
i have a movieclip i want to play forward when the mouse goes right, play backwards when the mouse goes left.
is there an easy way to do this?
thanks
mosez
Image Scrolls When Mouse Moves Around Screen.
Hey,
Im not new to flash, but very new to actionscripting and the complicated part of flash..
does anyone know where there is a tutorial, or how to make a large image that goes off screen, scroll around when the mouse moves around over the image (horizontal scrolling)?
I would appreciate any help!
thanks,
james
How Can I Make A Menu That Scrolls Horizontally When You Mouse Over It.
How can I make a menu that scrolls horizontally when you mouse over it.
I want it to scroll right when the mouse is over the right half or it, and scroll left when the mouse is over the left half of it.
I know I need to make a movie clip with the menu scrolling so I’ve already done this. Does the actionscript only need to go in the movie clip in a new layer?
I want the scroll menu to stop when it gets to the either end, not repeat so I havnt looped the movie.
Thanks
James
Menu Scrolls Depending On Mouse Position
hi folks,
does anybody know how that kind of menu is done?
http://www.on-design.de/jukeart/comart/index.htm
(probably maybe you know a link to a tutorial that provides detailed info?)
thanks firegambler
regards
Firegamler
Mouse Icon Changes As User Scrolls On Dif. Images
What do I need to do to make a mouse Icon change according to what(Ex. a picture) a user scrolls over on a page. The code that I have enables me to change the mouse Icon for the whole entire page only. I need different spots to have different mouse Icons.
My code used for this is:
cursor_mc.onMouseMove = function() {
// refresh display. This is responsible for the smooth move of the cursor
updateAfterEvent();
};
function init() {
// This loads the cursor to max posible z-index (right to the top)
cursor_mc.swapDepths(1048575);
// start dragging
cursor_mc.startDrag(true);
// hide the mouse pointer
Mouse.hide();
}
// start off!!
init();
I also need to change my mouse Icon according to the users actions. For example the user will be drawing lines. I need to know how to make my little pen mouse Icon disappear. after they do their actions.
My pen mouse Icon is stuck on the page for the rest of the users interactions.
Thank you for your help.
Mouse Wheel Scrolls Browser Page In Addition To Flash
I am working on interactive flash maps, where I let the user utilize the mouse wheel to zoom in or zoom out of the interactive map (in addition to keyboard and button options).
In AS2, using the mousewheel on a flash element that is in focus would not scroll the whole web page that contains the flash. But, in AS3, the mousewheel scrolls the whole page in addition to communicating the mouse events with the flash element. Here's a comparison of the two maps:
AS2 vs AS3 Swfmap
Any ideas on how to keep the web page from moving when the user is mouse wheeling on the flash in AS3?
Scrolling Menu Panel Scrolls Whole Stage Content, How To Restrict EventListener To Mouse.y <90 ?
hei folks,
the snippet attached works great, it scrolls (parallaxed) my menu horizontally left to right, when I move my mouse horizontally over the menu panel.
But if I klick on the menu buttons nested inside this menu panel, they do appear, unfortunatly does the content also scrolls horizontally if I move to the menu to select another Button :(
I am not able to modify this code-snippet from user kglad, that it doesnt scroll the whole stage but the panel itself.
Can someone please give me a hint, on this menu I have spent hours, bloody learn curve.
source of this code: user kglad - thank you very much kglad btw.
http://www.adobe.com/cfusion/webforums/forum/messageview.cfm?forumid=15&catid=665&threadid=1324923&highlight_key=y&keyword1=scroll#4807043
Attach Code
root.addEventListener(MouseEvent.MOUSE_MOVE,f);
var t:Timer=new Timer(30,0);
t.addEventListener(TimerEvent.TIMER,moveF);
function f(e:MouseEvent) {
if(root.mouseY<250) {
t.start(); }
else {
t.stop();
} }
var speed:Number = .9;
function moveF(e:TimerEvent) {
front_mc.x =speed*front_mc.x+(1-speed)*(stage.stageWidth-front_mc.width)*root.mouseX/stage.stageWidth;
back_mc.x = speed*back_mc.x+(1-speed)*(stage.stageWidth-back_mc.width)*root.mouseX/stage.stageWidth;
if (Math.abs(front_mc.x- (stage.stageWidth-front_mc.width)*root.mouseX/stage.stageWidth)<1 && Math.abs(back_mc.x-(stage.stageWidth-back_mc.width)*root.mouseX/stage.stageWidth)<1) {
front_mc.x = (stage.stageWidth-front_mc.width)*root.mouseX/stage.stageWidth;
back_mc.x = (stage.stageWidth-back_mc.width)*root.mouseX/stage.stageWidth;
t.stop();
}
e.updateAfterEvent();
}
How Do I Create A Movieclip To Play If Mouse Is Unactive, And Stops When Mouse Moves?
I am in the process of creting a world map navigation for a global ite portal.
In the map a user can hover over different continents to zoom in on specific countries then click on that country's to goto its specific website.
However I think the world map looks a little un-user friendly so was looking at playing a quick tutorial movie (a mouse cursor, moving over a continent and highlighting it) when the mouse is not being moved, then stops when the user moves the mouse.
This feature a little reminisant of when sonic the hedgehog used to tap his foot if you didnt use your joypad for a while.
I would also like to start the movie (after he preloader ive used) with the tutorial playing, so the user can understand the way it works straight away.
I am a novice at action scripting, so all help would be appreciated!
Thanks
M
How Do I Create A Movieclip To Play If Mouse Is Unactive, And Stops When Mouse Moves?
I am in the process of creting a world map navigation for a global ite portal.
In the map a user can hover over different continents to zoom in on specific countries then click on that country's to goto its specific website.
However I think the world map looks a little un-user friendly so was looking at playing a quick tutorial movie (a mouse cursor, moving over a continent and highlighting it) when the mouse is not being moved, then stops when the user moves the mouse.
This feature a little reminisant of when sonic the hedgehog used to tap his foot if you didnt use your joypad for a while.
I would also like to start the movie (after he preloader ive used) with the tutorial playing, so the user can understand the way it works straight away.
I am a novice at action scripting, so all help would be appreciated!
Thanks
M
Trapping Mouse Events For A Movieclip Inside A Movieclip
Hi
Im having a few problems with my events for some movieclips. What I have is an AS2 class which creates a blank movieclip as a holder for submenu movieclips. This blank movieclip must trap its onRollOut event so that it can fade out the menus. The submenu movieclips which are then attached to the holder clip must trap their own mouse events which are defined in another AS2 class. The only trouble is they are not trapped.
I have seen a couple of other posts on the subject but got no clues from them. I was just wondering if what Im trying to do is possible or if Im fighting a loosing battle.
Any help would be much appreciated.
Thanks in advance
Dan
Mouse Event Triggers For Movieclip Inside Movieclip (can It Be Done?)
'canvas' is a large movieclip I am using to put other movieclips 'in' so I can move around and zoom everything at once. Like a coffee table with pictures on it.
I am loading up two images below with variables named map01 and map02. They overlap.
Code:
var map01:MovieClip = canvas.createEmptyMovieClip("map01", canvas.getNextHighestDepth());
map01.loadMovie("http://imagelocation1.jpg");
map01._x=-1000;
map01._y=39;
var map02:MovieClip = canvas.createEmptyMovieClip("map02", canvas.getNextHighestDepth());
map02.loadMovie("http://imagelocation2.jpg");
map02._x=-1000;
map02._y=130;
map01.onRelease = function () {
this.swapDepths(map02);
}
I would like to be able to click one of the images inside canvas and have it jump to the top. In this case, just a simple swap with map02 would be fine, I can manage the depths.
I have put a breakpoint right on the swapdepths line and debugged, and the function never gets called. Probably because it is the onrelease is for 'canvas', not any of the sibling movieclips that flash is looking for.
'canvas' has an onRelease that triggers a stopdrag and a onpress that triggers a startdrag. Removing these two triggers still does not allow any triggers for map01 or map02 to trigger though.
Any suggestions?
Is there some way to setup some logic on a canvas.onRelease function that can easily check to see if the clicked region is on an movieclip inside the canvas?
Respond To Mouse Events Inside A Movieclip That Has Mouse Events...
I have a main MC that has a couple of mouse events associated with it (onPress mainly). There are also MC's inside this main MC that have Mouse events associated to them (onPress, onMouseMove, onRelease). The child MCs don't seem to get the mouse events (which makes sense, the parent is taking over the event)...how can I make this work? I don't want to have to delete and recreate the event handlers like 900 times as its not efficient...there has to be a better way.
Image Scrolls
I was wondering if the following was possible in Flash 5? I'm trying to make a table or matrix of thumbnails that can be scrollable and also to make each image, when clicked, opens a full version of it in another part of the same page. For example, I'll have 3 adjacent images across and perhaps 5 or more rows of them. Each image must bring up a full version once it is clicked. Also, I want to scroll the images up and down using navigation arrows. I envision that only 3 rows are visible at a time with the top and bottom rows hidden (so 123 are hidden, 4-9 visible and 13-15 hidden). I've seen numerous examples of one row of images scroll left and right, but I'm wondering if scrolling up or down poses any more difficulty and if it is possible to have multiple images on the same row?
1 2 3
4 5 6
7 8 9
10 11 12
13 14 15
Why Scrollbar Scrolls Down Instead Of Up
Hi,
i'm did a scrollbar following the tutorial found here
http://www.virtual-fx.net/vfx/tutori...4_20020113.php
my problem is, when i scroll down, the contents go down as well, which is wrong coz it should go up when i scroll down, and go down when i scroll up. What could be the problem? sorry coz i'm not very experienced in coding this kinda thing..
ScrollPane Scrolls Too Far [CS3]
I've installed a ScrollPane on a file with a stage of 550x500. The file loaded into the ScrollPane is 975 x 860. The scrollPane works just fine except that when dragging the scroller, it reaches the end of the document about a quarter of the way down and then shows lots of white space below the loaded document.
I can't imagine why. I don't see any parameters that controll this. Does anyone have an idea how I can constrict scrolling to the heigth of the file loaded?
Photo Menu Bar That Scrolls
This may have been asked before, so sorry in advance.
On this site:
http://www.mgm.com/originalsin/
there is a menubar, with blocks of photos in it and it scrolls slowly horizontally according to whether your mouse goes to the left or the right. It also speeds up and slows down, and then stops when you mouseover one of the buttons.
Question is, how do I do that....and if somebody could let me know a tutorial or a script I'd be grateful.
I've got Flash 5.
Many Thanks
Richard
Ticker Scrolls Only N Times
There is a way using this ticker actionscript to set the number of scrolls of text to n times and then gotoAndPlay()
thanks manner
function checkTime() {
if (scroll_delay == 0) {
call("doScroll");
} else {
current_time = getTimer();
if (just_scrolled) {
time_stamp = getTimer();
just_scrolled = false;
}
time_passed = current_time-time_stamp;
if (scroll_delay<time_passed) {
doScroll();
just_scrolled = true;
time_passed = 0;
}
}
}
function doScroll() {
if (ticker_input.length>=current_char) {
if ((current_char-view_window)>=first_char) {
current_ticker = substring(ticker_input, (current_char+1)-view_window, view_window);
_parent.ticker_output = current_ticker;
} else {
current_ticker = substring(ticker_input, first_char, current_char-first_char);
_parent.ticker_output = current_ticker;
}
} else {
current_char = first_char-1;
}
current_char++;
}
stop();
view_window = 20;
message_pause = 20;
scroll_delay = 20;
first_char = 1;
just_scrolled = true;
current_char = first_char;
count = 1;
while ((view_window+message_pause)>=count) {
ticker_input = ticker_input+" ";
count++;
}
Dynamic Text With Scrolls
So I have a text file that loads text into a dynamic text field on my flash page but since I have done that, the scrolls will not work. How do I get the scrolls to work? Thank you so much for your help!!
sly:
Multiple Text Scrolls Please Help
Hello Everybody,
I am trying to make a text scroll in my movie that is targeted through a external text file. I have one working great ,but I want to have the text scroll change in my movie. This is where the problem is for me.. I want to have multiple scrolls targeting different text files. I know that this can not be that hard.
THANKS EVEYONE!!!!
Working With Long Scrolls
Has anyone got an ingenious way of working with long rows of images that extend way past the work area where you can't see them?
I'm currently relying on positioning them using xy coordinates but this is a pain! I have to write everything down for each image... is there an easier way?
Imposible? Scrolls Bars?
is it me or is it impossible to change scroll bars in flash mx 2004 to custom ones? ive yet too see any working tutorials or anything near to being able to change them.
Problem With 2 Scrolls In One Page
I made two scrolls with this tutorial : http://www.flashkit.com/tutorials/Ac...1174/index.php , one horizontal (for images) and one vertical (for text), but if I put these two in one page the functions get mixed up and only one thing (text or images) scroll, using the buttons of both... can anyone help me out please?
thx in advance, -Alex-
Onclick Map Scrolls To Building
understand this
click on the url or link http://www.uconn.edu/map/
step1:
Now do u see the search input box on the right hand side of the map.
enter and letter...lets say "c" and click search .....i hope u have done that .
step2:
wait and see how the names of diffrent buildings drop below the search button .
do u see that .fine
step3:
click on the zoom in button ....this is just below the map ...just on the left below ...okay here the real map comes out and is more visible i.e it zooms in
step4:
click on the of the building names just below the search area we used in step in "step2".
step 5:
do u notice that when u click on any building name ....the map just slides or scrolls right to that building automatically and an arrow pops out pointing at the building ...okay now
step 6:
how can achieve this on my buttons so that my map which is with an instance map_mc scrolls right to a building when any of the building buttons are clicked ....
when the map
Onclick Map Scrolls To Building
understand this
click on the url or link http://www.uconn.edu/map/
step1:
Now do u see the search input box on the right hand side of the map.
enter and letter...lets say "c" and click search .....i hope u have done that .
step2:
wait and see how the names of diffrent buildings drop below the search button .
do u see that .fine
step3:
click on the zoom in button ....this is just below the map ...just on the left below ...okay here the real map comes out and is more visible i.e it zooms in
step4:
click on the of the building names just below the search area we used in step in "step2".
step 5:
do u notice that when u click on any building name ....the map just slides or scrolls right to that building automatically and an arrow pops out pointing at the building ...okay now
step 6:
how can achieve this on my buttons so that my map which is with an instance map_mc scrolls right to a building when any of the building buttons are clicked ....
when the map
Fading The Text As It Scrolls In/out... How?
Hi Kirupians,
I'm sure this is very simply but I can't seem to get the trick down. I have a simply scroller with text. Nothing dynamic, just a plain 'ol scroller.
I'd like the text to fade in or out, from the top or bottom, as the user scrolls.
... This would be easier to show than explain. Take a look at this site and click on The Film link. The text fades as you scroll up/down.
http://www.stardustmovie.com/site.htm
I've tried making the mask for my scroller into a gradient but that doesn't affect the text.
Any ideas?
Automatically Scrolls As Well As Use Of Scroll Bar
Ok, I have a .txt file that loads into a textfield. I want it to automatically scoll down but if the user wants to scroll up, I want to use a scroll bar to do that. Any suggestions out there?
Thanks,
2flashy
MovieClip And Mouse
hi all....
I need to get the instancename of the movieclip when i click on a particular movieclip.
But i have lots of movieclips, it is very troublesome to place a code in every movieclips to call the function.
Thus any recommandation to this question?? thx alot guys...
[F8] Movieclip Following Mouse
Hey I'm making a 2D flash shooting game where you aim with your mouse and shoot by clicking (like heliattack). The problem is, though, is that I can't get the bullet to move to the mouse, (in other words, I can make the gun point to the mouse but the bullet doesn't move to the mouse and doesn't even point in the right direction). A while ago I made a script for this but now it doesn't work, plus it wasn't very good in the first place. I've tried for some time now, and I still haven't found the answer.
Could anyone help me out please? Thanks in advance!
Mouse Over On Movieclip
Is this possible?
Have a movieclip in motion embedded into a button so when the user rolls over the movieclip/button a form is displayed? It seems possible.
Is there a tutorial that shows this example?
I'll try this out soon.
MovieClip Mouse Over
Simple Question. Whats the script to trigger a function when the mouse is over a MovieClip(instance) ?? When the mouse is over Movieclip, I want that to trigger another instance (instance.Play()
I can't seem to recall or locate this.. argh. Thx appreciated!!
Draggable Button Which Scrolls An Image
Can anyone help me on finding the actionscript or movie source file i can alter to get effect of dragging a button to scroll a huge image which is larger than the scroll area.
I would like to almost mimic the effect on the home page of:
http://www.gonetixdesign.com/
thanks so much!
Jesse
Blurry Pixel Fonts In Scrolls?
Does anyone have suggestions for scrolling pixel fonts so that they appear clear and crisp? My pixel font text is blurry in scrolls, but fine otherwise.
Scrolls Bars On A Dynamic Text Box?
How can I add scroll bars to my dynamic text box? Can I do with some actionscript or does it invole a scroll pane etc? Hope someone can explain how to me Thanks a lot!
Masking Dynamic Text Scrolls
hi there,
I am using createTextField to draw and populate a textfield that scrolls under a mask. I am using setMask to try and mask the scrolling text however I note that this will not work on device fonts - how else can I do it? The text just scrolls across my movie unmasked.....there must be a way.....
Creating A Fixed Text Box That Scrolls?
Now, I know how to create a text box and I know how to create scrolling text, and neither are what I want. I want to create a text box with fixed demensions and I want any text that does not fit in within these demensions to be viewed by scrolling down. I have seen it done on many flash sites and yet I can not figure out how to do it, perhaps the answer is very simple and obvious, but I cant find it.
example of what I am talking about: http://gulzar.port5.com/site.html
(There was no method of choosing this site, I simpley chose the one closest to the top in the Members site thread. I am not in any way trying to premote anyones site here.)
Scrollbar Which Scrolls Text And Images
I want to make a Flash website similar to the Family Guy site (www.familyguy.com). I like the scrollbar used in the About the show > Character Bios section but I have no idea how to make such a bar. I want the scrollbar to scroll not just text but pictures as well!
How can I make a scrollbar that not only acts like the one on the above site and scrolls text and images, but also looks like it?
Thanks!
Flash Animation Big But With No Browser Scrolls
Here's my problem,
I'm building a website that occupies full screen size (100%), i'm doing this so i can adapt to many resolutions and not do a fixed size site.
So here's my problem. I want a flash animation banner to be 100% too, without resizing, streching or shrinking. So what i thought was creating a large size animation and then simply not have the browser's scrollbars. Much like the images you can put in table cells background.
Still i can't seem to put my large in width animation to not make the browsers scroll appear.
Can someone help me out? Thanks
Why Are These Fades Only Working If User Scrolls Over Certain Ones First?
Why are these fades only working if user scrolls over certain ones first?
All have same code, all in one keyframe. But they only work if you scroll over certain ones first!! I am losing my mind...Please help. I also want to make the images fade out when rollout but its not working.
I can email someone the file, please help...
Slider That Scrolls A 23frame Sequence?
Hello,
I believe I understand the principle on how to actionscript a slider to move back and forth on the X (like the red adobe slider in the above banner^) but it also scrubs through a 23 frame animation (360 rotation of and object).
I just dont know where to start and to accurately write the script without errors.
Can somebody lead me in the right direction and show me the best way to accomplish this..
on (press)? X-axis?, functions?, clip events?
Please help, thanks for your time....
P
Flash Animation Big But With No Browser Scrolls
Here's my problem,
I'm building a website that occupies full screen size (100%), i'm doing this so i can adapt to many resolutions and not do a fixed size site.
So here's my problem. I want a flash animation banner to be 100% too, without resizing, streching or shrinking. So what i thought was creating a large size animation and then simply not have the browser's scrollbars. Much like the images you can put in table cells background.
Still i can't seem to put my large in width animation to not make the browsers scroll appear.
Can someone help me out? Thanks
Horizontal Scrolls On The Main Stage
Hi
I am putting 11 movies containing 11 flv files on my main stage. All those movies have onMouse over and click events attached with them. As those movies are not going to fit on the main stage so when i am running the flash file, it is just displaying 5 of the 11 movies and rest are being cut. Is there any way that I can code so that I will get the horizontal scrolls automatically if the movies are not going to fit on the screen? I am new to the 'stage' and AS3 concepts . Please help me out. All I need is to put 11 movies on the main stage with the horizontal scrolls.
Thanks in advance for your help
regards
Anuj
Malfunctioning Text Scrollers? (one Scrolls The Other)
Basically, when two scrollers are placed on the stage, one malfunctions whilst the other works.
I also noticed that the malfunctioning scroller also scrolls the working scroller.
At this point, i've tried many things to solve the problem, for example, in one of the scrollers i changed the variable names, such as 'dragger', 'bar', 'mask_mc' and 'main', but to no avail, i keep getting the same problem, i cant see any possible way in which one scroller can refference and affect the other.
So if anyone is able to figure this out and get back to me, that would be of immense help.
thankyou in advance.
Help - Still Not Getting Multiple Claudio Scrolls To Work?
This scroller is very customizable and works great. I've been re-working a website I created to be completely Flash and on three different locations I'll be using the scroller. Question though:
I've read that the only way to have several of the same scroller work independantly is to "change all the variables in each" I've changed the instance names in the AS as well as the symbols. Still can't seem to get it to work for more than one instance. Any suggestions as to what else I should change. The only thread that had a working example has a dead link.
Also, is it possible to have the scroller automatically scroll when a user mouses over the up or down button? I'm fairly new to actionscript & Flash though I've been making several leaps considering I didn't know anything about a month ago.
Thanks in advance. Sorry if this is a silly question.
Here is my FLA:
XML GALLERY With Thumbnail Grid That Scrolls
I have a gallery that has two columns of thumbnails but it wont scroll. what can I do?
ActionScript Code:
function loadXML(loaded) { if (loaded) { xmlNode = this.firstChild; image = []; description = []; thumbnails = []; link = []; details = []; price = []; url = []; style1link = []; style2link = []; style3link = []; style1desc = []; style2desc = []; style3desc = []; options = []; size1 = []; size2 = []; size3 = []; color1 = []; color2 = []; color3 = []; color4 = []; option1price = []; option2price = []; option3price = []; total = xmlNode.childNodes.length; for (i=0; i<total; i++) { image[i] = xmlNode.childNodes[i].childNodes[0].firstChild.nodeValue; description[i] = xmlNode.childNodes[i].childNodes[1].firstChild.nodeValue; link[i] = xmlNode.childNodes[i].childNodes[3].firstChild.nodeValue; details[i] = xmlNode.childNodes[i].childNodes[4].firstChild.nodeValue; price[i] = xmlNode.childNodes[i].childNodes[5].firstChild.nodeValue; url[i] = xmlNode.childNodes[i].childNodes[6].firstChild.nodeValue; style1link[i] = xmlNode.childNodes[i].childNodes[7].firstChild.nodeValue; style2link[i] = xmlNode.childNodes[i].childNodes[8].firstChild.nodeValue; style3link[i] = xmlNode.childNodes[i].childNodes[9].firstChild.nodeValue; style1desc[i] = xmlNode.childNodes[i].childNodes[10].firstChild.nodeValue; style2desc[i] = xmlNode.childNodes[i].childNodes[11].firstChild.nodeValue; style3desc[i] = xmlNode.childNodes[i].childNodes[12].firstChild.nodeValue; options[i] = xmlNode.childNodes[i].childNodes[13].firstChild.nodeValue; size1[i] = xmlNode.childNodes[i].childNodes[14].firstChild.nodeValue; size2[i] = xmlNode.childNodes[i].childNodes[15].firstChild.nodeValue; size3[i] = xmlNode.childNodes[i].childNodes[16].firstChild.nodeValue; color1[i] = xmlNode.childNodes[i].childNodes[17].firstChild.nodeValue; color2[i] = xmlNode.childNodes[i].childNodes[18].firstChild.nodeValue; color3[i] = xmlNode.childNodes[i].childNodes[19].firstChild.nodeValue; color4[i] = xmlNode.childNodes[i].childNodes[20].firstChild.nodeValue; option1price[i] = xmlNode.childNodes[i].childNodes[21].firstChild.nodeValue; option2price[i] = xmlNode.childNodes[i].childNodes[22].firstChild.nodeValue; option3price[i] = xmlNode.childNodes[i].childNodes[23].firstChild.nodeValue; thumbnails[i] = xmlNode.childNodes[i].childNodes[2].firstChild.nodeValue; thumbnails_fn(i); } firstImage(); } else { content = "file not loaded!"; }}xmlData = new XML();xmlData.ignoreWhite = true;xmlData.onLoad = loadXML;xmlData.load("FLWR.xml");///////////////////////////////////// listen = new Object();listen.onKeyDown = function() { if (Key.getCode() == Key.UP) { prevImage(); } else if (Key.getCode() == Key.DOWN) { nextImage(); }};Key.addListener(listen);previous_btn.onRelease = function() { prevImage();};next_btn.onRelease = function() { nextImage();};///////////////////////////////////// p = 0;cols = 3; //the number of columns you wantthis.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; } } // //getURL statement // picture.onRelease = function() { attachMovie("contentblock1", "contentblock", 100, {_x:100, _y:0}); unloadMovie("Symbol 10"); loaderB.loadMovie(link[p], 16); loaderB._lockroot = true; imgbk._xscale=0; imgbk._yscale=0; imgbk._x=-600; imgbk._y=-370; this._alpha=0; this._xscale=90; this._yscale=90; this._x=-100; this._y=-370; }; //};function nextImage() { if (p<(total-1)) { p++; if (loaded == filesize) { picture._alpha = 0; picture._xscale=35; picture._yscale=35; picture.loadMovie(image[p], 1); desc_txt.text = description[p]; attachMovie("Symbol 101", "Symbol 10", 1, {_x:-170, _y:100,_alpha:80,_xscale:150,_yscale:150}); picture_num(); } }}function prevImage() { if (p>0) { p--; picture._alpha = 0; picture.loadMovie(image[p], 1); picture._xscale=35; picture._yscale=35; desc_txt.text = description[p]; attachMovie("Symbol 101", "Symbol 10", 1, {_x:-170, _y:100,_alpha:80,_xscale:150,_yscale:150}); picture_num(); }}function firstImage() { if (loaded == filesize) { picture._alpha = 0; picture.loadMovie(image[0], 1); picture._xscale=35; picture._yscale=35; desc_txt.text = description[0]; attachMovie("Symbol 101", "Symbol 10", 1, {_x:-170, _y:100,_alpha:80,_xscale:150,_yscale:150}); picture_num(); }}function picture_num() { current_pos = p+1; pos_txt.text = current_pos+" / "+total;}function thumbNailScroller() { // thumbnail code! this.createEmptyMovieClip("tscroller", 2000); scroll_speed = 10; tscroller.onEnterFrame = function() { if ((this._xmouse>=thumbnail_mc._x) && (this._xmouse<=thumbnail_mc._x+thumbnail_mc._width)) { if ((this._ymouse>=(hit_right._y-40)) && (thumbnail_mc.hitTest(hit_right))) { thumbnail_mc._y -= scroll_speed; } else if ((this._ymouse<=(hit_left._y+40)) && (thumbnail_mc.hitTest(hit_left))) { thumbnail_mc._y += scroll_speed; } } else { delete tscroller.onEnterFrame; } };}function thumbnails_fn(k) { thumbnail_mc.createEmptyMovieClip("t"+k, thumbnail_mc.getNextHighestDepth()); tlistener = new Object(); tlistener.onLoadInit = function(target_mc) { target_mc._x = hit_left._x + ((k%cols)*(target_mc._width+10));target_mc._y = Math.floor(k/cols)*(target_mc._height+10); target_mc.pictureValue = k; target_mc.onRelease = function() { p = this.pictureValue-1; nextImage(); }; target_mc.onRollOver = function() { this._alpha = 50; thumbNailScroller(); }; target_mc.onRollOut = function() { this._alpha = 100; }; }; image_mcl = new MovieClipLoader(); image_mcl.addListener(tlistener); image_mcl.loadClip(thumbnails[k], "thumbnail_mc.t"+k);}
Scroll Text Scrolls And Then It Wont
I have a movie1 that loads movie2. Movie2 contains some dynamically loaded text. It loads as it should.. and I can even get it to scroll as it should when I am testing just movie2.
YEt, the problem starts when Movie1 loads movie2. The text is no longer able to scroll. It is visible, just not able to scroll once movie1 loads it in.
here is my code for movie2
PHP Code:
system.useCodepage = true;
fscommand("allowscale", "false");
loadText = new loadVars();
loadText.load("price.txt");
loadText.onLoad = function(OK) {
if (OK) {
mytext.html = true;
mytext.htmlText = this.text;
}
};
stop();
here is my code from movie1:
PHP Code:
on (release) {
loadMovie("price.swf", "main");
}
thanks..
-ROB
Help Creating A Box That Automatically Scrolls Text.
Does anyone have an example/tutorial of how to create a box that will scroll text vertically? I don't want the user to have a scrollbar, I need it to scroll and loop automatically. Of course the text will need to be dynamically retrieved from a database.
I found several examples of what I need but all cost money. It appears to be a fairly simple task to create one but I haven't had the opportunity to use Flash that much.
Regards,
sknyppy
|