ActionScript 2.0 :: Values Used With Functions [renamed]?
Sep 11, 2005For example:
myFunc = function (p1, p2) {}
Or:
myFunc = function (ab) {}
[code].....
For example:
myFunc = function (p1, p2) {}
Or:
myFunc = function (ab) {}
[code].....
to display the items from an array in a certain way, in two columns for instance so that they fit into a dynamic textfield or maybe to force a break when theyre displayed in one row
View 14 Repliesin this example why the values of (12) and (21,39) are lost at the geo and geo1 functions
[code]...
I have a function that I want to get an array out of. Do I just return the array to the function, and when I call the function set it equal to a variable?
View 1 Repliesis there any way to locally define a variable in a function and then pass it to the oher function. I mean to say is it possible the pass a local value from one function to other function.
View 3 RepliesI'm trying to do something simple in actionscript as simple as this:- Create a variable: var urlVideo:String;- Use that variable inside a function and give it a value: urlVideo = ideoElemento.url.text();- Then create a new variable and give it the urlVideo value: var url:String = urlVideo;
Here's my code:
var idVideo:String = "12";
var urlVideo:String;
[code]....
I currently have a basic application where we have multiple buttons, which have functions activated by "click" event listeners on those buttons. The issue is that each button does more or less the same function; just the data that is loaded for each button is different. How do I make it so I'm able to recycle the same function? In Javascript or AS3 something along these lines would be done...
<s:Button id="btn_1" x="378" y="601" label="Button 1" click="photoSwap(event,"image1.jpg")"/>
<s:Button id="btn_2" x="350" y="601" label="Button 2"
[Code].....
But that's obviously not how it works. I've tried trouble shooting the issue but haven't been able to find anything. It works when I have each button having its own function, but that seems really silly and shouldn't need to be done.
How do you pass variable values between functions where the addEventListener is in the first function? I am trying to get the color value passed into my event handler. [code]...
View 6 RepliesI have a main mxml and 2 AS classes.In the main mxml I have a slider.I want to get the slider values in AS classes as I move the slider.
Main.MXML
import First;
import Second;
[Code]...
I could get the values from trace(dat)....I mean the date's as the slider changes. How could I use this changing values in function visualization()
I have just started learning AS3 (2-3 weeks) and I have to say its very enjoyable!I am trying to make a function that pulls in values to save me writing 15 separate functions!I have a "street mc" which has 15 "house mc's" inside.When the user hovers over a house I want the resident to appear above the house.The house instance name is house1 and there is a mc in the library linked using the MrsRoy() class.This is my code so far:
Code:
var house1Res:MovieClip = new MrsRoy();
function resIconIn(e:MouseEvent):void{
var currentHouse = "street." + e.target.name;
var currentRes = e.target.name + "Res";
[code]....
I get the error:
TypeError: Error #1006: value is not a function.
at Dignity_drive_fla::MainTimeline/resIconIn()
I need to create a table and i need to be able to add data and change the data automatically using values computed by other functions. I was trying to use arrays to create the rows of the table but i dont know how to individually name each array. The arrays have to created automatically and so i cannot name each array manually.[code]but the value for the array is undefined.
View 1 Repliesim trying to load an .swf movie (or file which ever it is) into my main movie...well the way im doing that is by clicking a button and then the movie loads...then im wanting to be able to click another button and load a different movie BUTTTT when i do this right now the second button's movie loads right over the first buttons movie!! what do i do?!?
View 2 Repliesi have a button MC.question, how i can do that when i click the button go to [url]
[code]...
they make filereference to upload files, but don't even allow you to pass variables to php.
View 4 RepliesI have a Flash MX 2004 program that can't read .txt files from my server. Is it possible that it needs special permissions to do so? I'm using a free hosting plan from Godaddy (comes with the domain name plan), is there any way for my to change my permissions?
View 3 RepliesEDIT :The thread has transitioned into [3d collision detection with as3 ] - check last post I'm in the making of my molehill game, and have now approached a little problem: I have my Terrain and my Mesh(character model). Moving/walking the mesh around was simple enough (X,Z). But when i added elevation to the terrain, i have to add movement in Y depending on the Y pos of the terrains vertices. My terrain does not have a fixed grid, and eventually might not have equal amount of rows per col. The way that i receive the verticeData is through one long vector.
View 14 Repliesi wanna create a photo album.this is thumbs page.
Code:
for(i=0;i<2;i++){
this.createEmptyMovieClip("logo_mc"+i+"", 999);
loadMovie(""+i+".jpg", logo_mc+i+);
}
how can i solve this problem about variables??
Code:
import flash.display.*;
import flash.events.*;
import flash.text.*;
[code]....
My Problem is getting a preloader to work In AS3 code above, loading in media_player.swf from the same directory.
make percentage preloader to my mc?
View 1 Repliesi have an animation that its something like a safety lock that make an entire loop, so i want some script that when i click lets say "about" it goes to "about" and stop, and them when i click lest say "contact" the animation goes to contact but without start over, i mean, i want to that to start from the last point, i dont know how do it in action script?on realease if is at "frame name" goto and play "frame name", and stop at "frame name".
View 3 RepliesFor some reason my first if statement is allways fulfilled, even when I set the varaiable to different values, I cant work out why. My variables are not used anywhere else in my site.
_global.roller=0
if (_global.roller=5){
var speed = 0;
}
[code]....
Which part of this code do I change to make the speed of the 'snowflakes' faster? (from falling snow 0.3 tut):
[Code]....
I'm designing a site that has 4 parts (for the sake of explanation)Part 1 is the menu which will be it's own .swf, which I would like to have align to the top center of the browser even if you resize the browser. Part 2 is the content which I'd like to align to the center of the page, even when you resize the browser. This is also an .swf which corresponds with the menu.swf Part 3 and 4 don't have to be .swf's, but are just graphics in the top right corner and the other in the bottom left that stay in the corner even when the browser is resized.
View 1 RepliesI have an XML based photo gallery which I'm using to present my portfolio. I'm trying make the "title" to work as a link. I am attaching the two files: FLA and XML. I'm not including the pictures.
View 7 Replieshave got this script in flash8. but not able to change the font type and color
_root.mm.createTextField("input_txt", 1, 34, 105, 530, 156);
_root.mm.input_text.font= "times new roman"
a=a+1;
[code].....
I'm trying to get it to load into one of the movies that its creating but it doesn't seem to like the string, if I manually enter _root.holder_mc.mc_0 it works fine.
Code:
#include "com.qlod.LoaderClass.as"
var depth = 0;
[code]....
Me and my friends have done a game and when we export it you can scroll through the whole game by pressing Ctrl + Enter.So my question i simple: How can we block Ctrl+Enter from skipping frames??
View 14 RepliesI am using Flash CS4, AS3.I have a movieclip "MC1" and a Component "B1" from the 'Component Library' on my main stage. From code inside of MC1, I would like to create an empty movieclip "MC2". Then, still from code inside of MC1, move(cut and paste-like) B1 into MC2. I have failed in my attempts thus far...
View 2 Replies[URL]the opening squence i suppose it's all just movie tweens between files, but how is this thing done, when you click a button, the middle screen/part of the site, has a transition effect, loads, and there is a new page! i know how to do the transitions, and the loading bar, but how do i exactly tell my button, where to load an external movie file!...
basically, i want it when somone goes to the site, the while site opens, there are transition effects, and three different movies open at three different spots on the site...just like it happens at www.void.com when you enter their site, they got the main window, and the botton right and left windows!
How do i have to do some effects to the cursor for my webpage or to the buttons.
View 1 Replies