ActionScript 2.0 :: Creating Dynamic Menu Using External Txt File?
Feb 3, 2006
I would like to create a dynamic menu in flash importing the text from an external file. I downloaded an fla from actionscript.org which makes the dynamic menu part (attached the fla & txt) and created a txt file. This is the point where I' m lost: How can I import the text for the menu from that txt file and store it in variable(s) than build the menu.
I got the first part to work. The only problem is when I click any buttons it produces errorTypeError: Error #1009: Cannot access a property or method of a null object reference.at resume_fla::MainTimeline/frame1()not sure what I have to do. All it's supposed to do is when you click a button the target movie clip plays frames 2 - 10 and the previous movie clip plays frame 11 - 20. Not sure what's the problem here.
I have been working on building a XML menu and I have been able to create the top level menu but I am not sure how to add the sub menu items in a drop down. I have a link to a zip file containing my XML and FLA file. I am using CS4. [URL]. The top level menu items consist of the following and the sub menu options are listed. In this list, Items 1,2 and 3 are top level menu buttons and item 4 is a sub menu button that would drop down from item 3.
Animated Logo : 1 Welcome Video : 2 About Us : 3 sub menu option Our Mission : 4 We Make It So : 5 sub menu option Web Design : 7 sub menu option Web Hosting : 8 Our Work : 9 sub menu option Cambria Suites Akron/Canton : 10 sub menu option Westfield Insurance : 11 Our Staff : 13 sub menu option Our Developers : 14 sub menu option Contact Us : 15
I need to give a value, then when I give another value, the actionscript goes to the new value slowly.So if I give 10, then I give 20, the value goes 10 11 12 13 14 15 16 17 18 19 20. Basically I'm creating a dynamic menu that when a button is highlighted, a vine grows to the button. When you highlight the button next to it, the vine grows to the next button. I can't think of a way for this to work other than this value smoothing technique.
I've Googled & Binged to no avail. I'm trying to create a dynamic menu in Flash using PHP & MySQL and bring it into Flash using AS3 DataProvider. My menu works fine with a local Array, but I seem to have an issue with the Type being a String and not an Array, but how do I set it up properly so the types are correct? So I started with a typical, non-dynamic array and it works to create my menu:
[flash=]var items1:Array = [ {myClass:"SCI101", question:"What color is the sky?"}, {myClass:"MATH110", question:"What is the square root of 81?"}, {myClass:"SCI101", question:"How fast is the turtle?"}, {myClass:"SCI101", question:"How far is the Earth from Mars?"}, {myClass:"xXxXxXx", question:"xXxXxXx"}, [Code] .....
Is it possible to create a completely dynamic menu by creating empty movie clips and loading external images into them? I'm experimenting with this, but it seems there is no way to create rollover/release functions for these dynamically created MC's.
are there any good examples on how to create a menu which gets the menu points from an external source? i'm not a native english speaker - hope you understand what i mean.preferably with submenu points... (drop down or hierarchial)
are there any good examples on how to create a menu which gets the menu points from an external source? i'm not a native english speaker - hope you understand what i mean.
I'm a Flash MX action scripting newbie. I'm trying to create a dynamic drop down menu system that reads a text file to create the items listed in the menu. I've been reading tutorials and trying to break down source fla files to understand how things work. I'm stuck on what the following block of code means.Would it be possible for someone to break down the following code for me? It references menudata.txt to create the drop down menu. I can successfully modify menu.data.txt to create more menus and change the titles in each button, but creating sub-nav is totally kicking me in the arse.
I have a movie clip in my library linked as aboutUsMenuBtn. And I as get the childNodes.nodeName from the XML file, I want them to be assigned to a dynamic text field "btn_txt" inside of the aboutUsMenuBtn. With each node, a button is going to be attached to the aboutUs stage (I'm working using a Flash Form Application).
I got an FLA from flashden and deserately need to customizing it. I am trying to make the Text dynamic (FROM XML) but I still want to keep the animation in the file. I have attached the FLA. I want the xml to have to options. One for the Main name and one for the subtext.
Right now it reads: Advanced XML Website
I want the word advanced changed form one variable in xml and the word XML web site changed from another variable in xml. So it can read: Franks Great Website or Bobs Test Portal
If the font can be centered and stretched to fit that would be great. I want to make the text scale to automatically fit the dynamic text boxes...
I have a movie player that works fine when i hard-code the url value in the video function, but when i try to pass that url/file path from an external file, the video doesn't load. I suspect that there is something i'm doing wrong with the quotes. What am i doing wrong?
1. How could I make it where some images/text in a flash file is taken from another outside file. For example lets say I have a image and text that would need to change constantly. The image could probably be done by using a url and changing the image set to that url, but I would rather have it search for a images file name on my computer. For the text is there a way I could use a text document, and have it set up to take the text in that document and display it.
2. How can I make it so when I click a link to an outside url it doesn't confirm that I want to visit it.
I am trying to load a menu as an external file .... and getting this : TypeError: Error #1009: Cannot access a property or method of a null object reference. at com::menu()
Here is my code: if(!menuLoader){ var menuRequest:URLRequest = new URLRequest("menu.swf"); var menuLoader:Loader = new Loader(); menuLoader.load(menuRequest); container.addChild(menuLoader); menuLoader.x = 700; menuLoader.y = 50; }
I am looking at creating a menu with three movieclip buttons on a main menu. I want to keep these buttons on the top of the screen at all times. I am opening different swf's and I want to make sure that the buttons are still showing. I know there is something with changing or swapping the depth of the movie clip when it loads the new swf's in, but I have not found anything that is seeming to work.
Creating a high score table in flash, using external file handling, can be achieved using server-side scripts, such as PHP. However, as this is not allowed for my game (school project), I need a way to write a few variables directly to a text file and read it back again. Is this possible? I am using AS 2.0. Any other ways in which a high score table, which is portable and can be saved and updated
how can you preload an external swf that uses XML to load-in images?assuming you have "parent.swf" that loads-in "child.swf"..if "child.swf" were just a static / regular swf, then creating a preloader would be simple..the code in "parent.swf" will probably be something like this:
Code: Select allvar request:URLRequest = new URLRequest("child.swf"); var loader:Loader = new Loader() loader.load(request);[code]........
i cant think of a solution for this.. how can you preload an external swf that uses XML to load-in images? assuming you have "parent.swf" that loads-in "child.swf".. if "child.swf" were just a static / regular swf, then creating a preloader would be simple.. the code in "parent.swf" will probably be something like this:
I have a dynamic text box with text imported from an external .txt file and I'm trying to add a scrollbar using the scrollbar component. The scrollbar works fine if I simply paste the text into the box, but does not work when pulling the HTML formatted text from the .txt fileETA: Here is my script:
I have been working on a Flash movie that loads variable data from an external XML file and dynamically displays the item names in a menu which may then be clicked to display other dynamically-loaded content that corresponds to the menu item that was clicked. I have now come to a standstill in the project as there is something I'd like to achieve but simply cannot work out how. This is my first attempt at working with XML in Flash and one of my early attempts at using variables. What I'm trying to achieve is; once the user has viewed the item's content, they can simply click "next" and "previous" buttons to display all of the content for the next or previous items in the XML document.
I know it probably sounds simple and I'm sure some of you could achieve this in 5 minutes (!) but I can't get my head around some of the coding. I assume previousSibling and nextSibling would come into play here as well as some sort of functions which access arrays of data for the previous and next items, but I'm just not sure how to correctly put these things to use. Rather than post my code and example images of the stage up here on the forums, I've created an html page here: [URL]
I'm creating a drop down menu and when I addEventListeners to check the clicks on the invisible buttons on frame 19 of the "menu" movieclip, it gives me an error. T really hate doing rollover with actionscripts. The download link for the fla can be found in below. Sorry for posting an external download link as the file is 7mb+! [URL]
I had some dynamic text with a scroll bar and it was working fine. Then I decided to use HTML formatting and bring it in through an external .txt file using the following code: myLoadVars = new LoadVars(); myLoadVars.onLoad = function() { ContactText.htmlText = myLoadVars.myHTMLdata; } myLoadVars.load("ContactText.txt"); The text is loading fine except that my scrollbar has now disappeared and you can only see the first few lines of text.
I'm still a beginner with AS3. I am simply trying to load my .htm file into my dynamic text field, but it will not show up. When the movie plays, the cursor shows that there is text where it is supposed to be, but I do not see any text. I don't see an option to attach a file, otherwise I would.
var myFormat:TextFormat = new TextFormat (); myFormat.size=16; myFormat.align=TextFormatAlign.CENTER; var htmlText:URLRequest = new URLRequest ("text.htm"); var loadShit:URLLoader = new URLLoader(); loadShit.load(htmlText); [Code] .....
im currently making a quiz with different questions and im trying to link the questions dynamix text to a xml or txt file heres an example for one question:
on my answer timeline i have for the buttons (one frame per question):
I have a content area with dynamic text (title and detail) that changes depending what button a user is rolling over, and i want this text to load from an external file. I have 26 buttons total, so i need 26 different titles and 26 different details to load.
I have looked around and the only solution with the loadvars technique involves creating 26 separate .txt files and loading them all in, then calling them as needed. This seems like a big waste of CPU cycles and time creating each file.
Is there an easier way to go about tackling this? Ideal would be having all the text in 1 file, and calling each identified title and detail as needed.
I have created a sliding menu. But that is static( the number of rows are fixed). i want to create a menu with the number of rows dynamic.I have attached the fla file here.