Go Back   Flashtory Support Forum > Flash Files Support > Flash Menus > Horizontal Scrolling Menu XML AS3

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 11-19-2009, 11:21 PM
Junior Member
 
Join Date: Nov 2009
Posts: 2
Default scenes and compiling...

am I able to imbed this menu inside an individual flash scene? I don't seem to be able to get the movie clip that is included to compile... ie the existing shockwave file shown in the deploy folder. How do I compolie the flash file shown in section 1? Thanks

Last edited by mtracy; 11-19-2009 at 11:32 PM.
Reply With Quote
  #2 (permalink)  
Old 11-21-2009, 07:43 PM
Junior Member
 
Join Date: Oct 2009
Posts: 16
Default

Hi, it complies just fine, make sure you copied the flashtory and caurina folders (this folders contain .as files) in same folder with your .fla file and inside the .fla file make sure you have in your library (Ctrl +L) the contents of the source .fla fibrary, a folder called Fonts and also the movieclip called HorizontalScrollingMenu, now just drag and drop the HorizontalScrollingMenu on your stage (which is just an empty movieclip that has linkage to "flashtory.Main" the Main.as file in the folder flastory).

Cheers,
Ionut.
Reply With Quote
  #3 (permalink)  
Old 12-01-2009, 07:40 PM
Junior Member
 
Join Date: Nov 2009
Posts: 2
Default

is it possible to insert six or seven different instances of this nav bar into the same flash document? Basically I'm trying to create a two level nav bar but am having difficulty instantiating multiple instances of the horizontal nav bar... ie using this clip as a sub menu.... I really like the look of the menu for my purposes but need it to act in multiple instances as a sub menu. Thanks

Last edited by mtracy; 12-02-2009 at 11:47 PM.
Reply With Quote
  #4 (permalink)  
Old 12-03-2009, 01:19 AM
Junior Member
 
Join Date: Oct 2009
Posts: 16
Default

Hi, you can insert any number of instances you want by dragging as many HorizantalScrollingMenu movieclips from the library(Ctrl+L) to the stage, and making sure they have a specified height (not 0) so that they won't resize to the stage height. But this instances will all use the buttons defined in data.xml, to have different menus with different xmls you need to load the menu as a swf in your project (so you can have different swf in different folders using they own data.xml). Or you can go into 1 - Source/flashtory, and copy Main.as then make something like Main2.as, Main3.as etc, remembering to open the new .as files and replace "public class Main extends MovieClip" with "public class Main2 extends MovieClip" on line 15 and "public function Main()" with "public function Main2()" on line 54, them modify loader.load(new URLRequest("data.xml")); to loader.load(new URLRequest("data2.xml")); for example, and so on for all the files. After that duplicate the HorizantalScrollingMenu movie clip from the library and link the new mc to your new Main class, "flashtory.Main2" for example, add the new clip to the stage and you now have a new menu wich uses a diffrent xml.

Cheers,
Ionut.
Reply With Quote
  #5 (permalink)  
Old 12-09-2009, 10:37 PM
Junior Member
 
Join Date: Dec 2009
Posts: 6
Default

