ActionScript 2.0 :: No Parameters, No Brackets?
Jan 6, 2005
I was wondering why brackets are still given in actions that dont have parameters?
[code]...
They work without brackets too, dont they?Not that it makes a lot of difference, but I was just wondering
View 5 Replies
Similar Posts:
Jan 27, 2009
I have to send information to an external vendor using their existing parameters. However, they have included brackets [] in some of their variable names. As you might expect AS3 can't resolve the variable name. Does anyone know a way around this?
[Code]...
View 3 Replies
Nov 20, 2010
I have a form created using Flash CS3 and I want to pass the following hidden value name:
optionprod[ ]
The only problem is when I publish the file I get and unexpected "]" error. How can I pass the value with the brackets?
View 1 Replies
Jun 20, 2011
I'm trying to do that trick where you make a variable name with square brackets. I think I don't fully understand what I'm doing though...
Code:
var cursorDirection1:Point = pt.subtract(rootpos1);
var cursorDirection2:Point = pt.subtract(rootpos2);
var farShoulder:int = 1;//1 = left 2 = right
[Code]....
I'm trying to avoid having to do a conditional to choose between cursorDirection1 or cursorDirection2. My last line there isn't working, I'm not entirely sure why. Assuming farShoulder is 1, the code should be interpreted as
Code:
cursorDirection1.normalize(findNormVar(cursorDirection1));
but I'm getting errors about the input being undefined.
View 9 Replies
Jun 20, 2006
I'm stuck with trying to target a movieclip dynamically from a loop. I'm using the square brackket syntax but I can't figure out why it's not working. Here's what I'm trying to do:
Code:
this.t1.t1._alpha=20;
And here's how I'm trying to do it:
Code:
this["t"+1+".t"+1]._alpha= 20;
View 3 Replies
Aug 10, 2007
I'm reading a book on ActionScript and I'm in the section on controlling movie clips. I'm reading about the basic methods, and I'm starting to realize I still don't fully understand the significance of square brackets.[code]Obviously, this is the prototype form of the lineStyle() method. What I don't get is why "thickness" is the only parameter without square brackets. I know that square brackets are used for retrieving data from an array or object, but either my book doesn't cover why they're used like this in a method, or I just completely blanked it out.
View 2 Replies
Feb 13, 2009
Let's say I have a function in a class with two required parameters and two optional:
Code:
public class Person extends Sprite {
private var haveToWork:Boolean;
private var hoursOfSleep:Number;
private var gotANewVideoGame:Boolean;
private var gotAHotDate:Boolean;
[Code] .....
All of that setup for this question: on the second call of the areYouHappy function, how do I keep the gotANewVideoGame variable from having a false value assigned to it?
View 2 Replies
May 31, 2009
I have an SWF that has a var that is a string called fullpath. Now, if fullpath was "game.item1", How would I evaluate it as _level0.game.item1 in brackets [] rather than _level0.game.item1.Basically, how would I evaluate an item path from a string with brackets []? This is AS 2
View 5 Replies
Feb 22, 2010
I'm working on a flash chat and I'm having problems with Regular Expression.
In Javascript this runs ok:
[code]...
My regex pattern works for but it ignores any letters in brackets.
View 4 Replies
Feb 4, 2011
I have a text file that needs to be parsed correctly. The text file looks like this:
[header]
[header 2]
[ header3 ]
I can grab these headers by doing so
var expression:RegExp = /[ [a-z0-9 ]+ ]/igxm;
var items:Array = text.match(expression);
But I would also like to remove the white space from before and after the brackets, so the headers can align against the left edge. Also, for [ header3 ], I would like to remove the white space inside the brackets, before "h" and after "3". What would be the correct regex for something this?
View 2 Replies
Oct 13, 2010
I have some classes stored in a swc which I would like to instantiate using data pulled in by xml - using a string to reference the classname.So where I would normally use
ActionScript Code:
var tagline:Sprite = new Tagline1();
I would now like to do something like
ActionScript Code:
var tagname:String = "Tagline1"; // really the string comes from XML
var tagline:Sprite = new [tagname]();
I have a vague idea this is possible using square brackets, but I don't seem to be able to find out anything about it.
View 5 Replies
Jun 13, 2009
Been trying to figure this out for a few but no luck. I want to just make a new node and add it to an XML structure. So I've tried things like :
Code:
var xmlNode:XMLNode = new XMLNode(1,newNodeName.text);
var xmlObj:Object = xmlNode as Object;
[code]......
View 2 Replies
Sep 23, 2009
I have a chunk of Code which Flash confirms is without errors, but when I either compile the program or click the AutoFormat Button, Flash puts a curly bracket at the end of it and then has the audacity to complain that there are "extra Characters found at the end of the programm."I have to have this running to go online on Sunday the very latest.[code]
View 3 Replies
Jul 28, 2011
How to format JSON data without using brackets for an array?[code]...
View 3 Replies
Jan 25, 2005
I have five simple equations that I need help converting to ActionScript. I'm making a small "calculator" that takes input from the user and displays a number representing the result of the equation. They're two sets of equations: 1) three-scenario fee calculator to compare the annual costs (X) of renting versus buying equipment; 2) comparison of two rental plans. The numbers entered need to stay the same - the alphabets represent what the user will input. The equations are as follows:
Scenario 1:
X = ([A � F] / G) + H + I + J + (K x 12) + ([L / N] x M)
Scenario 2:
X = ([B � F] / G) + ([E x C] / G) + H + I + J + (K x 12) + ([L / N] x M)[code]....
I've looked at my resources at hand, but my brain just shuts down when I see numbers and letters representing numbers. I do speak three languages fluently, so I (think) I make up for it.how to properly assign the correct order of events (brackets first, etc) in ActionScript to reflect the equations above.
View 14 Replies
Aug 5, 2011
It was hard to sum the issue so here's what I mean in the title is something like the following:
ActionScript Code:
var rX:RegExp = /^([0-9]+-[a-z]+){3,5}$/i;
trace(rX.test("1-a")); // false
[code]........
View 5 Replies
Oct 19, 2011
I am kinda new to as3 and I have seen [] the square brackets used when trying to access array index but I have also seen some people use it in other places. I was just wondering what its exact function was.
View 1 Replies
Nov 20, 2010
I am trying to pass a variable with brackets in the variable name. Example
productoption[]="value";
Whenever I publish the file flash gives me an unexpected "]" error code. Is it possible to have a variable name with brackets? I tried to use the escape codes %5B%5D to pass the brackets but that didn't work also.
View 1 Replies
Dec 14, 2006
if my code like this
<object classid="clsid27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/s...rsion=7,0,19,0"
width="434" id="FlashVars" height="69">
<param name="movie" value="${pageContext.request.contextPath}/newWeb/images/dlyjcl_scfbxx.swf" />
<param name="quality" value="high" />
[Code]...
View 2 Replies
Feb 7, 2008
I have a script that loads a movie clip at a different location every time on the stage:
photo1._x = Math.random() * 600;
photo1._y = Math.random() * 600;
This works fine. All I would like to do now is add a minimum and maximum of some kind so that my clip never load hanging half off of the stage. I tried this among other things:
photo1 = Math.min(stage.width - 100, stage.width - 100);
photo1 = Math.max(stage.width - 100, stage.width - 100);
I tried a number of other ways to add x and y parameters but never got the result I wanted.
View 2 Replies
Aug 31, 2010
when I use the following code:
Actionscript Code:
stage.addEventListener(MouseEvent.MOUSE_DOWN,mousePressed);stage.addEventListener(MouseEvent.MOUSE_MOVE,mouseMoved);function mousePressed(e:MouseEvent) { if(editMode != null){
[code]....
View 3 Replies
Dec 3, 2008
I am trying to use external xml to set cue point times (for video), titles, and other parameters. I have everything set up, except getting the proper data from the xml file to set the parameters for my cue points. I am researching hard and learning quickly
View 2 Replies
May 27, 2009
i'm trying to pass variables to another SWF using a Loader/URLVariables combo.
I need to know if this way of passing variables should even work. And if not can some recommend a better way.
var uv:URLVariables = new URLVariables();
uv.lang="en";
uv.gameId="123";
uv.profileId="456";
[Code]...
View 5 Replies
Jun 12, 2009
want to make a sfw that receives parameters from the html tag. for example, when you embed youtube videos, in the <object> thingy you set the video you want to show. i want to do exactly the same, have a 'projector' (though not exactly videos), the swf knows what to do from the html tag params, and displays the right content. how do i red html params from the sfw (and how do i test it?).
also, is there any doumentation/examples on how to connect php/mysql to a flash movie?
View 2 Replies
Jul 16, 2009
I need to load a SWF depending on a parameter in the URL ... how do I do in order to make flash recognize the RUL parameters? For example, I want that: [URL] load the index.php with an animation for utah, [URL] load the index.php with an animation for texas, and so on... how do i achieve this?
View 3 Replies
Aug 28, 2009
I have a flashGallery.swf file that I am loading into my flash site. I need to set the parameters for the xml, content, and php script paths as well as set the width and height for the swf. The parameters were originally set in the HTML file like so:
<script language="javascript" type="text/javascript">var so = new SWFObject("flashgallery.swf", "gallery", "425", "320", "8"); // Location of swf file. You can change gallery width and height here (using pixels or percents).so.addParam("quality", "high");so.addParam("allowFullScreen", "true");so.addVariable("content_path","http://www.flickr.com/photos/thestoryboxallstar/"); //
[code]....
View 4 Replies
Nov 9, 2010
I need to dynamically pass 2 parameter to an swf movie to make it work properly, they are a number and a boolean. To do this I've changed the html page which contains the movie to php, I pass to the page the parameters' values through GET. The values are correctly passed to the page, I've tried to print them.
I build the call to the swf in this way collpreloader.swf?connid=<?php echo $_GET['connid'] ?>&animazione=<?php echo $_GET['animazione'] ?>
collpreloader.swf correctly reads the connid parameter, but animazione results always true.
[Code]...
View 2 Replies
Dec 31, 2010
I want to use a convolutionfilter on a bitmap and i copied the following code:[code]but i get an embossed gray image and i have not the colors of my image.What can i do; i don't understand the use of parameters:in convolutionfilter ,there are 9 parametersin the function;how can i manage if i want use only 5 parameters.[code]
View 3 Replies
Jan 17, 2011
I'm looking for the best methods to pass variables to a MySQL and receive variables from that database as well.
View 3 Replies
Sep 16, 2011
I've somewhat decided n Anvsoft flv player for a flash website project. There seem to be many of these players free and otherwise, but they seem to all publish for HTML, not from anothe SWF.. The published html is below, and my question is how to call the SWF from Actionscript 2 rather than HTML? I believe I can figure out the rest of the mechanics to a recent education .
[Code]...
View 17 Replies