Flash CS3 - Flash CS4

Free tutorials and scripts for all.
Actionscript 3.0

Shoutbox problems

This is a discussion on Shoutbox problems within the HELP free utilities forums, part of the Flash CS3 eng category; Hello, I am having problems with the shoutbox. I have a sample set up here: http://tlnlasvegas.com/dreamstream/test/...


Go Back   Forum Flash CS3 Flash CS4 > English Forums > Flash CS3 eng > HELP free utilities

Register Blogs FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 15-11-07, 23:29
Junior Member
 
Join Date: Nov 2007
Posts: 1
Rep Power: 0
fraudulentpeanut is on a distinguished road
Shoutbox problems

Hello,

I am having problems with the shoutbox. I have a sample set up here:

http://tlnlasvegas.com/dreamstream/test/main.swf

When I run it from my site it will not display the shouts, however, when I run it from within flash CS3 it connects just fine. Am I doing something wrong on my servers end? Please advise.

Thanks
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

  #2 (permalink)  
Old 16-11-07, 05:22
Administrator
 
Join Date: Jul 2007
Location: Cesena
Posts: 4,354
Blog Entries: 1
Rep Power: 6
Flep is on a distinguished road
Re: Shoutbox problems

Hi,
i just see a video
__________________

 


I recommend: Essential Actionscript 3.0

- Non rispondo ai messaggi privati con domande tecniche. Apri una discussione sul forum !
- I do not reply technicians pvt messages. Open a thread !
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 09-12-07, 03:13
Junior Member
 
Join Date: Jul 2007
Posts: 28
Rep Power: 0
Zombie is on a distinguished road
Re: Shoutbox problems

I too am having a problem

PHP Code:
Error #2044: Unhandled securityError:. text=Error #2048: Security sandbox violation: http://www.myurl.com/ShoutBox/main.swf cannot load data from http://www.flepstudio.org/utilita/ShoutBox/style.css.
    
at org.flepstudio.shoutbox::Main/::loadCSS()
    
at org.flepstudio.shoutbox::Main$iinit() 
why is main.swf trying to load from flepstudio.org? and...what frame in main.fla can I find its attempt to draw the style.css?

thanks ;)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 09-12-07, 03:14
Junior Member
 
Join Date: Jul 2007
Posts: 28
Rep Power: 0
Zombie is on a distinguished road
Re: Shoutbox problems

Quote:
Originally Posted by Zombie View Post
I too am having a problem

PHP Code:
Error #2044: Unhandled securityError:. text=Error #2048: Security sandbox violation: http://www.myurl.com/ShoutBox/main.swf cannot load data from http://www.flepstudio.org/utilita/ShoutBox/style.css.
    
at org.flepstudio.shoutbox::Main/::loadCSS()
    
at org.flepstudio.shoutbox::Main$iinit() 
why is main.swf trying to load from flepstudio.org? and...what frame in main.fla can I find its attempt to draw the style.css?

thanks ;)
sorry thats not php code, thats just the flash error I get when I visit my hosted shoutbox

hope you reply soon! thanks!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 09-12-07, 03:54
Junior Member
 
Join Date: Jul 2007
Posts: 28
Rep Power: 0
Zombie is on a distinguished road
Re: Shoutbox problems

Nevermind fleppie poo! I have figured it out!!

MAN this is A W E S O M E!!!

btw, all i had to do was a fresh reinstall, i deleted the whole shoutbox folder on the server, and pasted the fresh new files back, and bam!!! worked like a sexy sexy charm!!! thanks!!!!!!!!!!!!!!!!!!!!!!!!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

photoFlow

  #6 (permalink)  
Old 07-03-08, 11:21
Junior Member
 
Join Date: Mar 2008
Posts: 9
Rep Power: 0
bobbycool is on a distinguished road
Re: Shoutbox problems

Cool shoutBox....
just little suggestion, if the shout box could auto refresh every few second, so the new chat text will appears, it would be cooler
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #7 (permalink)  
Old 15-03-08, 05:29
Administrator
 
Join Date: Jul 2007
Location: Cesena
Posts: 4,354
Blog Entries: 1
Rep Power: 6
Flep is on a distinguished road
Re: Shoutbox problems

Hi

Just add a Timer in Main.as that calls refreshShoutBox function
__________________

 


I recommend: Essential Actionscript 3.0

