Scrolling Type Thing
Hi, anyone got a bit of script that will scroll text nicely? What I would really like, is as you move your mouse up the text moves down and as you move down it scrolls up, this would work anytime your mouse is over the text area as opposed to on a small scroll button. Any help would be appreciated,
Cheers C
FlashKit > Flash Help > Flash ActionScript
Posted on: 04-22-2002, 07:02 AM
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Scrolling Banner Type Thing
Hello,
Im new to flash and im wanting to create a scrolling bar to put on my site which scrolls the companies i have done work for
it will auto scroll on its own (and loop) when the mouse is not over the movie and when the mouseovers the movie slows, and as the mouse moves to either the left or right the movie reacts accordingly.
what i want is for the user to be able to click on to a particular logo and it takes them to the website or that bookmark in my portfolio.
Any help would be really appreciated.
for your ref i want something similar to the scrolling bars on here :-
http://www.zeitgeistfilms.com/
http://www.foxmovies.com/ - but auto scoll
http://www.dreamworks.com/dreamworks_home.html - but auto scroll.
you get the idea
XML And Scrolling Pane Type Thing
I have an xml something like this
Code:
<server>
<player>
<playername>Player 1</playername>
<ping> 64 </ping>
<frags>48</frags>
</player>
<player>
<playername>Player 2</playername>
<ping> 51 </ping>
<frags>45</frags>
</player>
<player>
<playername>Player 3</playername>
<ping> 175 </ping>
<frags>34</frags>
</player>
<player>
<playername>Player 4</playername>
<ping> 61 </ping>
<frags>33</frags>
</player>
</server>
I can get the xml into my flash by using this
Code:
var theXML:XML = new XML();
theXML.ignoreWhite = true;
theXML.onLoad = function(){
var itemNodes = this.firstChild.childNodes;
for(i = 0; i < itemNodes.length; i++){
var playerName = itemNodes[i].childNodes[0].firstChild.nodeValue;
var playerPing = itemNodes[i].childNodes[1].firstChild.nodeValue;
var playerFrags = itemNodes[i].childNodes[2].firstChild.nodeValue;
playerInfoTxt.text += playerName+ " - " + playerPing + " - " + playerFrags +"
";
}
}
theXML.load("server.xml");
However as you can tell this is not really good. Basically I want the info properly spaced (so that each child node is in columns etc) and it is going to have to be scrollable as the length of the xml will vary.
Can someone help me please.
Thanks in advance
jmcall10
Making A Thing Any Of Which Will Interact With Any Of Another Type Of Thing
Well i know that title was a bit vague but heres what im trying to do, ive been larning to use flash for the past couple weeks, I'm using flash MX, i am expeirienced in other programming languages. What id like to do is to make an object, in this case a turet, which has code in it and can be duplicated, i know how to do that part, but, i want to be able to make it and copy it, and also have an enemy i can copy, a zobie, and have any of the turrets shoot at any of the zombies that get close. They cant all be pre scripted with eachothers names because i want to be able to create either after the program starts.
Basically, the zombies come out all over during the program and the player clicks where he wants to put turrets and those turrets shoot at whichever zombie is closest to them. Im sure its not that hard, and probably would involve arrays, but since im still learning how flash works im not sure how it can be done. Any help is apriciated, thanks. While i wait for a reply I'm going to read some more on how arays work in flash since i think they may be the answer.
Thing Thing Arena Type Game.
I want to make a shooting game, but I had a question first. How can I make the hand follow the cursor constantly, but never leave a restricted area? I would like to know how, thanks.
[F8] Help With Form/Mad Lib Type Thing
Hey, all -
I'm trying to create a Mad Libs type game for a holiday card. Unfortunately, I've only got a very small amount of Flash experience (Flash 3, at that!), so I'm not sure where to even start.
Basically, I need a type of form where users could input their answers, and they would appear in the blanks. I'm assuming it's possible, but don't know where to look for help with that. Any ideas/tutorials that might be useful?
Thanks so much in advance!
Radio-ish Type Thing...
Does AS3 open up any new possibilities for streaming the same instance of a file to multiple users without using FMS? Kind of like a radio that any user can pause/play etc. and it'll pause/play it for the other listeners...
Any general thoughts about this would be great, thanks...
[F8] Timer Type Thing
Is it possible to use action script to detect when the value within a dynamic text box hits "0", that the script causes the user to be directed to a new frame such as frame "test" ?
if so hows this possible ? thanks for anyhelp
FAQ Type Thing In Flash?
Hello all, i was curious as to how i would do this...or if it even at all possible...
You know how in HTML you can set anchor points in a document, where when you click a button it will go down to that anchor? such as a FAQ system where the user clicks a question and the list is automatically moved down to show the resulting answer, while still alowwing the user to scroll back to the top or down manually if need be. Now, i have NO idea how i could do this in flash...if it would even be at all possible...the workings would be like this:
|list of questions here|
text box with 1 long list of all answers. when a question is clicked on the box moves the display the appropriate answer, whilest still being to scroll around after being moved to the location...
consult a normal faq or something if you still dont get it...
any help would be greatly appreciated!
][
Help With Carousel-type Thing
Hi, does anyone know of a tutorial or just a basic idea of how I would accomplish something exactly like the flash element on www.emc.com?
Any help would be greatly appreciated.
Following Ghost Type Thing?
Hi,
Can anyone help..?
I'm try to do a ghosting type thing where a box moves across the screen then back again.(This effect I've see so many times it must be a flash classic but I have no idea how it's done?).
The thing is I'm after a sort of ghosting following it as it moves which is affected by its speed ie the faster it goes the ghosting becomes stretched then as it slows down the ghosting catches it up.
Anyone have any ideas?
Thanks
Spence
AttachMovie OOP Type Of Thing Help. >:D
Code:
MicroEgg = function () {
this.health = 10;
this.cost = 100;
this.attack = 0;
this.name = "MicroEgg";
_root.MicroEgg.attachMovie(_root.MicroEgg, MicroEgg+i, 1);
};
That's the code I have currently. My problem is, I need it to be where when you make a new "MicroEgg" it has the graphics of it, and for it to be placed randomly on the screen. (W = 550, H = 400) I've never been too good with OOP or attachMovie, mainly because i've never used them until now. Thanks in advance, and if your here to critisize my sloppy work
º( ò,ó)=O)>,ó)
;D
Following Ghost Type Thing?
Hi,
Can anyone help..?
I'm try to do a ghosting type thing where a box moves across the screen then back again.(This effect I've see so many times it must be a flash classic but I have no idea how it's done?).
The thing is I'm after a sort of ghosting following it as it moves which is affected by its speed ie the faster it goes the ghosting becomes stretched then as it slows down the ghosting catches it up.
Anyone have any ideas?
Thanks
Spence
Mouse Over Type Thing
Hi everybody,
I was hoping someone could point me in the right direction...
I'm working on a site that has a property listing page that is located on an ultimatescroller component that is about half the page width. What I'm looking to do is make each text listing a button or a graphic and use a mouse over option to show the property on the left hand side when they mouse over the text listing (which would actually be a graphic).
I'm not exactly sure how to accomplish this because the text is on the scroller and the image that would show up (upon mouse over) is not. I'm thinking I have to convert each text listing to a graphic and use some sort of AS to accomplish what I want to do, but I am a little behind in my AS studies.
Does anybody have an idea of where i might look or maybe the code i would need to accomplish such a thing.
I'm using flash 8 pro if that helps...
Any help would be greatly appreciated...
Thanks
Scratch Card Type Thing?
Is there any way the user can rub out an object on the stage so as to reveal something else underneath, a bit like a flash scratch card of some kind?
Cheers.
Mailing List Type Thing
I'm working on a new project, and for the under construction page they want the user to enter their email address and then have it sent to an external file like a .txt or something so it can be put on a mailing list.
I'm not really sure where to start with this, so I would greatly appreciate any suggestions or if you could point me towards some tutorials (FK or otherwise). Or, if there is another method simpler than flash, I'd like to know.
thanks in advance,
james
Countdown Timer Type Thing HELP
Hello!
I am creating a screensaver that needs to have a digital clock counting down to a certain date.
Is there an actionscript to do this, and does the computer have to be connected to the internet to do do it?
can anyone assist with this puzzler?!!!
Thanx in advance :O)
Help Required With Variable Type Thing
Hi all
As you can tell from the title, i dont know a huge amount about variables and the like! Ive used them before, but years ago - so ive forgotten!
Basically what im after, is to be able to replicate an effect seen here:
http://www.apathyislethal.org
If you load that up, you'll get a popup window appearing in the background (behind the main window, so it wont show unless you select it!). In that window it says something like "whilst you were online, 2 children were orphaned by AIDS" - thing is tho, every 14 seconds the number increases (eg "...3 children were orphaned by AIDS")
What i want to do is replicate that effect - counting 14 seconds is easy, but how do i get it to change the text? Its not done by simply making a reeeeeeeeeeeally long movie, with a different number every 14 frames (and setting the frame rate to 1fps) as i left it all day and it went all the way up to 5k-ish!!
Any help would be really appreciated.
thanks in advance
David.
Updateable Menu Type Thing
a client wants a website set up for his cafe bar and wanted the menu to be updated weekly is there an easy way that this can be done. hope you can help
Help With A Shopping Cart Type Thing
I want to make a thing where you pick an item and add to cart and it adds up the price of everything you order basically a basic shopping cart thing seen on most shopping sites, could anyone point me to a good tutorial that contains this stuff?
Onblur Type Thing In Flash?
Hi,
I'm trying to have a function be called once a user finishes typing in an input field. Does anyone know of a way to do this? I have a project due on Monday and would truly, truly appreciate any assistance with this.
Thanks!
Address-book Type Thing.
I want to try and create and address-book type thing but with a few differences. For instance: I want to be able to add pictures to the profile such as a map. I also want to add search features for different items like for a school version a search could be for all the freshmen or freshmen+males/female or something of the sort. Does anyone have an idea of how I could do this or any place I could find a tutorial. I'm using flash 8. Thanks in advance for any help.
<a Onmouseover='asfunction' > Type Of Thing
I noticed the nice feature on pierinc.com. When you hover a link it triggers a tooltip with the snippet of the links content. The tooltip is obviously the easy part, but how to get it to trigger by hovering the link?
Briefly thought this might have been just an asfunction on the onmouseover attribute in the A tag, though quickly realized its just for URL@ like HREF. So with that and most likely css out of the way... anyone have a tip for poor old me on how to do this?
Thanks for any help,
Kent
An Array Type Thing Wiht MC's
i am trying to make a game where, you shoot, teh gun can shoot pirtty constantly, and all the bullets looks the same (obivously), is there any way i can use 1 movieclip and duplicate it? in an array or somthing??
thanks
Snap To Objects Type Thing
i am making a thing where a bunch of square shaped movie clips will be placed on the desktop, and will be draggable. i was wondering if there was a way to get them to stick together... similar to the snap to objects tool... like say i am dragging one and i want to make a large square out of the smaller squares... i want them to snap together... any ideas?
DataBase Type Thing Opinion
I was creating a Database type thing for my grandfather to work with as he is on the go, and that various other people can work on too... but the question is this:
Should I stick to XML or PHP~? It will involve pictures and converting existing documents into a standard template type thing. I'm not a stranger to either PHP or XML, but I don't know either to a masterful level. This is just looking for opinions from someone who might have already done this, or something like it.
Free Transform Type Thing?
Hi i would like to make a little something that can help me with my coursework.
I am doing this thing on T-Shapes, etc. Anyways. I would like to make something in flash where you can specify a grid size (ie 10) and then a grid will then appear of the specified size with a number in each square starting from 1 - whatever.
After the grid is shown a T-Shape should appear on the grid. and this T can be moved aroung and rotated around any point like you can do using free transform but without the scaling part.
How do i do this???
it would help me alot.
thank you.
Custom Scrollpane Type Thing
Hello, Im not the best with flash and Im in need of some help making a scroll pane that shows a externally loaded html or swf file (I would prefer html easier to make quick small changes) and it has to have custom up and down arrows. If I were to change the external file to make it have a greater height I want the scroll pane to continue working with out me editing the pane. I made a little gif to try and explain what I need more clearly because I can barely understand what Im talking about
dont worry it wont look like this. Thanks.
Infinite Menu Type Thing
I've got the following as:
ActionScript Code:
#include "lmc_tween_as1.as"stop();_global.depthCounter = 0;var fadeAmount = 30;var images = new Array();images[0] = "image1_small.jpg";images[1] = "image2_small.jpg";images[2] = "image3_small.jpg";images[3] = "image4_small.jpg";images[4] = "image5_small.jpg";images[5] = "image1_small.jpg";images[6] = "image2_small.jpg";images[7] = "image3_small.jpg";images[8] = "image4_small.jpg";images[9] = "image5_small.jpg";images[10] = "image1_small.jpg";images[11] = "image2_small.jpg";images[12] = "image3_small.jpg";images[13] = "image4_small.jpg";images[14] = "image5_small.jpg";images[15] = "image1_small.jpg";images[16] = "image1_small.jpg";function init() { holder_mc.loadMovie(images[0]); var thumbz = createEmptyMovieClip("thumbz_mc", 1); thumbz._y = film_mc._y + 11; thumbz._x = film_mc._x; for(var i = 0; i < images.length; i++) { var curThumb = thumbz.attachMovie("thumbnail_mc", "thumb" + i, 100 + i); curThumb._x = 6 + i * (curThumb._width); curThumb.thumbContainer_mc.loadMovie(images[i]); curThumb.iValue = i; curThumb.onRollOver = function() { this._parent._parent.film_mc.alphaTo(100, 1, "easeOutQuad"); this._parent.alphaTo(100, 1, "easeOutQuad"); }; curThumb.onRollOut = function() { this._parent._parent.film_mc.alphaTo(fadeAmount, 1, "easeOutQuad"); this._parent.alphaTo(fadeAmount, 1, "easeOutQuad"); }; curThumb.onRelease = function() { this._parent._parent.holder_mc.loadMovie(images[this.iValue]); } }} function nextDepth() { _global.depthCounter++; return _global.depthCounter;}film_mc.onRollOver = function() { this.alphaTo(100, 1, "easeOutQuad");};film_mc.onRollOut = function() { this.alphaTo(fadeAmount, 1, "easeOutQuad");};/*film_mc.onEnterFrame = function() { if(_root._ymouse > Stage.height - 100) { this._x += ((Stage.width / 2) - _root._xmouse) / 20; if(this._x >= 0) this._x = 0; if(this._x <= Stage.width - this._width)this._x = Stage.width - this._width; this._parent.thumbz_mc._x = this._x; }};*/film_mc.onEnterFrame = function() { if(_root._ymouse > _root.boundry._height - 100) { this._x += ((_root.boundry._width / 2) - _root._xmouse) / 20; if(this._x >= 0) this._x = 0; if(this._x <= boundry._width - this._width)this._x = boundry._width - this._width; this._parent.thumbz_mc._x = this._x; }};init();
It basically is loading external jpg's into the film_mc (which is basically like an infinite menu). When you click on one of the thumbs it loads the pic into the holder_mc.
The problem is the way the menu works when mousing around. It works fine if you uncomment the above code and comment out the other onEnterFrame when the movie stage size is set to 375x200. In the above code I am trying to use this in a larger stage size so I tried to designate a movieclip as the "stage size" named boundry.
Hopefully someone can figure this out by checking out the script, but i can figure out a way to get you fla if you'd like.
Thanks to anyone willing to help!
Conditional FLV's For Quiz-type Thing
Hey, new guy here but been using this site for years now...my question is:
How do I load a certain FLV based on a score for a quiz?
Basically there are 5 questions. If you get one right, it should play a certain video. If wrong, it plays a different one. At the end (let's say you got 3 out of 5), it plays a 3out5 FLV video. The whole things basically stays the same as far as the stage setup, and the video stays in the same spot throughout the whole quiz. If you need more info, please let me know. How would you guys set this up? I have set var: score
Please help! (Using Flash 8 (obviously))
DataBase Type Thing Opinion
I was creating a Database type thing for my grandfather to work with as he is on the go, and that various other people can work on too... but the question is this:
Should I stick to XML or PHP~? It will involve pictures and converting existing documents into a standard template type thing. I'm not a stranger to either PHP or XML, but I don't know either to a masterful level. This is just looking for opinions from someone who might have already done this, or something like it.
Free Transform Type Thing?
Hi i would like to make a little something that can help me with my coursework.
I am doing this thing on T-Shapes, etc. Anyways. I would like to make something in flash where you can specify a grid size (ie 10) and then a grid will then appear of the specified size with a number in each square starting from 1 - whatever.
After the grid is shown a T-Shape should appear on the grid. and this T can be moved aroung and rotated around any point like you can do using free transform but without the scaling part.
How do i do this???
it would help me alot.
thank you.
Can This Be Done? (image Gallery Type Thing)
in my layout i have 1 image showing at all time, then i have to arrow buttons, one for back (previous pic) and one for forward (next pic).
all the pictures are the same dimensions to fix the box in flash that i have.
can i ...
create an xml file that lists all the pictures, say like a 100 for now.
i want the pics to fade out and then the next fade in and vice versa depending on the button pushed.
all the pics will be in one directory in sequential number order.
is this possible?
what i don't want to do is for every picture creating an external swf and import it.
Need Urgent Help .. Can Not Type Any Thing In Action Panal
I read many tutorials on many site including some on flashkit too i saw a sentence many times " Type this Code " but when i try to type any thing in action panal i can not type.... what is its reason and ow it can be resolved. because i am habitual of typing code myself....
How Do I Create A Message Board Type Thing?
please can you tell me how to create a space on my website for users to send me a message directly into my email account, with space for them to enter their name + email address.
If you don't understand what I'm talking about go to Haunch Venison's site and click on contact, I'd like something like they've got:
http://www.haunchofvenison.com/
thanks, peace leo
Cursor Move Dpad Type Thing Help
hiya,
i posted this in games because i am working on a game but i thougth it might be more general help required so i am sticking it here as well:
mouse cursor attach thingee
HIya,
need some help here with a thing i am trying to get my brain around
Basically what i want to do is make the mouse into a pointer finger, which i am able to do by making it a custom cursor, so thats not a problem. The tricky bit is; i want the user to be able to operate a switch that has multiple states. i.e. the finger moves over the switch and the user can move the finger up and make the switch move up, move the finger (cursor) down and make the switch move down, etc. But also they can press the mouse button and the finger presses the switch down. I already have all the graphics prepared and the mouse press is easy, buti am having difficluty working out how to attach the switch to the cursor move so that it moves on roll over. Any help appreciated.
It's a gamepad sort of thing and the thumb cursor needs to make the switch react underneath as it moves over it and depress when you press.
exaple to show what i mean:
Making A Jukebox Type Thing For A Site
i need a simple music player on my site. what i mean like, is maybe 3 buttons at the top corner, that when you click them, they play a different loop. and maybe a volume controller as well, does anyone know of a FLA or a tutorail which would help me to do this?
Flash Website - Video Gallery/portfolio Type Thing
hi all
what i want to do is display various video content on my flash website, but I'm a bit new to Flash and I'm struggling.
What I've done is put single videos using the 'media display' and 'controller' on single 'pages', each in seperate scenes in the movie - this doesn't work - it's slow when streamed and the sound continues once another movie is selected from the various thumbnails.
this is exactly what I want
http://205.200.127.103/video.html
credit to PainBehindMyEye
Anyone know of any good tutorial or can point me in the right direction?
Thanks
3d Zooming Tunnel Effect Type Thing With Script...or Not...brain...frazzled
helloo,
can anyone point me in the direction of how i could possibly do a zooming into a tunnel effect (sorta like a train tunnel) with the circles getting bigger and bigger - i could do this using tweening but i have a feeling that the file size would be horendous...i am nowhere near good enough to script anything like this...oh please someone throw me some script so i could tweak it or if anyone has a better idea please inform moi...
muchly muchly appreciated muchly
lou
^_^
[help] Scrolling Nav Thing.....
OK, I'm kind of hacking here... but based around the turorial at:
http://www.kirupa.com/developer/mx/infinite.htm
But I want my nav movie to scroll only when arrows at either end are 'moused'
I've tried attaching the following to my arrow buttons:
Code:
on (mouseOver) {
var distance=_root._xmouse-SuperScroll:xcenter;
SuperScrollMC._x+=(distance*SuperScrollMC:speed);
if (SuperScrollMC._x > 0) SuperScrollMC._x=-810;
if (SuperScrollMC._x < -810) SuperScrollMC._x=0;
}
but this only moves SuperScrollMC one blip either way.... I have to mouse off, mouse on, mouse off, mouse on etc to get it to scroll...
I'm sure it's simple, but how do I get the script to loop until the mouse is off the button...
Thanks in advance
Ben
Auto Scrolling Bar Thing?
ive seen it a few places and would like one on a site im currently designing. It is a scrollbar that scrolls when a mouse is rolled over either side of the object. So when you mouse over the left side it scrolls to the left and when you mouse over the right side it scrolls to the right. I expect theres a tutorial on this but am not sure wher to look. Please help me.
Thanks
Scrolling Menu Thing HELP
i want to make a scrolling menu like that has a display when you put the mouse over the links now... you may think that im a beginner by saying that but go to www.armorforsleep.com and please look at how that display works......i DO NOT understand it
Any Open Source Countdowns?" Xxdays. Xxhrs. Xxmins To Go" Type Thing
Can anyone recommend any good open source solutions for a countdown. I need to put one on the head of a web page saying xxx days xxx hrs and xxx mins to go.
Flash or Javascript are fine but I suspect Flash would be much easier for me to customise
Any assistance or guidance would be most welcome.
Thanks in advance
Dynamic Image Scrolling... Err... Thing..
Hi First post, etc...
Anyway:
Right - I need to load a bunch of images from an XML file and drop them into a fixed-width container with a couple of arrow buttons either side to make it scroll left and right through the images. Yeah, one of those things.
I should mention that I'm not a Flash developer. I do primarily ASP, PHP and Javascript. This is my first attempt. I have, therefore, simply started up CS3 and gone to the first frame-thingy on the single layer that I've got, right-clicked, selected "Actions" and started typing in code. This is probably neither traditional nor advisable, but I'll see how I get on.
This is what I have. It loads the XML, reads the image names, loads the images and displays them in a row. Great. It's even got some error handling.
What I'm currently having problems with is... loading these images into a container. If I change:
addChild(myUILoader);
(highlighted in code below)
to
objContainer.addChild(myUILoader);
- everything disappears. What am I doing wrong?
Secondly... well, I'm a n00b. If I was doing this in HTML/Javascript, I'd know exactly where to go for a script that did most of it for me, how to tweak it into shape, and I'd be able to give an opinion on how efficient and elegant the code was. With Flash... I've no idea. I mean, what the hell is a MovieClip? It looks like some sort of general-purpose stuff-holding object to me but... I've no idea if I'm using the right sort of objects in the right sort of way. And what I've written seems one hell of a lot of code considering how little it actually DOES I guess the answer to this is simply "experience" but if you know where everyone in the Flash community gets their dynamic-image-scrolling ActionScripts from, I'd be dead grateful, like
Code:
import flash.display.*;
import flash.net.*;
import fl.containers.UILoader;
import fl.controls.Label;
import fl.controls.ProgressBar;
import fl.controls.ProgressBarMode;
import flash.errors.IOError;
import flash.events.IOErrorEvent;
/*
------------------------------------------------------
Create page elements
*/
// label for... stuff
var objLabel:Label = new Label();
objLabel.autoSize = TextFieldAutoSize.LEFT;
objLabel.text = "";
objLabel.move(10, 10);
addChild(objLabel);
//progress bar
var objProgressBar:ProgressBar = new ProgressBar();
objProgressBar.mode = ProgressBarMode.MANUAL;
objProgressBar.move(10, 30);
addChild(objProgressBar);
// container for thumbnail images
var objContainer:MovieClip = new MovieClip();
objContainer.width=300;
objContainer.height=100;
objContainer.x = 10;
objContainer.y = 10;
addChild(objContainer);
/*
------------------------------------------------------
Load page data from XML
*/
var objXmlLoader:URLLoader = new URLLoader();
objXmlLoader.addEventListener(Event.COMPLETE, PopulateSlideshow);
objXmlLoader.addEventListener(IOErrorEvent.IO_ERROR, LoadErrorHandler);
objXmlLoader.load(new URLRequest("http://www.mysite.co.uk/flash/story1/story.xml"));;
function PopulateSlideshow(e:Event):void{
var xmlData:XML = new XML(e.target.data);
var thumbList:XMLList = xmlData.images.image.thumb;
var mainList:XMLList = xmlData.images.image.fullsize;
var thumbsarray:Array = new Array();
var mainsarray:Array = new Array();
var baseURL:String = "http://www.mysite.co.uk/flash/story1/"
var url:String = "";
for each (var thumb:XML in thumbList){
thumbsarray[thumbsarray.length] = thumb;
}
for each (var main:XML in mainList){
mainsarray[mainsarray.length] = main;
}
for(var i = 0; i<thumbsarray.length; i++){
url = baseURL + thumbsarray[i];
var myUILoader:UILoader = new UILoader();
myUILoader.scaleContent = false;
myUILoader.source = url;
myUILoader.addEventListener(ProgressEvent.PROGRESS, progressHandler);
myUILoader.addEventListener(Event.COMPLETE, completeHandler);
myUILoader.addEventListener(IOErrorEvent.IO_ERROR, LoadErrorHandler);
myUILoader.move((i*85), 5);
addChild(myUILoader);
}
}
function LoadErrorHandler(errorEvent:IOErrorEvent):void{
//myLabel.text = errorEvent.text;
objLabel.text = "Nope, can't find it...."
}
function progressHandler(event:ProgressEvent):void {
var uiLdr:UILoader = event.currentTarget as UILoader;
var kbLoaded:String = Number(uiLdr.bytesLoaded / 1024).toFixed(1);
var kbTotal:String = Number(uiLdr.bytesTotal / 1024).toFixed(1);
objLabel.text = kbLoaded + " of " + kbTotal + " KB" + " (" + Math.round(uiLdr.percentLoaded) + "%)";
objProgressBar.setProgress(event.bytesLoaded, event.bytesTotal);
}
function completeHandler(event:Event):void {
var uiLdr:UILoader = event.currentTarget as UILoader;
var image:DisplayObject = uiLdr.content as DisplayObject;
//trace("UILoader.content:", image.width, image.height);
uiLdr.setSize(image.width, image.height);
objLabel.visible = false;
objProgressBar.visible = false;
uiLdr.removeEventListener(ProgressEvent.PROGRESS, progressHandler);
uiLdr.removeEventListener(Event.COMPLETE, completeHandler);
}
Fancy Box Type Moving Graphic Type Cool Efect But Im To Dumb Type Thingy
i am tring to make a box thinky simaler to the one on www.starvingeyes.com but cant even work out how to start it. is there anyone who can point me in the right direction or to a tutorial ?
the box has a graphic inside a grided box the sections of the graphic fade in and out as the mouse goes over them and displays random sections when the user is not moving the mouse over the box
i did find java tutorials for this effect but would much preffer it to come from flash as java is a bugger to get working on some machines
Any way thanks in advance for any help
Steven Green one_mad_punk@yahoo.co.uk
Strange Thing Occurring With My Rollover Scrolling Menu
I really don't know why this is happening.
I have a menu on the side of the screen ("sidePanel_mc") that should scroll inversely when the cursor is placed over it (meaning that when the cursor moves down, the menu goes up and vice versa).
The inexplicable occurrence is this: the pace at which the side menu moves is progressively accelerating, even though I have it fixed at "1". So each time you move the mouse, let's say, a centimeter, the menu will shift progressively more pixels until it covers its entire allowed movement.
I don't know what I'm missing, although I fear it is something obvious. Any help would be appreciated.
Here's the code:
var startY:Number = new Number;
var mouseStartY:Number = new Number;
var difference:Number = new Number;
sidePanel_mc.addEventListener(MouseEvent.MOUSE_OVE R, startScroll);
function startScroll(e:MouseEvent)
{
mouseStartY = mouseY;
startY = sidePanel_mc.y;
sidePanel_mc.addEventListener(MouseEvent.MOUSE_MOV E, scrollY);
function scrollY(e:Event)
{
difference = mouseY-mouseStartY;
if(difference < 0)
{
if(sidePanel_mc.y <66){sidePanel_mc.y += 1;};
};
if(difference > 0)
{
if(sidePanel_mc.y >-378){sidePanel_mc.y -= 1;};
};
}
};
Help With A Type Of Scrolling Menu
I'm trying to make a Flash scrolling menu that I can't seem to find a tutorial for as an example for what I am trying to do...
I attached a JPEG from a photoshop document of how the company i'm making this for wants it to look...
The designer of the company is my friend, and I told him I'd try my best to try and make it... but he really wants this menu to be exactly like this... so i need some help
Anyways...
If you look at the Picture... you see a bunch of little circles on the left... and a big picture on the right. the right circle is where pictures are going to load... and the left circles are the buttons that will load the various pictures.
Each button is for a different company. I.E. Warrior Lacross, XM Radio, Sirius Radio, Ford... etc. Obviously when you click the Warrior Lacrosse button, the Warrior Lacross Picture loads into the Right circle.
Well here's the thig I cant figure out. The company wants this menu to kinda be infinite... so when you hover the mouse over the top and bottom circles which are more than half way off the stage, the whole menu will scroll down...
In addition to that... they want the circles to start off about half the size you see in the picture... and when you scroll over them... they grow bigger...
I think this menu would be a really cool tutorial... but I can't seem to find anything that resembles it. The only thing I found that is somewhat like it is this...
http://www.actionscripts.org/tutoria...mi/index.shtml
However, That menu doesnt scroll... but it is the effect they want with the growing and shrinking of the buttons...
If ANYONE out there knows of what i'm talking about... and knows of a tutuorial for it... I would greatly appreciate pointing me in the right direction... If I find a good enough tutorial, I've notices I can pretty much figure out anything in flash after about a week of trying.
Some people on Flashkit are nice enough to sometimes make examples for me... but I'd rather have a tutorial... cause most of the times I can't figure out all the person did when they just send me the .FLA
Anyways.. thanks for any help
Later
SetInterval And Scrolling Type
I've written this little code and it works just fine.
But it feels kinda clunky since I have to initialize maxCount to be greater than zero because the setInterval fires before the .length is set.
Is there a way to streamline this?
I tried doing the setInterval in the onLoad but I think my scopes were all wrong.
Any suggestions on how to make this more efficient code?
Code:
var loadText:LoadVars = new LoadVars();
var intervalId:Number;
var count:Number = 0;
var duration:Number = 5;
var maxCount:Number = 1000; //<--------------Here I have to prime
my_txt.wordWrap = true;
function flowMovingText():Void {
my_txt.text = loadText.mainStory.substr(0, count);
if (count>=maxCount) {
clearInterval(intervalId);
}
count++;
}
loadText.onLoad = function(success:Boolean):Void {
if (success) {
maxCount = this.mainStory.length;
} else {
my_txt.text = "Unable to load external file.";
}
};
loadText.load("story.txt");
intervalId = setInterval(this, "flowMovingText", duration);
Preloader Inside Preloader Type Thing
Hi,
I've got like a main page that has a preloader in a different scene. And in the main page I call loadMovie on first frame that load external swf that has same structure - preloader scene with a main scene (content for the main page) ... but the first preloader seems to wait to load the actual page and the external swf before if finishes. Why is the first preloader not just preloading for the home page and then once u are there the other preloader kicks in and loads the content??? Also the preloader seems to have a wait till 20 % before it actually appears on the screen how is that?
code is
frame 1
-----------------------------
total_bytes = _root.getBytesTotal();
kb = int (total_bytes/1000)
loaded_bytes = _root.getBytesLoaded();
kb_loaded = int (loaded_bytes/1000);
remaining_bytes = total_bytes-loaded_bytes;
kb_remaining = int (remaining_bytes/1000);
percent_done = int((loaded_bytes/total_bytes)*100);
bar.bar2.gotoAndStop(percent_done);
ifFrameLoaded ("main", 1) {
gotoAndPlay ("main", 1);
}
--------------------------------
frame 2
gotoAndPlay(1);
Cheers
|