Hi,
I have a problem, trying to modify code to load external swf directly.
For this reason code changes in URLNav.as
Code:
/**
* @author Ionut
* @www: http://www.flashtory.com
*/
package flashtory.HorizantalScrollingMenu{
	import flash.display.Loader;
	import flash.display.LoaderInfo;

	import flash.display.Stage;
	import flash.display.MovieClip;
	import flash.events.*;
	import flash.net.URLRequest;


	// this class is ussed to call links
	public class URLNav extends MovieClip {
		// the url and the target
		private var url:String;
		private var target:String;


		// this set the private vars from the params
		public function URLNav(u:String, t:String) {

			url=u;
			rel="nofollow" target=t;
		}
		//this funtion calls a link
		public function callLink():void {
			var loader:Loader = new Loader();
			configureListeners(loader.contentLoaderInfo);
			loader.addEventListener(MouseEvent.CLICK, clickHandler);

			var request:URLRequest=new URLRequest(url);
			loader.load(request);
			addChild(loader);

			loader.x=100;
			loader.y=100;

		}

		private function configureListeners(dispatcher:IEventDispatcher):void {
			dispatcher.addEventListener(Event.COMPLETE, completeHandler);
			dispatcher.addEventListener(HTTPStatusEvent.HTTP_STATUS, httpStatusHandler);
			dispatcher.addEventListener(Event.INIT, initHandler);
			dispatcher.addEventListener(IOErrorEvent.IO_ERROR, ioErrorHandler);
			dispatcher.addEventListener(Event.OPEN, openHandler);
			dispatcher.addEventListener(ProgressEvent.PROGRESS, progressHandler);
			dispatcher.addEventListener(Event.UNLOAD, unLoadHandler);
		}

		private function completeHandler(event:Event):void {
			trace("completeHandler: " + event);




		}

		private function httpStatusHandler(event:HTTPStatusEvent):void {
			trace("httpStatusHandler: " + event);
		}

		private function initHandler(event:Event):void {
			trace("initHandler: " + event);
		}

		private function ioErrorHandler(event:IOErrorEvent):void {
			trace("ioErrorHandler: " + event);
		}

		private function openHandler(event:Event):void {
			trace("openHandler: " + event);
		}

		private function progressHandler(event:ProgressEvent):void {
			trace("progressHandler: bytesLoaded=" + event.bytesLoaded + " bytesTotal=" + event.bytesTotal);
		}

		private function unLoadHandler(event:Event):void {
			trace("unLoadHandler: " + event);
		}

		private function clickHandler(event:MouseEvent):void {
			trace("clickHandler: " + event);
			var loader:Loader=Loader(event.target);
			loader.unload();
		}





	}

}

Of course don't work,


can you help me?

THX

Last edited by this; 12-10-2009 at 11:26 AM.
Reply With Quote
  #6 (permalink)  
Old 12-10-2009, 10:56 AM
Junior Member
 
Join Date: Dec 2009
Posts: 6
Default Otherwise

I do not understand, why if I add a clip to the stage in code changes in URLNav.as in a standard way like

Code:
var cargo1:cargox = new cargox();
addChild(cargo1);
this don't work.

If I use this code in other file.as

this come to the stage but don't communicate with URLNav.as code


Please help me. THX
Reply With Quote
  #7 (permalink)  
Old 12-11-2009, 10:11 PM
Junior Member
 
Join Date: Dec 2009
Posts: 6
Default

So please, help me..

I don't understend problem,
so I have loader, I have my MC

I load png inside myMc ...

script give me back size of png .... but I dotīt see this bitmap

so?

give tip please

THX
Reply With Quote
  #8 (permalink)  
Old 12-16-2009, 11:04 AM
Junior Member
 
Join Date: Dec 2009
Posts: 6
Default

Hi, this is suport forum???
Reply With Quote
  #9 (permalink)  
Old 12-16-2009, 03:45 PM
Junior Member
 
Join Date: Oct 2009
Posts: 16
Default

Hi this, sorry for the late reply, you modified the URLNav class to extend movieclip class wich means you have to do an addchild for the URLNAv to, you added what ever you are loading on the loader but the urlnav which contains the added loader probably isn't added to stage.

Hope this helps,
Ionut.
Reply With Quote
  #10 (permalink)  
Old 12-17-2009, 04:05 PM
Junior Member
 
Join Date: Dec 2009
Posts: 6
Default

Thanks for answer,

exactly isn't added to stage.

So please give me tip, how I can do this...

Beacause with stage or not, this added movies to menu no to stage!

so how we can resolve this?
Reply With Quote
Reply

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

Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
based on a modified theme of CompleteGFX