- Non rispondo ai messaggi privati con domande tecniche. Apri una discussione sul forum !
- I do not reply technicians pvt messages. Open a thread !
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #8 (permalink)  
Old 15-03-08, 06:07
Junior Member
 
Join Date: Mar 2008
Posts: 9
Rep Power: 0
bobbycool is on a distinguished road
Re: Shoutbox problems

timer? how... i dont understand about script actually, just follow your instruction in readme

Code:
 public function refreshShoutBox():void
        {
            Store.datas_array=new Array();
            Store.names_array=new Array();
            Store.messages_array=new Array();
            loadXML();
        }
what must I do......
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #9 (permalink)  
Old 15-03-08, 16:29
Administrator
 
Join Date: Jul 2007
Location: Cesena
Posts: 4,354
Blog Entries: 1
Rep Power: 6
Flep is on a distinguished road
Re: Shoutbox problems

Ok,
try the following:

Open org/flepstudio/shoutbox/Main.as
Import new classes:
Code:
import flash.utils.Timer;
import flash.events.TimerEvent;
Inside of init function, add this line at the end of the function:
Code:
initTimer();
Now create the function initTimer:
Code:
private function initTimer():void
		{
			timer=new Timer(5000,0);
			timer.addEventListener(TimerEvent.TIMER,refreshWithTimer);
			timer.start();
		}
Now create the function refreshWithTimer:
Code:
private function refreshWithTimer(evt:TimerEvent):void
		{
			trace('ok');
			Store.datas_array=new Array();
			Store.names_array=new Array();
			Store.messages_array=new Array();
			loadXML();
		}
It should work.
__________________

 


I recommend: Essential Actionscript 3.0

- Non rispondo ai messaggi privati con domande tecniche. Apri una discussione sul forum !
- I do not reply technicians pvt messages. Open a thread !
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #10 (permalink)  
Old 16-03-08, 03:31
Junior Member
 
Join Date: Mar 2008
Posts: 9
Rep Power: 0
bobbycool is on a distinguished road
Re: Shoutbox problems

is right? its not working....

Code:
/*
 *************************************
  Shout Box                               
  http://www.FlepStudio.org     
  © Author: Filippo Lughi          
  version 1.0                                
 *************************************
 */
