Image+text Scroller, Form Scroller, And Loading External Text Files - Urgent
Hi everybody!
Does anybody know how to do the following things in Flash MX?
1.Make a scroller with text + images in it; 2.Make a scroller with text + a form in it; 3.I followed the tutorial entitled "Scrolling Dynamically Loaded Text", but the text that I tried to load has over 160 lines, and I can only scroll down to about half way of the total lines. Why is that? 4.I also tried to load xml files using the code <?xml version="1.0" encoding="utf-8"?> on the first line of each xml file, but the ', &, and " " don't work.
Can anybody help me, please? This is urgent!
Thanks in advance!
animind
KirupaForum > Flash > Flash 8 (and earlier) > Flash MX
Posted on: 10-22-2003, 08:43 PM
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Image+text Scroller, Form Scroller, And Loading External Text Files - Urgent
Hi everybody!
Does anybody know how to do the following things in Flash MX?
1.Make a scroller with text + images in it;
2.Make a scroller with text + a form in it;
3.I followed the tutorial entitled "Scrolling Dynamically Loaded Text", but the text that I tried to load has over 160 lines, and I can only scroll down to about half way of the total lines. Why is that?
4.I also tried to load xml files using the code <?xml version="1.0" encoding="utf-8"?> on the first line of each xml file, but the ', &, and " " don't work.
Can anybody help me, please? This is urgent!
Thanks in advance!
animind
Loading External Text Files Into A Text Scroller
hello,
i'm second guessing my methods of loading info. from a text file into a text scroller , i've created. what i have is a text scroller, but depending which button i press, i would like new content loaded into that textfield(scroller) I sorta have an idea, but not sure of the procedure ..can some help ...Cheers!
Text Scroller With Image With Mouse Scroller
Hi to all,
I have problem with flash. that i want to creat dynamic text & image scroller in scroller by creating custom scroller (not inbuilt component) That scroller i can scroll with help of mouse's scroller. (the mouse's scroller & image must be include in to the scroller box)
Help me !
Help me !
Reply me fast if u have solution for it!!!!
Regards,
Samual
Loading External Text Into Scroller
Hi
Small problem I'm having, I think...
I'm loading an external text file into a dynamic scroller.
On the 1st frame I have:
randomNum = Math.round(Math.random()*9999999999);
loadVariablesNum("text/commentary.txt?"+randomNum, 0);
I then have a temporary button that is used to load the text into the scroller:
on (release) {
_root.scroller.text = commentary;
}
this seems to work fine, but I dont want people to have to click a button to see the text so I made a movieclip with the following actions:
onClipEvent(load){
_root.scroller.text = commentary;
}
This doesnt work though, any ideas?
Thanks
Stipes
Loading An External Text Scroller
Hi, i am having problems getting a text scroller to work after loading it into an existing swf file.
I basically have a main movie with navigation links. when you click on a link it loads another movie into the main movie. this works fine, but i also have some links within this 2nd movie that then when clicked load another movie into that movie (make sense, hope so!), this is where the problem is, the 3rd movie loads ok, but the text scroller within that movie does not work. It works fine when viewed on its own.
Any ideas how to resolve this would be much appreciated.
many thanks
Steven
Link On My Text , In My External Loading Txt. File, For My Scroller------------------
my link will not work in my external loading txt. file. the text. file is a dreamweaver txt. file. and the link will not show up. I clieck , "render as hmtl", and I have no luck...
check it out:
www.carpeinternational.com/forte.html
scroll to the bottom to see the link I am having problems with.
PLEASE HELP me in my emergency.
thank you!
Problem Loading External Text Using Claudio's Scroller
I know that I should be posting in that thread but no one seems to be taking notice of it, so I'm posting it here.
For some reason I can't seem to load external text! This is infuriating and very frustrating, so hoping that someone can help.
>>Link to fla<<
Thanks in advance!
EDIT: I found the mistake! Sorry for posting, the mods can delete this if they want.
Problem Loading External Text Using Claudio's Scroller
I know that I should be posting in that thread but no one seems to be taking notice of it, so I'm posting it here.
For some reason I can't seem to load external text! This is infuriating and very frustrating, so hoping that someone can help.
>>Link to fla<<
Thanks in advance!
EDIT: I found the mistake! Sorry for posting, the mods can delete this if they want.
Text Scroller Help - Scroller Won't Scroll Full Length Of Text?
I have a text scroller that calls for a external text file. I have 16 numbered items in the .txt file but only 12 items will scroll. Why is this and how do I fix it? Also, is there any way to format text in the .txt file so that it appears formatted in flash? Right now there is a bunch of spaces between the numbered items. Thanks anyone!!
Convert Movieclip Scroller To Dynamic Text Scroller
I have code I borrowed that is set up to scroll a movie clip image. However, it doesn't work well if I replace the graphics with a text box as the scrolling becomes "jerky" as I think there is too much information for it to process with the complexity of the text. So I was hoping to change the scrolling content from a movie clip image with text to a dynamic textbox. But it will not function when I do that change. In this currrent setup, the movieclip instance name is "contentmain". I tried naming the instance of the dynamic textbox with that name, but no text shows up next to the scroller when I play the movie.
Here's the code:
scrolling = function () {
var scrollHeight:Number = scrollTrac._height;
var contentHeight:Number = contentMain._height;
var scrollFaceHeight:Number = scrollFace._height;
var maskHeight:Number = maskedView._height;
var initPosition:Number = scrollFace._y=scrollTrac._y;
var initContentPos:Number = contentMain._y;
var finalContentPos:Number = maskHeight-contentHeight+initContentPos;
var left:Number = scrollTrac._x;
var top:Number = scrollTrac._y;
var right:Number = scrollTrac._x;
var bottom:Number = scrollTrac._height-scrollFaceHeight+scrollTrac._y;
var dy:Number = 0;
var speed:Number = 10;
var moveVal:Number = (contentHeight-maskHeight)/(scrollHeight-scrollFaceHeight);
// Setup easing event
contentMain.desiredX = contentMain._y;
contentMain.onEnterFrame = function() {
this._y -= (this._y - this.desiredX) / 3;
};
scrollFace.onPress = function() {
var currPos:Number = this._y;
startDrag(this, false, left, top, right, bottom);
this.onMouseMove = function() {
dy = Math.abs(initPosition-this._y);
contentMain.desiredX = Math.round(dy*-1*moveVal+initContentPos);
};
};
scrollFace.onMouseUp = function() {
stopDrag();
delete this.onMouseMove;
};
btnUp.onPress = function() {
this.onEnterFrame = function() {
if (contentMain._x+speed<maskedView._x) {
if (scrollFace._x<=left) {
scrollFace._x = left;
} else {
scrollFace._x -= speed/moveVal;
}
contentMain._x += speed;
} else {
scrollFace._x = left;
contentMain._x = maskedView._x;
delete this.onEnterFrame;
}
};
};
btnUp.onDragOut = function() {
delete this.onEnterFrame;
};
btnUp.onRelease = function() {
delete this.onEnterFrame;
};
btnDown.onPress = function() {
this.onEnterFrame = function() {
if (contentMain._x-speed>finalContentPos) {
if (scrollFace._x>=right) {
scrollFace._x = right;
} else {
scrollFace._x += speed/moveVal;
}
contentMain._x -= speed;
} else {
scrollFace._x = right;
contentMain._x = finalContentPos;
delete this.onEnterFrame;
}
};
};
btnDown.onRelease = function() {
delete this.onEnterFrame;
};
btnDown.onDragOut = function() {
delete this.onEnterFrame;
};
if (contentHeight<maskHeight) {
scrollFace._visible = false;
btnUp.enabled = false;
btnDown.enabled = false;
} else {
scrollFace._visible = true;
btnUp.enabled = true;
btnDown.enabled = true;
}
};
scrolling();
Any ideas?
Thanks,
Dave
Convert Movieclip Scroller To Dynamic Text Scroller
I have code I borrowed that is set up to scroll a movie clip image. However, it doesn't work well if I replace the graphics with a text box as the scrolling becomes "jerky" as I think there is too much information for it to process with the complexity of the text. So I was hoping to change the scrolling content from a movie clip image with text to a dynamic textbox. But it will not function when I do that change. In this currrent setup, the movieclip instance name is "contentmain". I tried naming the instance of the dynamic textbox with that name, but no text shows up next to the scroller when I play the movie.
Here's the code:
scrolling = function () {
var scrollHeight:Number = scrollTrac._height;
var contentHeight:Number = contentMain._height;
var scrollFaceHeight:Number = scrollFace._height;
var maskHeight:Number = maskedView._height;
var initPosition:Number = scrollFace._y=scrollTrac._y;
var initContentPos:Number = contentMain._y;
var finalContentPos:Number = maskHeight-contentHeight+initContentPos;
var left:Number = scrollTrac._x;
var top:Number = scrollTrac._y;
var right:Number = scrollTrac._x;
var bottom:Number = scrollTrac._height-scrollFaceHeight+scrollTrac._y;
var dy:Number = 0;
var speed:Number = 10;
var moveVal:Number = (contentHeight-maskHeight)/(scrollHeight-scrollFaceHeight);
// Setup easing event
contentMain.desiredX = contentMain._y;
contentMain.onEnterFrame = function() {
this._y -= (this._y - this.desiredX) / 3;
};
scrollFace.onPress = function() {
var currPos:Number = this._y;
startDrag(this, false, left, top, right, bottom);
this.onMouseMove = function() {
dy = Math.abs(initPosition-this._y);
contentMain.desiredX = Math.round(dy*-1*moveVal+initContentPos);
};
};
scrollFace.onMouseUp = function() {
stopDrag();
delete this.onMouseMove;
};
btnUp.onPress = function() {
this.onEnterFrame = function() {
if (contentMain._x+speed<maskedView._x) {
if (scrollFace._x<=left) {
scrollFace._x = left;
} else {
scrollFace._x -= speed/moveVal;
}
contentMain._x += speed;
} else {
scrollFace._x = left;
contentMain._x = maskedView._x;
delete this.onEnterFrame;
}
};
};
btnUp.onDragOut = function() {
delete this.onEnterFrame;
};
btnUp.onRelease = function() {
delete this.onEnterFrame;
};
btnDown.onPress = function() {
this.onEnterFrame = function() {
if (contentMain._x-speed>finalContentPos) {
if (scrollFace._x>=right) {
scrollFace._x = right;
} else {
scrollFace._x += speed/moveVal;
}
contentMain._x -= speed;
} else {
scrollFace._x = right;
contentMain._x = finalContentPos;
delete this.onEnterFrame;
}
};
};
btnDown.onRelease = function() {
delete this.onEnterFrame;
};
btnDown.onDragOut = function() {
delete this.onEnterFrame;
};
if (contentHeight<maskHeight) {
scrollFace._visible = false;
btnUp.enabled = false;
btnDown.enabled = false;
} else {
scrollFace._visible = true;
btnUp.enabled = true;
btnDown.enabled = true;
}
};
scrolling();
Any ideas?
Thanks,
Dave
Image And Text Scroller?
Guys i need help creating a scroller with images and text in it....i want it to ease also...if anyone would have a good tutorial/script/ or advice...i'd deeply appreciate it...thanx..
Can I Load Multiple Text Files Into Scroller?
Hi...is it possible to load multiple text files into a single text scroller?
I am using MX and I have a main swf movie that I am loading my link swf's into. On all my link swf's I have buttons that will control the info on those swf's. For each button (3 on each link swf's) I want to have a scrolling text box for the info. Which means I need 3 scrolling text boxes for each of my link swf's.
Is there a way to use 1 scrolling text box and just load the text for each as each button on my link swf's is pressed?
Flash Scroller Wit Text And Image
take a look at this site http://www.norwaysays.no/main.html
there is a sweet scroller.very trendy.
is hard to make a similar?
any tutorials?
great forum!
Flash Scroller Wit Text And Image
take a look at this site http://www.norwaysays.no/main.html
there is a sweet scroller.very trendy.
is hard to make a similar?
any tutorials?
great forum!
Image And Text Scroller Problem
Hello all !!!
I have a text and picture scroller that i'm using in a website i am making. (i didn't make the scroller, i downloaded it from a tutorial ages ago).
When i use the scroller on the main timeline, it works, but if i put it in a MC then i doesn't work any more. I can't seem to find the solution... If anyone could help.
SCROLLER HERE
External Text Scroller..
.. i am wokring with this .fla i downloaded..
http://www.flashkit.com/movies/Scrip...09/index.shtml
i understand and it is easy to work wtih this file if i just want standard text. How can I edit the text. I want bold text and larger text. I have no idea how to do this in a .txt file though.
i tried putting HTML in the .txt file so that when flash reads it, it does what i told it to. it doesnt though and i get a blank dynamic text box.
if you guys could help, id would be greatly appreciated!!
thanks
dan
Text/image Scroller Is Acting Weird
Check this out:
http://www.gradlaunchusa.com/flash.html
Click "services" or "calendar" on the top navigation, then go to the page that loads up. If you click the scroll box (not the up/down arrow) it will follow your mouse around. I want it to release when the mouse button is released...any idea how to do this?
Here's a source file from one of the pages, maybe something is wrong in the script....I'm not sure what to change.
Any help is appreciated.
Help With External Dynamic Text And Scroller
can anyone help me ?
here is my situation.
my client wants an external .txt file that he can update himself,
the problem i'm having is that the external file wont load into a mc with a scroll bar? it only works without a scroll bar...
any help would be great thanks!!!
~Zain
find_zain@hotmail.com
External Text Loaded Into Scroller - Xml
Im loading an xml file into a scrollable text box using this script:
xmlLoad("cv.xml");
function xmlLoad(newXml){
menuXML = new XML ();
menuXML.load(newXml);
menuXML.ignoreWhite = true;
menuXML.onLoad = parseThisXml;
}
function parseThisXml(){
scroller.target = textField;
textField.background = true;
textField.backgroundColor = 0xFFFFFF;
textField.html=true;
textField.htmlText=this.firstChild;
}
function loadTextbox(newText){
loadVarsText = new loadVars();
loadVarsText.load(newText);
loadVarsText.onLoad = function(success) {
if (success) {
textField.html = true;
textField.htmlText = this.fieldContents;
textField.background = true;
textField.backgroundColor = 0xF7BDDE;
}else{
textField.htmlText = "Text not loaded!";
}
}
******MY PROBLEM IS that when i put it on the main timeline it works fine. But if i put this into a movieclip on my timeline, then it cannot find the xml file to load.
How do i fix this?
Automatic External Text Scroller
anyone know how to create an automatic text scroller that loads its text from an external txt file? exactly like the one found
here "http://www.amarasoftware.com/flash-news-ticker.htm"
The closest ive come is a text box in flash that pulls its content from an ext txt and that movie clip is tweened to move upward, and then loop itself. the problem with this is that the text box that loads the external data is a fixed height, if i added more text to the ext file then it will not all fit in to the flash txt box.
thanks
Text Scroller Through External Source
This is my first time on a forum. I hope I'm doing this right. If not, please forgive me.
I'm relatively new to flash and the knowledge I do have is due to this site. I would like to make a special thanks to Kirupa for all the information that he is provided.
I'm trying to create a text scroller using an external text file into my flash project. I would like to be able to bold and underline the text in the source file. Such as <b>Hi Dan</b> the current tutorials that I've tried give the ability to bring plain text in. Is there something that can be added to those tutorials to give me the ability to bold, underline and create links?
Loading New Text Into The Same Scroller
How would I go about loading new text into a text field that would use the same scroller? I have the scroller all set up and the dynamic text field currently loads the text from a text file. i want to load new text from a different text file when a button is clicked. Any help would be really appreciated.
Scroller Doesn't Work For Image In Dynamic Text
What I have here is a dynamic text with a scroller. It worked great for texts, html anchors, etc. But when I put in the <img> then the scroller doesn't work... Does anyone know why or know how can I make it work?
Thanks....
Hard External Text Scroller Question
Originally, I had a friend help me on this scroller and it worked with my previous externally loaded text file. But now, that I have changed the text in the text file, the dragger does not scroll all the way down the track. The scroller works fine when several more lines are added, but that is besides the point.
Still interested?? Read on...
My other problem is that the text in the text file is in spanish and I can not get the accent marks and other spanish characters to display. A word that contains an accent is cut off but the rest of the sentence, as long as there is not another word with an accent in it, displays fine.
Please help me out with this. I really need some help on this! I'm sure it will prove challenging! Thanks a lot in advance!
Dynamic Text Scroller As External Swf...won't Scroll...
I have a dynamic text scroller as an swf that i'm trying to use as an external swf in my main movie....it works fine on it's own, but when i use it as an external swf..the text shows up in the main movie and the scroller moves up and down, but the text doesn't actually move..i'll attach an example of the scroller so you know what kind of actionscript i'm using.....cheers for any help...
External Text Loader And Scroller In Flash 5
Hi ,
im trying to create an external text loader into my movie clip and bein able to scroll it,
Anyone can point me to somewhere easy? i searched the net and still im not satisfied. i got something who works on the maintimeline with variables but cant manage to make it load in my movie clip !
Help plz !
thx alot in advance !
External HTML Source For Text Scroller ?
Hiya,
I have been recreating the example of Kirupa's "Text Scroller with external Source".
It works very nucely.
I would like to know if I can extend this to take it's data from an external HTML source so I can add http links and email tags?
Can this be done?
Tanx
bmak
External HTML Source For Text Scroller ?
Hiya,
I have been recreating the example of Kirupa's "Text Scroller with external Source".
It works very nucely.
I would like to know if I can extend this to take it's data from an external HTML source so I can add http links and email tags?
Can this be done?
Tanx
bmak
Loading Text Into Scroller From Txt. File?
I am loading text. into my scroller form a txt. file and want to know how to go about changing the font. here is the deal, I have a projest I am working on, and the companies name contains an "e" with the accent over the letter. in my program, that I am writing the text. file in (textedit), in mac osx, it shows up fine and dandy, when I test the movie in flash, the place where the "e", with the accent over them show up with a less than or grater than sign under them. I have tried changing the font, in text editor, but no luck.
IS THEIR ANYWAY POSSIBLE TO DO SOMETHING ABOUT THIS PROB?
----------------------------------------------------------------------------------------------------
thank you, so much if you can help me at all...as I am pressed for time. Best Regards.
g.g.
Loading Text Into Scroller From Txt. File?
I am loading text. into my scroller form a txt. file and want to know how to go about changing the font. here is the deal, I have a projest I am working on, and the companies name contains an "e" with the accent over the letter. in my program, that I am writing the text. file in (textedit), in mac osx, it shows up fine and dandy, when I test the movie in flash, the place where the "e", with the accent over them show up with a less than or grater than sign under them. I have tried changing the font, in text editor, but no luck.
IS THEIR ANYWAY POSSIBLE TO DO SOMETHING ABOUT THIS PROB?
----------------------------------------------------------------------------------------------------
thank you, so much if you can help me at all...as I am pressed for time. Best Regards.
g.g.
Loading Text Into A Dynamic Scroller
another dynamic scroller question
is there a way to load text that was created in word into a dynamic scroller or can you only use notepad.
also what would the script be to load the text into the script
Loading Dyamic Text In A Scroller
Ok I have dynamic text loading from an external source, into a scroller. Now I want set links inside that scoller. How do i do so?
thanks
Problem WithExternal Swf +external Text +component Scroller
Ok, this is my problem:
I would like to do a gallery with loaded external swf`s. On the main movie there is already prepared textfield and the component scroller. There is also a button which is suppose to load the external
swf. The external swf contains of everal frames with jpgs or whatever, each jpg require a long description which has to be loaded to the textfield on main page.
Im trying to load the variables to the main movie, by puting the following code to the external swf :
--------------------------------------------
loadVarsText = new LoadVars();
loadVarsText.load("text.txt");
loadVarsText.onLoad = function(success) {
if (success) {
my_textfield.html = true;
my_textfield.htmlText = project; //I reckon, here I should put the destination//
} else {
trace("not loaded");
}
};
-----------------------------------------------------
In the attachment there is a clear example.
Please help, i really have to finish whole thing by friday, and i can`t go any further!
Thanx in advance
Slo.
Loaded Movie >need To Load External Text Into Scroller
Ok site.swf loads a news.swf on click, the test.txt is loaded into news.swf (scrolling text) However when I play the news.swf by itself, the text loads fine. When I play it all together, the text does not load. Here is the code in site.swf to load the swf into a movie clip (instance name.... loaded)
on (release) {
loadMovie("news.swf", "loaded");
}
Script from the news.swf to load the external text file.
loadVarsText = new loadVars();
loadVarsText.load("test.txt");
// assign a function which fires when the data is loaded:
loadVarsText.onLoad = function(success) {
if (success) {
trace("done loading");
// Now that we know the data is loaded,
// it sets the text content of the Text Field
// with the instance name "scroller" equal to the
// contents of the variable
scroller.text = this.var1;
} else {
trace("not loaded");
}
};
Can someone please help me out? I posted in FLASH MX but figured this was more suitable for actionscripting. Im getting lil restless with this thing.
Editing Kirupa's External Text Loader&Scroller ?...
Hi,
i have followed the tutorial on how to load external text and scroll it inside the text area.
i wanna know how can i use this if its not in my main timeline, if its inside a Mc ?
loadVariablesNum("./text.txt", 0);
How can i tell it to load in my Mc ?
thx alot in advance !
External File Scroller - Links, Text And Images
Hello all!
Quick question. I want to dynamically load an html document within a scroller.
I want to include hyperlinks as well. I have some crude action script written which works until I nest it. Is their some source out there to accomplish this? The problem I've had is when the code I'm using is referenced within the timeline but it is nested a below the top.
I have two scenes escena 1 and escena nested. It works in the first and not in the other.
Please let me know if someone can help me take this the rest of the way.
Thanks!
-D-light
Loading An Ext Swf +text Variables+component Scroller
Ok, this is my problem:
I would like to do a gallery with loaded external swf`s. On the main movie there is already prepared text field and the component scroller. There is also a button which suppose to load the external
swf. The external swf contains several frames with jpgs or whatever, each jpg require a long description which has to be loaded to the textfield on main page.
Im trying to load the variables to the main movie, by puting the following code to the external swf :
--------------------------------------------
loadVarsText = new LoadVars();
loadVarsText.load("text.txt");
loadVarsText.onLoad = function(success) {
if (success) {
my_textfield.html = true;
my_textfield.htmlText = project; //I reckon, here I should put the destination//
} else {
trace("not loaded");
}
};
-----------------------------------------------------
In the attachment there is a clear example.
Please help, i really have to finish whole thing by friday, and i can`t go any further!
Thanx in advance
Slo.
Easing Scroller Dynamically Loading Text And Pics
I've seen how to load only text into a text scroller dynamically, and I've also seen Claudios version of an easing scroller with text and graphics yet it doesn't load externally.
Any way to make a scroller that'll load text and graphics with easing externally? Like using xml or something. Anyone know of any examples around? I'd just like to have a scroller that I could update regularly with text and graphics without having to go into flash all the time.
Loading Dynamic Text In Easing Scroller - Problem
sorry for the double post, i posted the message in the wrong section ... QUESTION: i downloaded one of the easing scrolls from the kirupa forum and i need some help on how to load dynamic text into the scrollbar. can anyone give me some ideas on how the script would be modified. i tried to modify the xml with the scroll but by screen turns black and the text/scrollbar don’t work. appreaciate any help. I attached the file here what i downloaded.
Code:
THIS CODE IS IN THE AS FILE
import mx.utils.Delegate;
class Rolagem {
// VARIABLES
// ---
// MCs to be used
private var btnUp:MovieClip;
private var btnDown:MovieClip;
private var dragger:MovieClip;
private var scrollbg:MovieClip;
private var contentMain:MovieClip;
private var contentMask:MovieClip;
// Settings variables
private var moveSpeed:Number = 1;
private var easingSpeed:Number = 7;
private var scrollWheelSpeed:Number = 20;
// General use variables
private var mouseListener:Object;
private var left:Number;
private var top:Number;
private var right:Number;
private var bottom:Number;
private var scrollable:Number;
private var initContentPos:Number;
private var scrollHeight:Number;
private var easing:Number;
// CONSTRUCTOR
// ---
public function Rolagem(easing:Number, btnUp:MovieClip, btnDown:MovieClip, dragger:MovieClip, scrollbg:MovieClip, contentMain:MovieClip, contentMask:MovieClip) {
this.btnUp = btnUp;
this.btnDown = btnDown;
this.dragger = dragger;
this.scrollbg = scrollbg;
this.contentMain = contentMain;
this.contentMask = contentMask;
this.easing = easing;
this.scrollHeight = this.scrollbg._height;
// how much of the movie can be scrolled
this.scrollable = this.contentMain._height - this.contentMask._height;
this.initContentPos = this.contentMain._y;
// the drag positions that are possible for the dragger
this.left = this.scrollbg._x;
this.top = this.scrollbg._y;
this.right = this.scrollbg._x;
this.bottom = this.scrollbg._height - this.dragger._height + this.scrollbg._y;
this.contentMain.setMask(this.contentMask);
// before we do anything make sure the content is even scrollable, if it isn't hide everything and return
if (this.scrollable < 0) {
this.dragger._visible = false;
this.btnUp.enabled = false;
this.btnUp._alpha = 50;
this.btnDown._alpha = 50;
this.scrollbg._alpha = 50;
this.btnDown.enabled = false;
return;
}
this.scrollbg.useHandCursor = this.dragger.useHandCursor = false;
this.scrollbg.onPress = Delegate.create(this, scrollPress);
this.dragger.onPress = Delegate.create(this, dragPress);
this.dragger.onMouseUp = Delegate.create(this, dragMouseUp);
this.btnUp.onPress = Delegate.create(this, btnUpPress);
this.btnUp.onDragOut =
this.btnUp.onRelease = Delegate.create(this, btnUpDeleteEnterFrame); //Delegate.create(this, btnUpDragOut);
this.btnDown.onPress = Delegate.create(this, btnDownPress);
this.btnDown.onDragOut =
this.btnDown.onRelease = Delegate.create(this, btnDownDeleteEnterFrame); //Delegate.create(this, btnDownDragOut);
this.contentMain.onEnterFrame = Delegate.create(this, contentEnterFrame);
// Registering the listener
this.mouseListener = new Object();
Mouse.addListener(this.mouseListener);
this.mouseListener.onMouseWheel = Delegate.create(this, mouseWheel);
updateContentPos();
}
// onEnterFrame of the content
private function contentEnterFrame():Void {
if (!this.easing || this.easing == undefined) {
this.contentMain._y = this.contentMain.newY;
} else {
this.contentMain._y += Math.round((this.contentMain.newY - this.contentMain._y) / this.easingSpeed);
}
}
// Updates the contents position
private function updateContentPos():Void {
var percent_scrolled:Number = (this.dragger._y - this.top) / (this.scrollHeight - this.dragger._height);
// instead of setting the _y property directly, we simple set newY
// that way we can adjust how we handle the new Y coordinate we'd like to move to
this.contentMain.newY = Math.round(this.initContentPos - (percent_scrolled * this.scrollable));
}
// Dragger actions
private function dragPress():Void {
startDrag(this.dragger, false, this.left, this.top, this.right, this.bottom);
this.dragger.onMouseMove = Delegate.create(this, dragMouseMove);
}
private function dragMouseMove():Void {
updateContentPos();
updateAfterEvent();
}
private function dragMouseUp():Void {
this.dragger.stopDrag();
delete this.dragger.onMouseMove;
}
// Background of the Dragger actions
private function scrollPress():Void {
if (this.scrollbg._parent._ymouse > this.scrollbg._y + this.scrollbg._height - this.dragger._height) {
this.dragger._y = this.scrollbg._parent._ymouse;
this.dragger._y = this.scrollbg._y + this.scrollbg._height - this.dragger._height;
} else {
this.dragger._y = this.scrollbg._parent._ymouse;
}
updateContentPos();
}
// Up Arrow actions
private function btnUpPress():Void {
this.btnUp.onEnterFrame = Delegate.create(this, btnUpEnterFrame);
}
private function btnUpEnterFrame():Void {
this.dragger._y = Math.max(this.top, this.dragger._y - this.moveSpeed);
updateContentPos();
}
private function btnUpDeleteEnterFrame():Void {
delete this.btnUp.onEnterFrame;
}
// Down Arrow actions
private function btnDownPress():Void {
this.btnDown.onEnterFrame = Delegate.create(this, btnDownEnterFrame);
}
private function btnDownEnterFrame():Void {
this.dragger._y = Math.min(this.bottom, this.dragger._y + this.moveSpeed);
updateContentPos();
}
private function btnDownDeleteEnterFrame():Void {
delete this.btnDown.onEnterFrame;
}
// Mouse Wheel
private function mouseWheel(delta:Number):Void {
var d:Number;
if (delta > 1)
delta = 1;
if (delta < -1)
delta = -1;
d = -delta * this.scrollWheelSpeed;
trace(d);
if (d > 0)
this.dragger._y = Math.min(this.bottom, this.dragger._y + d);
if (d < 0)
this.dragger._y = Math.max(this.top, this.dragger._y + d);
updateContentPos();
}
}
Code:
THIS CODE IS IN THE FLA
var rolagem:Rolagem = new Rolagem(10, mc_sobe, mc_desce, mc_rolagem, bg_rolagem, mc_conteudo, mc_mascara);
Problem Adding Custom Scroller Button On External Loaded Text (help)
Hello,
I have been following all the wonderful tutorials in this forum to learn about AS and flash.
This time I tried to combine 2 tutorials and make a text field with external loaded text and custom scroller button, but I failed.....
I tried to look for different tutorials to find the answer, but It didn't work out either...
So If anyone can spare a min to look at the file, please help !!!
Thanks
Getata
problem_scroller.zip
Xml Scroller -- Loading Swf Files
hello,
i am trying to use xml scroller to load 2 swf files inside of empty movie clips that are placed on the main stage of the main movie.
so each menu item of the xml scroller would load 2 swf files, on click.
my xml has no ability to do so -- can open url and go to Frame.
anybody knows how to alter the script?any help appreciated.
1. Setting the menu to open url
In the xml file set the behaviour to "1". Then on each item put the url string in the "data" attribute, and the target window string in the "param" attribute.
<behaviour value="1" />
<item label="Item label" data="http://google.ro/" param="_blank" />
2. Setting the menu to trigger gotoAndStop in a certain movie clip
In the xml file set the behaviour to "2". Then on each item put the frame number/label in the "data" attribute, and the movieclip path in the "param" attribute.
<behaviour value="2" />
<item label="Item label" data="3" param="_root.my_mc" />
This is equvalent to: _root.my_mc.gotoAndStop(3);
or
<item label="Item label" data="services" param="_root.my_mc" />
This is equvalent to: _root.my_mc.gotoAndStop("services");
TEXT CHANGING, When I Copy And Paste Text Scroller, And Add New Text......?
here's the problem:
I have a text scroller I took from a fla. file on here.
on my site, I wanted to just change the text. in the text scroller, and
place it in diffrent sections of my site a number of times with diffrent text.
I do not have a problem, copying and pasting the scroller.
But when I change the text from one section, to the next, it will make all the text the same.
If I copy the scroller and paste it somewhere else, swap the text it will change all to that last text I entered.
I tried, typing one section's text. Then copy/pasting the scroller, and putting new text, and converting that text to a symbol (graphic). Hoping it would work but had no LUCK.
This is huge and i need help, considering I am a newbie, there has got to be away this can be accomplished so I dont have to build seperate text holders/scroller, for all 15 sections of my site.
Let me know..and thank you all so much.
How Do I Load External Html Files Into A Textbox With A Scroller?
how do I load external html files into a textbox with a scroller?
I use this code on a button to load textfiles but how do I load html files?
on (release) {
scroll2._visible = (maintext.maxscroll>0);
maintext.load = "news.txt";
maintext.htmlText = myLoadVar2.news;
}
Thank u
How Do I Load External Html Files Into A Textbox With A Scroller?
how do I load external html files into a textbox with a scroller?
I use this code on a button to load textfiles but how do I load html files?
on (release) {
scroll2._visible = (maintext.maxscroll>0);
maintext.load = "news.txt";
maintext.htmlText = myLoadVar2.news;
}
Thank u
|