news ticker

Scrolling in Flash

Monday, April 5th, 2010

I have been getting a lot of questions for a good way of scrolling in Flash. So I thought I would let you know about the Scroll Flash Tutorial I made on how to do that. It gives you the code and the explains  basic functionality.  But if you don’t know anything about programming, I also created a simple Auto Scroll Flash file or in other words a Flash Text Ticker / Text Scroller file.  It’s completely customizable by XML so you don’t even have to know Flash to use it and it super easy to add to any website. You can change the font size, color, link color, background color, and add multiple lines of text if you want, and you can even setup a timer to display each text line item. If you buy it, there is also a help file that will give you a step by step process on how to edit the XML file and add the Flash scroller to your webpage.  To see a few examples of this file in action, click the example  image below.

If you guys have any more specific questions about scrolling in Flash,  just let me know by sending me an email through my contact page or leaving a comment.

Cya

Workaround Solution to Flash Error #2044, Unhandled SecurityError, and Error #2048, Security Sandbox Violation

Friday, February 26th, 2010

I sell Flash components on ActiveDen, and while working with a client on my Flash News Ticker we ran into the infamous “Error #2044: Unhandled securityError:. text=Error #2048: Security sandbox violation” when trying to gather information from an external RSS Feed.

This error occurs when your flash file is trying to get data from a different domain and it can’t because of security reasons on their server. The usual fix for this is to create a crossdomain.xml file that allows access from other websites to use the data on yours, but the problem with that is if you don’t host that site you want the data from then how could you create or update the crossdomain.xml file on their server.

I did find a work around for it though! Not sure if its “the right way to do it” but it does work.

Here is the solution, I copy that url of the feed I want the data from, go to my feedburner account and create a feedburner feed of the same feed. If you don’t know what feedburner is then you should definatly check it out. You basically can sign up for feedburner if you have a google account already. Anyway, after you get the feedburner feed of the data you want you can view it. Then if you want to see the xml version of the Feedburner Feed, you can just add  “?format=xml” onto the end of the url they give you, and this is the normal RSS 2.0 feed that we are wanting.

This is the data you want, because its not on the security problematic website. The next thing I ran into was getting the images to display in the news ticker as well. I kept getting the same error but if I dismissed the errors then they still worked. So I used a try-catch clause to get the error and throw it if it gets one. Here is an example of that code:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
function imageLoaded(e:Event):void {
	try {
                //make the image into a bitmap and smooth it
		var image:Bitmap = e.target.content as Bitmap;
		image.smoothing = true;
 
		//resizes the image
		e.target.content.width = 55;
		e.target.content.height = 35;
 
	} catch(error:Error) {
		trace("Error catch: " + error);
	}
}

This is called from an event listener when loading it in using a loader object, that looks like this:

imageLoader.contentLoaderInfo.addEventListener(Event.INIT, imageLoaded);

So basically it worked after this, and the images even showed up without showing the error. The only problem is that the images don’t get resized because they can’t be loaded into the swf memory. Here are the examples: the one on the left is the broken example, it can’t get the information it wants to so it just keeps trying to load it. The example on the right shows the fix. (You have to view them in IE so the error warnings appear, another thing to hate about IE. :/ )

Any thoughts or comments are encouraged,
Cya

Flash News Ticker / News Feed added to ActiveDen

Monday, November 30th, 2009

I have added another file to my ActiveDen Portfolio. It is a flash news feed / news ticker. You can display the latest news or porfolio posts from your Website or blog easily with this Flash File. No XML is required and no updating an external XML file. This Feed Reader automatically updates itself. Just change one line of code to your RSS url and your up and running. The file includes two designs:a black one and white one. Or You can customize the look and feel of it very easily by editing the symbols in the library. Some other features are: Simple Drag and drop, Automatic Text Scrolling on Long Headings, One click links, and it Automatically Grabs the first image in the post to display. It also supports most RSS Feeds including WordPress, FeedBurner, and Blogger. A preview is below.

newsreaderimage

Cya