Hi my self vijay.
i download your file and tryied in my computer it is showing eroor:
1046: Type was not found or was not a compile-time constant: TextField.
what should i do any solution do u have to help me out..................
thank u
FlepStudio has created a new free utility for Flash CS3-CS4.
This is a scroller RSS reader.
It reads any RSS feed, simply set the url of the feed.
The RSS parse is done with a PHP script by Last RSS.
Graphics easily configurable options and colors in the AS file.
Very useful for those who want to share the feeds on its website using Flash.
Included files:
- main.fla
- package org.FlepStudio: Main.as
- package caurina by Zeh Fernando
- file lastRSS.php created by Last RSS
- file rss.php
Options:
Code:/****** CHANGE ABSOLUTE URL THAT POINTS TO rss.php file ******/ private const PHP_PARSER_URL:String="http://flepstudio.org/utilita/RSSreader/rss.php"; /****** INSERT HERE THE URL OF THE FEED YOU WANT TO DISPLAY ******/ private const FEED_URL:String="http://feedproxy.google.com/FlashCs3AndFlashCs4Tutorials/"; /****** COLOR OPTIONS ******/ private const BACKGROUND_COLOR:uint=0x1F1F1F; private const BACKGROUND_HEADER_COLOR:uint=0x000000; private const HEADER_TITLE_TEXTCOLOR:uint=0xCCCCCC; private const ITEM_BACKGROUND_COLOR:uint=0x333333; private const ITEM_TITLE_COLOR:uint=0xFFFFFF; private const ITEM_READMORE_COLOR:uint=0x0066FF; private const ITEM_READMORE_ROLLOVER_COLOR:uint=0x00FFFF; /****** LINK OPTIONS ******/ private const PAGE_TARGET:String="_blank"; /****** SPEED OF TWEENS ( in seconds ) ******/ private const TWEENS_SPEED:Number=1;Installation:
- Upload the files rss.php and lastRSS.php on your domain server
- Open main.fla e org/FlepStudio/Main.as and insert the url that points to rss.php ( PHP_PARSER_URL ) at line 19
- Open main.fla and org/FlepStudio/Main.as and insert the url of the feed you want to display at line 22
- Set colors other options
- Re-create main.swf from main.fla
- Upload main.swf
Source files:
Last edited by Flep; 02-12-08 at 18:36.
Hi my self vijay.
i download your file and tryied in my computer it is showing eroor:
1046: Type was not found or was not a compile-time constant: TextField.
what should i do any solution do u have to help me out..................
thank u
Hi,
open Main.as and add the following import:
Code:import flash.text.*;
hi
thx for ur help its done.....................
Does it have the ability to auto scroll?
Hi there,
I can't seem to get this working.
getting the following error
Error #1009: Cannot access a property or method of a null object reference.
at org.FlepStudio::Main/onComplete()
at flash.events::EventDispatcher/dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at flash.net::URLLoader/onComplete()
on uploading the blank main.swf box comes up then just takes ages transferring data from site... but then nothing happens.
have i done something daft?
x
hi trinlico,
I think i can help u...........
I think u have dint put the correct address of ABSOLUTE URL THAT POINTS TO rss.php file.
so put the correct path and try again.......
I think that i help u out....
bye.
Hi I keep getting this error message 1198: Attributes are not allowed on package definition? Any ideas as to solve the problem?
Thanks in advance
Henrik
Auto scroll, change Main.as with the following code:
Code:/* ************************************* * Feeds Reader * © Author: http://flepstudio.org * version 1.0 ************************************* */ package org.FlepStudio { import flash.display.*; import flash.events.*; import flash.net.*; import flash.ui.*; import caurina.transitions.Tweener; public class Main extends MovieClip { /****** CHANGE ABSOLUTE URL THAT POINTS TO rss.php file ******/ private const PHP_PARSER_URL:String="http://flepstudio.org/utilita/RSSreader/rss.php"; /****** INSERT HERE THE URL OF THE FEED YOU WANT TO DISPLAY ******/ private const FEED_URL:String="http://feedproxy.google.com/FlashCs3AndFlashCs4Tutorials/"; /****** COLOR OPTIONS ******/ private const BACKGROUND_COLOR:uint=0x1F1F1F; private const BACKGROUND_HEADER_COLOR:uint=0x000000; private const HEADER_TITLE_TEXTCOLOR:uint=0xCCCCCC; private const ITEM_BACKGROUND_COLOR:uint=0x333333; private const ITEM_TITLE_COLOR:uint=0xFFFFFF; private const ITEM_READMORE_COLOR:uint=0x0066FF; private const ITEM_READMORE_ROLLOVER_COLOR:uint=0x00FFFF; /****** LINK OPTIONS ******/ private const PAGE_TARGET:String="_blank"; /****** SPEED OF TWEENS ( in seconds ) ******/ private const TWEENS_SPEED:Number=1; private var SPEED:Number=1; // OTHER PROPERTIES DO NOT TOUCH THEM UNLESS YOU KNOW WHAT YOU ARE DOING private var title_obj:Object=new Object(); private var titles_array:Array=new Array(); private var links_array:Array=new Array(); private var items_array:Array=new Array(); private var wheel_mc:Wheel; private var items_container_mc:MovieClip; // CONSTRUCTOR public function Main() { addEventListener(Event.ADDED_TO_STAGE,init); } // start the application private function init(evt:Event):void { removeEventListener(Event.ADDED_TO_STAGE,init); stage.frameRate=31; hideMenu(); fixBackgroundAndColors(); showPreloader(); createHolder(); loadXML(); } // fix colors and background's size private function fixBackgroundAndColors():void { wheel_mc=new Wheel(); bg_mc.width=stage.stageWidth; bg_mc.height=stage.stageHeight; Tweener.addTween(bg_mc,{_color:BACKGROUND_COLOR,time:TWEENS_SPEED,transition:"regular"}); Tweener.addTween(header_mc.bg_mc,{_color:BACKGROUND_HEADER_COLOR,time:TWEENS_SPEED,transition:"regular"}); Tweener.addTween(header_mc.title_mc,{_color:HEADER_TITLE_TEXTCOLOR,time:TWEENS_SPEED,transition:"regular"}); } // show the wheel preloader private function showPreloader():void { wheel_mc.width=wheel_mc.height=30; wheel_mc.x=stage.stageWidth/2-wheel_mc.width/2; wheel_mc.y=(stage.stageHeight-header_mc.height)/2-wheel_mc.height/2+header_mc.height; addChild(wheel_mc); } // remove the wheel preloader private function hidePreloader():void { wheel_mc.stop(); Tweener.addTween(wheel_mc,{alpha:0,time:TWEENS_SPEED,transition:"regular",onComplete:removeMe}); function removeMe():void { removeChild(wheel_mc); } } // create the items MovieClip container private function createHolder():void { items_container_mc=new MovieClip(); items_container_mc.y=50; addChild(items_container_mc); swapChildren(header_mc,items_container_mc); } // calling PHP parser private function loadXML():void { var request:URLRequest=new URLRequest(PHP_PARSER_URL); var variables:URLVariables=new URLVariables(); variables.feed_url=FEED_URL; request.method=URLRequestMethod.POST; request.data=variables; var loader:URLLoader=new URLLoader(); loader.dataFormat=URLLoaderDataFormat.VARIABLES; loader.addEventListener(Event.COMPLETE,onComplete); loader.load(request); } // PHP returns private function onComplete(evt:Event):void { var vars:URLVariables=new URLVariables(evt.target.data); var titles:String=vars.titles; var links:String=vars.links; title_obj.title=vars.title; title_obj.link=vars.link; titles_array=titles.split(","); links_array=links.split(","); hidePreloader(); initHeaderText(); createItems(); addMovement(); } // assign text to header private function initHeaderText():void { header_mc.title_mc.title_txt.htmlText=title_obj.title; header_mc.title_mc.title_txt.width=header_mc.title_mc.title_txt.textWidth+10; header_mc.title_mc.title_txt.height=header_mc.title_mc.title_txt.textHeight+10; header_mc.title_mc.title_txt.x=header_mc.width/2-header_mc.title_mc.title_txt.width/2-10; header_mc.title_mc.title_txt.y=25-header_mc.title_mc.title_txt.height/2; header_mc.title_mc.mouseChildren=false; header_mc.title_mc.buttonMode=true; header_mc.title_mc.addEventListener(MouseEvent.MOUSE_DOWN,onHeaderDown); } // create and position all the items private function createItems():void { for(var i:int=0;i < titles_array.length;i++) { var item:Item=new Item(); item.id=i; Tweener.addTween(item.bg_mc,{_color:ITEM_BACKGROUND_COLOR,time:TWEENS_SPEED,transition:"regular"}); Tweener.addTween(item.title_txt,{_color:ITEM_TITLE_COLOR,time:TWEENS_SPEED,transition:"regular"}); Tweener.addTween(item.read_mc,{_color:ITEM_READMORE_COLOR,time:TWEENS_SPEED,transition:"regular"}); item.title_txt.y=10; item.title_txt.htmlText=titles_array[i]; item.title_txt.height=item.title_txt.textHeight+10; item.read_mc.y=item.title_txt.y+item.title_txt.textHeight+10; item.bg_mc.height=item.read_mc.y+item.read_mc.height+10; item.x=5; items_array.push(item); } for(var j:int=0;j < items_array.length;j++) { if(j>0) items_array[j].y=items_array[j-1].y+items_array[j-1].height+2; items_container_mc.addChild(items_array[j]); items_array[j].read_mc.mouseChildren=false; items_array[j].read_mc.buttonMode=true; items_array[j].read_mc.addEventListener(MouseEvent.MOUSE_OVER,onReadOver); items_array[j].read_mc.addEventListener(MouseEvent.MOUSE_OUT,onReadOut); items_array[j].read_mc.addEventListener(MouseEvent.MOUSE_DOWN,onReadDown); } } // add the scrolling mouse position movement private function addMovement():void { items_container_mc.addEventListener(Event.ENTER_FRAME,moveItems); } // check mouseY and move items private function moveItems(evt:Event):void { evt.target.y-=SPEED; if(evt.target.y<-evt.target.height+375) SPEED*=-1 if(evt.target.y>=50) SPEED*=-1; } // this method is called when mouse is over read more button area private function onReadOver(evt:MouseEvent):void { Tweener.addTween(evt.target,{_color:ITEM_READMORE_ROLLOVER_COLOR,time:TWEENS_SPEED,transition:"regular"}); } // this method is called when mouse is out of read more button area private function onReadOut(evt:MouseEvent):void { Tweener.addTween(evt.target,{_color:ITEM_READMORE_COLOR,time:TWEENS_SPEED,transition:"regular"}); } // this method is called when read more button has been clicked private function onReadDown(evt:MouseEvent):void { var request:URLRequest=new URLRequest(links_array[evt.target.parent.id]); navigateToURL(request,PAGE_TARGET); } // this method is called when the title header has been clicked private function onHeaderDown(evt:MouseEvent):void { var request:URLRequest=new URLRequest(title_obj.link); navigateToURL(request,PAGE_TARGET); } // MY RIGHTS public function hideMenu():void { var label:String="FlepStudio"; var cm:ContextMenu=new ContextMenu(); var item:ContextMenuItem=new ContextMenuItem(label); cm.hideBuiltInItems(); cm.customItems.push(item); item.addEventListener(ContextMenuEvent.MENU_ITEM_SELECT,itemHandler1); this.contextMenu=cm; } private function itemHandler1(event:ContextMenuEvent):void { var request:URLRequest=new URLRequest(); request.url="http://flepstudio.org/"; navigateToURL(request,"_self"); } } }
Last edited by OrientExpress; 19-10-09 at 11:08.
Bookmarks