ActionScript 3.0 :: Vertical News Scroller - Fade Out When Text Reaches At End
Jul 13, 2009
I'm creating a vertical news scroller, that will eventually load in from an external text file and then just scroll the text in a movie clip vertically. I have this working but I have a couple of questions.
1. As the text reaches the end of the scroll I want it to start to fade out, I've added a IF statement to do this but it doesn't seem to fire. Why is this?
2. Even though I don't have any easing the scroll seems to slow down as its nearing the end of the animation, do you know why this is happening?
Code:
import gs.TweenLite;
import gs.easing.*;
var myTimer:Timer = new Timer(0,1);
myTimer.addEventListener(TimerEvent.TIMER, scrollNow);
myTimer.start();
[Code] .....
I have this news scroller for work - Vertical member (160 X 600) And the idea is that it has 3 text fields (Headlines). These fields are lined up vertically (one at the top of the scroller, one at the middle, and one at the bottom.). I load them dynamically from XML, and after about 5 seconds, I have them all move up. (the top one goes up the top, and comes back from the bottom, the other two move up). The problem is that I am trying to center justify them. When they're loaded I can center justify them, using this code:
Code: MovieClip.prototype.centerFunction = function() { format = new TextFormat(); format.align = "center"; _root.news2.headline2_txt.setTextFormat(format); _root.news3.headline3_txt.setTextFormat(format); _root.news1.headline1_txt.setTextFormat(format); }
Now, when they are first center justified by the code, they look slightly off, and once they move they arrange themselves correctly.
I've got a news-style scroller that has audio clips and text loaded in via an XML file. The text works fine and I can read the string of the mp3 file to play, but if I actually hit play, it only plays the LAST listed mp3 in the array instead of the one that should be playing.
What's happening is when you click the play button, it only plays the last song named in the XML file, and doesn't link to the correct url, but all the text is in the correct places.
got stuck trying to design an automatic vertical text scroller. Here is what I set out to do:
- Have a news ticker like box through which text will be vertically scrolling.
- The textual content will come from an external text file.
- The text in the external file will also have click-able html links.
- When the mouse enters the content area, the scrolling would stop.
- If any link is visible in the content area at that time, the user will be able to click on it.
- When the mouse leaves the content area, the scrolling would continue.
Basically, it's an html marquee which you see in so many pages these days.
The following was my approach to solving the problem. Got very close and then got stuck
- I created a Dynamic Textbox and have it load from the external file. The dynamic textbox has multiline and autoSize set to true. So the size of it grows depending on the content from the external file.
- Next, converted the "textbox with external loading" into a movie clip and named it content_mc.
- Created a rounded rectangle (my viewing area) and converted that to a movie clip called mask_mc.
- On the stage, the content_mc is in one layer (content) and the mask_mc is in another layer (mask).
- Added another layer (action) and on the first frame of the main timeline, I entered the Action Script to set the mask_mc as the mask for content_mc.
- Also in this AS, I align the content_mc top with the mask_mc top so that the content is visible at the start.Then in the content layer, I inserted a movie clip "controller". This clip has two frames and all it does is it moves the _root.content_mc up by a fixed unit until the bottom of content_mc is over the mask_mc top. At that point, it sets the top of the content_mc back to the top of mask_mc.
Since I have little to no flash training, you can understand my excitement when the above steps worked and I got a fairly smooth scrolling text fitted in my viwing window. I could also click on all the links in my text. Yayyy!Then I took on the task of making the scroll stop and resume on mouse enter and leave event. What I did was:
- In the action script on the action layer, I simply defined two content_mc.onRollOver and content_mc.onRollOut functions. In the first I stop the controller movie clip and in the second, I play the controller movie clip.
The above strategy also worked as I wanted but it created a new problem! Whenever the mouse enters the mask area, the mouse pointer turns into a clicking hand cursor (the one you use to click on links); and it doesn't allow me to click on any of the html links anymore! It's almost as if the content_mc movie clip has turned into a button!
Regardless to say, this is unacceptable in my case if I cannot click on the html links in the original text content. I have googled quite a bit and must admit that I haven't had much luck (why else would I be posting here and other places?). I desperately need someone's assistance with solving this. Some of the approaches I have seen on google wouldn't work for me. For example, having invisible buttons for the html links. Of course that wouldn't work since my text is coming from an external text file over which I have no control.
I need help related to kirupa's News Ticker Tutorial. I want the text to be fade in like it's fade out. Currently the text does not come with fade in effect. You can see the news ticker here: [URL]
I am trying to build a vertical slide scroller based on a tutorial for a horizontal slide scroller and am having difficulties undertanding what values I need to change in the code for the slider mc in order to make it work. The horizontal slider is quite smart [code]
I've tried for hours and days to make my vertical text content scroller working in a flash fake 3d environment with rotationX / Y. But because of vector>bitmap conversion when 3d roationing, the scroller fails to works. I know the stratDrag method fails to work in a 3d environment. other than using PV3D or so ? cause I don't know how to work with PV3D, it's just tooooo complicated to get it for me.
I would like to use it as a horizontal scroller for an image gallery. Just to clarify a horizontal dragger and a horizontal stage motion for image viewing.
fscommand("allowscale", "false"); bar.useHandCursor = dragger.useHandCursor=false; space = 20;
I am trying to build a vertical slide scroller based on a tutorial for a horizontal slide scroller and am having difficulties undertanding what values I need to change in the code for the slider mc in order to make it work. The horizontal slider is quite smart and there is additonal functionality attached to it to affect it's movement which I'm not too worried about although it would be nice)
Code: // set up content_mc info contentRight = _root.content_mc._x;
I found a script at on the web that emulates the news scroller found atI would like to add images to each news headline so it can replicate the effect found at
I am trying to create a news scroller such as the one on espn.com where you have a scrolling news component that can contain images and or videos and links to news stories stored in the database.
I am working on the news ticker module (AS2) where I have to fetch news from xml and populate that news headings into four text fields and these 4 headings will stay for a while and fade until last record. this process will continue.
I am looking to create a horizontal news scroller. In fact I once found one on the web but failed to bookmark it now I can't find it again. I have attached an image of what it needs to look like. It will load text from an external source and have links to the full news story.
I have been working on a dynamic loading news ticker for a site and have been running into two separate problems:
The first, creating a movie clip, inserting the following code: var myTextLoader:URLLoader = new URLLoader(); var myTextField_txt:TextField = new TextField(); myTextField_txt.wordWrap = true; myTextField_txt.autoSize=TextFieldAutoSize.LEFT; [Code] .....
And having the clip load the text from the text file listed. In this version, everything is working fine except I don't have the ability to change the font, size, and color of the text using only flash and the text document, (to my understanding).
The second, creating two .fla files, one with the embedded font I want to display named font.fla, and the other blank named fontloader.fla. Also create an .as file in the folder with the following code: package { import flash.display.Loader; import flash.display.MovieClip; import flash.events.Event; import flash.net.URLRequest; [Code] .....
In this second scenario, the problem is that I can't figure out a way to make the dynamic text scroll vertically and loop, (Was trying to figure out a way to save the fontloader.fla as a movie clip, then importing it into a new .fla and just using a motion tween on the clip, but so far I'm confused by it). This second scenario is also not my first choice, because loading the text straight from a text file would make the news section very easy to update for those who don't have any design experience.
Alright, I've done the XML Photo Gallery Tut and am attempting to make the thumbnails scroll up and down instead of left and right. Apparently it's not as easy as switching X and Y. The tutorial is located a
I'm making a flash site with width 1024 and heidht 768px. But on some monitors it doesn't show all the flash. It's cut from the bottom. how do i show all of the content. I'm using this template: [URL]
I want to add vertical scroll for those who can't see all the flash. How do i do that?!
I am attempting to modify an example file that I found from a vertical to horizontal scroller. I changed the movie clip to horizontal, what I need to change to get the arrows to scroll the movie clip horizontally.
I'm attempting to switch the scroller I found on here from vertical to horizontal.
I got the movie clip to movie from left to right, but it doesn't seem to recognize how long the movie clip is now, because it stops before the whole movie clip is scrolled....see attached...
I want to make the scroller vertical for this very impressive XML: [URL]. I've been trying and have been getting somewhat close to accomplishing this but I feel like I'm hacking up the code to get there.
Code: // EXAMPLE CREATED BY GENESIS F5 (www.flashkit.com) stageheight = Stage.height / 2; overhangy = ((stageheight * 2) - image._height) / 2;
[code]...
Basically, my problem is that i've got 15 buttons labeled Channel 1 to Channel 15, but when the page first loads up, it skips down showing the very last button at the bottom, rather than the very first button at the top. The top button is off the screen.
I have a <s:Scroller> surrounding a <s:Group>. The scroller works, but I want to increase the vertical step size on the scroller. I've tried everything, but am having no success. Modifying the scroller.verticalScrollBar.stepSize value in the init function seems logical; however, this approach fails.
I know that this has almost certainly been asked before, I know because every quarter at least one of my students brings in this site.[URL] My question is how I would go about making a parallax type scroller like this that works vertically and horizontally from the mouse position, and works with many more levels than this (like 20+ levels).
getting a vertical and horizontal thumbnail scroller to work at the same time, based off of the xml photo gallery tutorial here on kirupa. I'm using FMX04 and I can get one or the other to work but not at the same time. Once I can get them both to work at the same time I would like to make the vertical set load a different set up thumbnails,I know it will involve editting the xml and hence adding to the xml loading into flash but I'm unclear on that also... on another note, is there an easy way to make the image holder resize to the image, so as to accommodate both vertical and horizontal images without skewing them?
Here's my code (as) so far...
Code: // start of horizontal code function loadXMLh(loaded) { if (loaded) {
my problem is that if you go over the menu text above my scroller it controls the scroller. I wan this areas movement to have no effect on the scroller below. is there a way to script my scroller to set it to this?
i found i can get vertical dynamic text block by setting to vertical and then to dynamic. But, then it ends up being horizontal, and if inside a clip, only the letters over another item in clip show. Like veritcal text on a vertical bar gives only the 1 or 2 letters that fit across bar, rest truncated. i've tried embedding text to get this far, but still doesn't work 'all the way' i see online they talk about all scripting for dynamic, vertical text; is that necessary, or am i missing something??