ActionScript 2.0 :: Write A Function That Will Build A Menu Based Upon The Vars?
Dec 14, 2006
Im trying to write a function that will build a menu based upon the vars that I passed it to. This is a simpler version on the code.(The library has a MC/Btn symbol with the linkage "btn");
Code:
function bulidMenu(nItems:Number) {
var menuMCx:Number = 100;
var menuMCy:Number = 100;
[code]...
Why do I get an output of 4 on every clicked button, instead of 0,1,2,3 ? I tryed forwarding the " i " to the onRelease = function(i) {} and then in it declaring a new var and assigning it the passed " i ", but that doesn't work either :/
View 4 Replies
Similar Posts:
May 19, 2009
I'm putting together a form but I guess you have to create a server side script to receive the variables and then email them somewhere... but I'm not sure if I have to use php5 or php cli...
View 2 Replies
Aug 14, 2010
how can build a txt document and write in flex application ?
View 1 Replies
Feb 24, 2012
[code]...
This is my code so far, is square.graphics the way to go? How do I draw a tile that is a picture? Do I need to hold the graphics in some sort of array to do checking like collision?
View 1 Replies
Mar 3, 2009
basically i want to build a flash based mechanical clock. I have all my gears with the correct ratios. I could have them all rotate via timeline animation but i would prefer not to make a 17000 frame animation when i could probably code it much more efficiently. So say gear A is rotating at one revolution per second CW. how could I code gear B to rotate a full revolution CCW every 10 times gear A revolves. then have gear C rotate once CW every time gear B rotates 6 times.
View 1 Replies
Aug 9, 2011
We have been building our Flex app forever using Maven. Due to the fact that we use RIATest for integration testing we need to create a special test version of the app with the RIATest agent compiled in it and with the Flex automation libraries available. Apparently for the latter we need to provide the flex compiler with our license since this is only available from a version higher than Standard.
Up until Flex 4.0 and RIATest 3.8 this worked fine, we had our license information defined in a flex-config file in the user home directory. However currently with the combination Flex 4.5 and RIATest 4 we are having problems, the tests always fail with "License not present. With the trial version only limited replays are allowed."
We have tried multiple variations of defining the license key for Flashbuilder 4.5 but we have had no success. Currently our flexmojo configuration in the POM references an external flex-config file and there we try to define the license key.
View 2 Replies
Dec 8, 2010
I have a very classic website with Flash built menu and HTML content. Now what I need is the menu buttons( which are Movie Clips actually) to maintain in their pressed position when a particular button from menu is pressed (which actually I did inside flash, but everytime new hyperlink is followed, the website is refreshed and new SWF loaded without button being pressed obviously).
I know this can be done either by Frames which I do not want or passing an argument in URL string from HTML when we call for an SWF object.
Sounds great, but I how do I pass different arguments to several menu pages, when i have only one SWF object and therefore only one hard-coded place of data or value where i can pass the argument in string ?
Do I need to divide my flash object to as many swf's as i need buttons and links ?
View 1 Replies
Jan 29, 2003
is it possible to write a function to move an object and then call that function on a clip event for instance
function (bounce){
script;
script;
}
and then call it by saying
on(mouseOver){
this.bounce;
}
View 2 Replies
Jun 30, 2009
I'm having a small problem trying to build a simple little Menu Bar. I'm trying to make it so that if I click on one button (Movie Clip) it will make it look different, and then if I click on a DIFferent button (Movie Clip) it will make the old one normal, and the new one look like it is selected.
I tried doing so by creating a function that checked what page I'm currently in, and changed the look of the MCs accordingly, but when I run it, I keep getting the following error[code]...
View 2 Replies
Apr 30, 2010
I am trying to build a menu from my XML file and I am having a little trouble getting the correct values to appear. I am trying to get the value of categoryName into the variable pageCategory.The XML file has this structure:
Code:
<?xml version="1.0" encoding="UTF-8" ?>
<presentation>
<info>
[code]....
View 9 Replies
Dec 6, 2010
I am following an online tutorial to build a horizontal menu bar in AS3. In the tut, they are using MovieClips, but for what I want to achieve I am using buttons.
Here is their code.
Select allfunction navOverF(event:MouseEvent):void{
event.target.filters = [navBtnGlow];
navBar_mc.setChildIndex(event.target as MovieClip, 1);
dropMenus_mc.gotoAndStop(navBar_mc.getChildAt(1).name);
trace("We are rolling over..." + navBar_mc.getChildAt(1).name);
}
I have worked out that the issue is in line three "(event.target as MovieClip, 1)", but how do I change this code to work with buttons?
View 2 Replies
Feb 10, 2010
i am trying to build a scrollable menu in flash using xml.i want it to display multiple options, once an option is chosen i want it to display another menu in its place with different options.
View 1 Replies
Apr 18, 2004
I'm trying to build an animated menu with seven buttons, 3 of which need a submenu. I have 4 regular buttons and 3 mc's on the main timeline. After creating the first mc with 6 submenu items that appear onRollover and trying to target the submenu buttons to open a new page nothing happens when I click on the button. I attached this code to the submenu button while it in the "Over":
Code:
on (release) {
this.skiMenu_mc.skMain_btn.getURL("ski/sk_main.htm", "_self");
}
Here's the complete fla file if you're interested. I'm using Flash MX 2004.
View 3 Replies
Sep 21, 2005
i'm trying to build a tsunami menu but cant figure why it doesn't work i've followed a tutorial from actionscript.org and can't find the problem.
View 3 Replies
May 4, 2006
I have some code to build a menu dynamically from an xml file.
Code:
var myXML = new XML();
myXML.ignoreWhite = true;
myXML.onLoad = function(success) {
[Code]....
Which works fine, pulls in the attributes, label, colour and so on and builds the menu. However it hapens all at once as the for loop executes, how would I insert a pause so that the menu appears to build over time?
View 2 Replies
Sep 25, 2002
here is the swf of the menu I was trying to build using a class and prototypes.
View 3 Replies
Feb 3, 2005
I just signed up and am fairly new to flash so I hope I'm posting in the right spot. My problem that I'm having is I am trying to build a menu consisting 3 buttons, side by side that open and reveal subnavigation buttons on rollover. Then on rollout of the main container button, they close back to where they were. I have built the buttons and everything works great, the only problem is that on rollover of the internal buttons, the main button senses this as a roll out and plays the rollout animation event (closes the button). How can I make the main button not sense the rollovers of the internal buttons and only play the rollout event on rollout of the main button?
View 2 Replies
May 25, 2008
Code:
function showsubMenu(x,y,thisArray,gotoArray)
{
var curr_item:MovieClip;
[Code]....
now all menuItem's slide in at ones. but i want to slide them in one after the other?
View 4 Replies
Aug 25, 2010
I've just started learning as3 and I've been trying to find a good tutorial on dropdown menu's using just xml and as3. Most of what I've come across so far are either static menus or menus driven with heavy use of the timeline. Is it even possible to build a nice fluid drop down menu completely in code?
View 2 Replies
Dec 17, 2008
I've been working for a week on a very important task and learning (with Moock's book beside me) as I go. I'm trying to build a menu layout that functions a lot like an iGoogle page. Is this just a matter of a lack of syntax knowledge on my part or is this not possible? I can't find any examples of anything even close. I'm not sure which answer I'd prefer, but I'll take any insight that someone with more knowlege than me could offer
View 2 Replies
Aug 16, 2003
ok, first of all, im not totally sure how to describe my problem so im going to recreate a simple example of what im trying to do...
my problem is that im not sure how to refer to a dynamic mc in a function...i know that sounds confusing but maybe this will help...
lets say i have a function like:
[Code]...
the problem with this is that the function looks for an mc titled "mcName"...and the function is hard coded...what i want to do....is to reuse this function with any movieClip on the timeline i want...so how do i refer to the mc in the function dynamically? i hope this makes sense?
ive also tried something like this
_root[mcName]_x = 123;
but this doesnt work either....ive seen something like this done before...using brackets to target an mc with a var...
View 1 Replies
Feb 7, 2009
I am trying to write a class that will hittest for my mouse touching a menu. The class is attached to the linkage of the actual menu MC. I can't seem to get a hit, I think, what am I doing wrong?
Code:
import mx.events.EventDispatcher;
import mx.utils.Delegate;
[code]......
View 2 Replies
Mar 7, 2010
I'm familiar with C/C++/Scheme/Java/OpenGL/TCP/IP.I need to learn how to build a tile based / platform flash engine.What tools should I be using? What books should I buy?I strongly prefer tools that let me do things programatically rather than through a graphical UI.
View 2 Replies
Aug 19, 2009
ActionScript Code:
private var __milena:LoadVars;
private function Loadprom(prom:String):Void {
[code].....
View 5 Replies
Nov 19, 2009
I want to add about 10 textBoxes and I want them all to be contained in different variable names. I need to declare them outside the document constructor function because of scope, but how then can I use them in a function? I want something like
[Code]...
View 1 Replies
Jan 21, 2008
I am trying to make a button that when clicked on loads an external text file into a dynamic text box.
I can make it work when I use it specifically - but I can't make it work when I want to use it as part of a generic 'button function'.
Basically I have a .txt file "mycontent.txt" which is called using the Load Vars function inside a generic function (tab_grow) i created to managed the behavior of the 12 tabs that are the navigation for the movie. For now i'm just focusing on ONE of the tabs. Basically the tabs move when a user hovers over them and when they mouse off. When they click it should call the external text file. The section in the .txt i'm calling is called 'mega_data'.
This is what I have right now:
HTML Code:
function tab_grow(mov, file) {
mov.onRollOver = function() {
mov.onEnterFrame = function() {
[Code].....
BUT then I can't change which section of the .txt file I pull up for different tabs - which is the whole point of the function!!
View 1 Replies
Jun 21, 2010
Could anyone suggest how to fix the function at the bottom so that when button forward_btn with label "Go to next Training Point" when clicked recalculates the fields created in function fileLoaded.[code]
View 2 Replies
Mar 2, 2007
Is there any advantage to deleting vars instantiated within public or private functions in a class, or are they removed from memory after the function has been invoked/run? The function below is completely arbitrary for example:
ActionScript Code:
private function someFunctionHere(_ar:Array):Void {
var _swf:String = _ar[0];
[Code].....
View 2 Replies
Mar 2, 2007
Is there any advantage to deleting vars instantiated within public or private functions in a class, or are they removed from memory after the function has been invoked/run? The function below is completely arbitrary for example:
Code:
private function someFunctionHere(_ar:Array):Void {
var _swf:String = _ar[0];
var _nm:String = _ar[1];
[Code]....
View 4 Replies
Aug 1, 2006
I want to make these 7 events into one function that I can put on a few different buttons' onPress function so that I don't need to have those seven lines of code on every button, just one line instead:
Code:
tour_mc.unloadMovie();
logo_mc.tour_subnav.north_nav.enabled = true;
logo_mc.tour_subnav.south_nav.enabled = true;
[code]....
View 10 Replies