package org.flepstudio.shoutbox
{
	import flash.display.MovieClip;
	import flash.display.SimpleButton;
	import flash.text.TextField;
	import fl.controls.UIScrollBar;
	import flash.text.StyleSheet;
	import flash.events.Event;
	import flash.events.MouseEvent;
	import flash.events.ContextMenuEvent;
	import flash.net.URLRequest;
	import flash.net.URLLoader;
	import flash.net.navigateToURL;
	import flash.ui.ContextMenu;
	import flash.ui.ContextMenuItem;
	import org.flepstudio.shoutbox.LoadingXML;
	import org.flepstudio.shoutbox.Store;
	import org.flepstudio.shoutbox.SendTheMessage;
	import flash.utils.Timer;
	import flash.events.TimerEvent;
	
	public class Main extends MovieClip
	{
		private var _css:StyleSheet;
		
		private var file_xml:LoadingXML;
		
		private var _Name:String;
		private var _Message:String;
		
		private var scroller:UIScrollBar;
		
		private var counter:int;
		
		
		public function Main()
		{
			initMenu();
			init();
			loadCSS();
			initTimer();
		}
		
		private function init():void
		{
			stage.frameRate=31;
		}
		
		private function loadCSS():void
		{
			var loader:URLLoader=new URLLoader();
			var request:URLRequest=new URLRequest();
			request.url='http://www.dreameiken.com/ShoutBox/style.css';
			loader.addEventListener(Event.COMPLETE,onCSS);
			loader.load(request);
		}
		
		private function onCSS(evt:Event):void
		{
			_css=new StyleSheet();
			_css.parseCSS(evt.target.data);
			loadXML();
			shoutbox_mc.shoutbox_txt.styleSheet=_css;
			shoutbox_mc.shoutbox_txt.wordWrap=true;
		}
		
		private function loadXML():void
		{
			file_xml=new LoadingXML(this);
		}
		
		public function displayShoutBox():void
		{
			stopTrace();
			
			var s:String='';
			for(var i:int=0;i<Store.datas_array.length;i++)
			{
				//var myPatternSmile:RegExp=/:\)/g;
				//var myPatternSad:RegExp=/:\(/g;
				var date:String='<a class="date"> '+(Store.datas_array[i])+' </a>'+'\n';
				s+=date;
				var name_:String='<a class="name"> '+(Store.names_array[i])+' </a>'+' says:'+'\n';
				s+=name_;
				var mess:String='<a class="shout"> '+(Store.messages_array[i])+' </a>'+'\n';
				//var smile:String=mess.replace(myPatternSmile,"smilie");
				//var smile:String=mess.replace(myPatternSmile,"<img align='left' src='http://www.flepstudio.org/utilita/ShoutBox/emoticons/smile.gif'/>");
				//var sad:String=smile.replace(myPatternSad,"sad");
				s+=mess;
			}
			
			shoutbox_mc.shoutbox_txt.htmlText=s+'\n';
			
			scroller=new UIScrollBar();
			scroller.setSize(shoutbox_mc.shoutbox_txt.width,290);
			scroller.move(200,10);
			scroller.scrollTarget=shoutbox_mc.shoutbox_txt;
			addChild(scroller);
			
			addButtonListener();
		}
		
		private function addButtonListener():void
		{
			shout_btn.addEventListener(MouseEvent.MOUSE_DOWN,checkForm);
		}
		
		private function checkForm(evt:MouseEvent):void
		{
			var n:String=name_txt.text;
			var m:String=message_txt.text;
			if(n.length>=3&&m.length>=2)
			{
				_Name=n;
				_Message=m;
				
				shout_btn.removeEventListener(MouseEvent.MOUSE_DOWN,checkForm);
				removeChild(scroller);
				shoutbox_mc.shoutbox_txt.text='';
				name_txt.text='';
				message_txt.text='';
				traceWriting();
				
				var send_the_message:SendTheMessage=new SendTheMessage(_Name,'noMail@noMail.noMail',_Message,this);
			}
		}
		
		private function traceWriting():void
		{
			counter=0;
			shoutbox_mc.addEventListener(Event.ENTER_FRAME,go);
		}
		
		private function go(evt:Event):void
		{
			counter++;
			if(!(counter%5))
				evt.target.shoutbox_txt.text='';
			else
				evt.target.shoutbox_txt.text='writing';
		}
		
		private function stopTrace():void
		{
			shoutbox_mc.removeEventListener(Event.ENTER_FRAME,go);
		}
		
		public function refreshShoutBox():void
		{
			Store.datas_array=new Array();
			Store.names_array=new Array();
			Store.messages_array=new Array();
			loadXML();
		}
		
		public function initMenu():void
		{
			var etichetta:String="***Flash CS3 ShoutBox by FlepStudio***";
			var cm:ContextMenu=new ContextMenu();
			var item:ContextMenuItem=new ContextMenuItem(etichetta);
			cm.hideBuiltInItems();
			cm.customItems.push(item);
			item.addEventListener(ContextMenuEvent.MENU_ITEM_SELECT,itemHandler1);
			this.contextMenu=cm;
		}
		private function itemHandler1(event:ContextMenuEvent):void
		{
			var url:String='http://www.flepstudio.org/';
			var request:URLRequest=new URLRequest(url);
			navigateToURL(request,'_parent');
		}
		private function initTimer():void
		{
			timer=new Timer(5000,0);
			timer.addEventListener(TimerEvent.TIMER,refreshWithTimer);
			timer.start();
		}
		private function refreshWithTimer(evt:TimerEvent):void
		{
			trace('ok');
			Store.datas_array=new Array();
			Store.names_array=new Array();
			Store.messages_array=new Array();
			loadXML();
		}
	}
}
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump

Similar Threads

Thread Thread Starter Forum Replies Last Post
ShoutBox Flep Utilità di FlepStudio 12 04-10-08 07:20
ShoutBox Flep FlepStudio utilities 24 10-09-08 14:29
shoutbox installation claudine HELP free utilities 31 10-09-08 13:50
fullscreen problems with video wannax advanced Actionscript 3.0 0 26-04-08 15:01
Problems installing Scrollbar component carrieoke13 HELP free utilities 1 14-12-07 14:37


All times are GMT. The time now is 07:09.


Powered by vBulletin versione 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0 RC4
Forum SiteMap


FlepStudio
by Filippo Lughi
P.IVA 03605860406