ActionScript 3.0 :: Explain Syntax For (X ^ (X >> 31)) - (X >> 31)?

Oct 15, 2009

explain in very very basic terms (or direct me to tutorial) what is happening in this syntax:

[code]...

this was part of and example on how to optimist code (posted in this forum awhile ago), specifically for replacing either:

[code]...

I understand how the brackets work, and that X is a variable (I presume a Number).

I assume that '^' == 'to the power of'.

I dont understand why they are using >> or 31 at all.

View 2 Replies


Similar Posts:


ActionScript 3.0 :: Movie Looping After Starting Syntax With Stop Command, No Compiler And Syntax Errors?

Jul 14, 2011

using action script...
 
stop();btn001_btn.addEventListener(MouseEvent.CLICK,showimage1);function showimage1(event:MouseEvent):void { gotoAndPlay(10);}btn002_btn.addEventListener(MouseEvent.CLICK,showimage2);function showimage2(event:MouseEvent):void { gotoAndPlay(20);}
 
however movie is playing without stopping to "Listen" for a Mouse CLICK. Images placed at frame 10 and 20 should appear only when CLICK'd.
 
This code is straight out of Classroom in a Book CS4.

View 5 Replies

ActionScript 1/2 :: Gradient To _rotation - Please Explain Trigonometry?

Oct 28, 2011

From what I have gathered, _rotation uses radians?Basically, my initial goal was to make a movieclip rotate towards the mouse. I'm not very good at trigonometry.Using the help files I found atan2 which seemed to be what I needed. A little fiddling got me to this code:

var xDist:Number;
var yDist:Number;
var angle:Number;
onMouseMove = function () {

[code].....
 
However,the _rotation is opposite what is expected. This is not a problem as I can just flip the movieclip. But really what im here to ask is, please ecplain this code for me? I don't correctly understand how atan2 works.. and why it needs to be *60.Basically: How to get a movieclip to rotate towards the mouse.. and why does the code work, I want to learn trigonometry.

View 3 Replies

Javascript :: Looking For Resources To Explain A Security Risk?

Jun 18, 2010

I've a developer which has given users the ability to download a zip archive which contains an html document which references a relative javascript file and flash document.The flash document accepts as one of it's parameters a url which is embedded in the html document. I believe that this archive is meant to be used as a means to transfer an advertisement to someone who would use the source to display the ad on their site, however the end user appears to want to view it locally.When one opens the html document the flash document is presented and when the user clicks on the flash document it redirects to this embedded url. However, if one extracts the archive on the desktop and opens the html document in a browser and clicks the flash object, nothing observable happens, they will not be redirected to the external url.

I believe this is a security risk because one is transferring from the local computer zone to an external zone.I'm trying to determine the best way to explain this security risk in the simplest of terms to a very end user. They simply believe it's "broken" when it's not broken, they're being protected from a known vulnerability.The developer attempted to explain how to copy the files to a local iis instance, which I highly doubt is running on the users machine, and I do not consider this to be a viable explanation.

View 2 Replies

Flash :: Which Apps Are Available To Create Start Up Explain Videos

Jan 25, 2012

I was wondering if there is any easy tool to use in order to create a start up video? I know there is the Adobe After Effect option, which is extremely expansive.

any tool that allows you to create an animation, easily? for a startup site, a video that explains what the startup do?

View 1 Replies

Professional :: Incorporate Audio (Voice) To Explain Flash Animation

Apr 6, 2010

I am doing a project on an interactive website that contains flash animations. I have to incorporate a voice that explains what is happening in the animations. I am using my own voice for this. I have recorded my voice and saved it as .mp3 files. between each animation there are about 6-10 audio files. I am pretty sure I can import the sounds into the flash library and drag the sounds on the timeline and sync the sound with the animations that way but is it possible to control the sound using actionscript as I have to incorporate buttons that allows the user to play, pause and stop the animation and the audio. Or can I only use actionscript to achieve this.

View 7 Replies

Flash :: Animation Tool To Explain Software Project Visually

Dec 10, 2011

I have a software project, which involves complex process and calculation. Rather than writing it's logic and business flow in a document, i want it to be explained in some sort of animation visually, which would be easier for some one new to my project.

View 1 Replies

Actionscript :: Javascript: Explain The Meaning Of :Number After A Function Declaration?

Mar 28, 2012

Remark from editor: Op miss-classified actionscript as javascript.I am new to Javascript and am confused by the following function declarations in ECMAScript.js2.

public class String extends Object {
...
public native function charAt(pos:Number):String;

[code].....

View 3 Replies

AS 3 :: Syntax With Textfield?

Apr 1, 2011

I have this code gameOver1.text = (count1.currentCount / 100).toString();but i want to add some text before i display the current count. for instance in gameOver1.text i want to say

View 4 Replies

ActionScript 2.0 :: Getting A Syntax Error

Mar 15, 2009

I've just found this ActionScript and tried it out in my Flash MX file. However, when I preview the movie, it comes up with 2 errors - either for unexpected } or expected {.[code]...

View 2 Replies

ActionScript 3.0 :: Getting Syntax Error With XOR

Sep 1, 2010

Getting Syntax Error with XOR. My script is as follows[code]...

View 24 Replies

Xml :: Deleting A Particular Node Using The E4x Syntax?

May 24, 2011

I have this XML structure:

<numb>
<variable>
<name>john</name>

[code].....

View 1 Replies

ActionScript 2.0 :: Use Droptarget With Dot Syntax?

May 19, 2004

How can I replace this code to use dot syntax instead of slash?[code]...

View 1 Replies

ActionScript 2.0 :: Syntax With For Loop?

Dec 15, 2005

I've got a for loop and some fuctions working, but can't get one line of code to work. The red line below is what I'm having a hard time with. I'm calling a function called "moveit". If I insert moveit(x1, y1); then it works, and my movieclip is moved to the x and y positions that I specified for item #1. Though I want it to work for 10 items (I only have coordinates for two here, and will add the rest later).

I've searched my ActionScript book and just can't figure out what the syntax should be for calling that function.

[Code]...

View 14 Replies

Flash :: Getting CS3 AS 2.0 Syntax Error

Jun 2, 2009

I'm pretty new to Flash and my first project is my own on-line portfolio. I found (what I think is a Flash 5) code on this board to create an infinite menu. I'm trying to tweak it so that it works in AS 2.0 for CS3 and I keep getting a syntax error. [code]...

View 2 Replies

ActionScript 3.0 :: E4x Dot Syntax Not Working?

Jul 7, 2009

I think this should be pretty simple but I have been trying to figure it out for ages. I have an xmllist that i am creating from an xml object so I just get a list of nodes, I want to target each of the page nodes using square bracket syntax like this:

xml..page[0];

but for some reason it isn't working. My xml file is loaded in and is written below.I need to be able to target the nodes numerically,

xml file:
<?xml version="1.0" encode="UTF-8"?>
<root>[code].....

View 2 Replies

ActionScript 2.0 :: Using Variables In Dot Syntax?

Jun 8, 2004

This animation I'm working on has a dozen pairs of movie clips (with only two library items, one for each type in the pair) with instance names of the form "x" and "xgoal" (this is a drag and drop thing).When I'm writing AS for the "x" clip, how can I refer to its "xgoal" generally? I tried something like:goalName = this._name + "goal";And then using the goalName variable in my dot syntax (retrieving the _x coordinate for the goal clip):this.xgoal = _root.goalName._x;But, of course, that did not work. How can I get around this?

View 1 Replies

ActionScript 2.0 :: Using Droptarget With Dot Syntax?

May 19, 2004

How can I replace this code to use dot syntax instead of slash?

Code:
square.origX = _x;
square.origY = _y;

[code].....

View 1 Replies

ActionScript 2.0 :: Loop Through Array Syntax?

Sep 15, 2009

I have an array like this:

Code:

var myData = new Array();
myData["name"] = "John";
myData["Age"] = 35;

What is the syntax to loop through and get the key and value? I have tried for each and for in but they just give me the value of "John" or "35", how can I get the key e.g. "Name" and "Age"?

View 2 Replies

Flash Movie In Cs4 - Keep Getting Syntax Errors

Oct 27, 2010

i'm trying to make a simple flash movie in cs4. scene 1 > click a button > gotoandplay scene 3 thats all.

[Code]...

View 1 Replies

ActionScript 3.0 :: XML Parsing Issues Using E4X Syntax?

Sep 20, 2009

When I am trying to Parse the following XML using this code I am not getting any result..However if the xml file is truncated to have the <organizations> as the root node. I guess the problem is with the namespace, however not certain how to go about fixing it.been trying to resolve this for 3 hours now...

AS3.0 Code
var xmlManifest:XML = new XML();xmlManifest.ignoreWhitespace=true;var strManifestPath:String = new String("imsmanifest.xml");var urlrManifestURL:URLRequest = new

[code]....

View 6 Replies

ActionScript 3.0 :: Syntax Error In Concactenation?

Dec 5, 2009

I have a variable of type string which has been populated in Frame2( from an Input Text Field) with the name as g_Name.In Frame-4 I am performing a concatenation as mentioned below:var displayResult: [code].....

The problem is that it gives s Syntax Error for the second line.....

View 2 Replies

Add Extra Colors To Syntax Highlighting?

Jun 9, 2010

Is there a file or some code I could make in order to add an extra color or two for syntax highlighting? Like having a certain color for function names and a different one for numbers etc.?

View 1 Replies

ActionScript 1/2 :: Syntax For A Conditional Statement?

Dec 1, 2010

My son is doing a self-study course and is currently haviong a problem with the syntax of a condtional statement in Actionscript 2The folllowing code,

if (colour="red") {gotoAndPlay("BadEnd_red")}
else if (colour="blue")  { gotoAndPlay("BadEnd_blue")}
else  //colour ="green"  { gotoAndPlay("BadEnd_green")}

[code]....

View 3 Replies

ActionScript 3.0 :: Find The Syntax That Flash Uses?

Mar 24, 2009

I am looking for examples on typing the criteria for if /then statements, for loops, etc. Things such as the way to type "or" (|) and the way to say "not equal to", etc.

View 3 Replies

ActionScript 3.0 :: Dot Syntax Inside For Loop

Aug 11, 2011

I have put all button inside movieClip called "container" and I have added "container." inside for loop and now I am getting errors.
for (i=8; i<15; i++){
container.this["button" + btns[i].name.replace("btn","")].mouseEnabled = false;
}

View 7 Replies

ActionScript 3.0 :: #1086 Syntax Error?

Apr 2, 2012

I'm getting this errormessege whole the time and I've tried for days now to fix it. ATM I'm programming an android application using flash cs5.5 and AS3.The Error message Line1 Infobtn_15 :1086 Syntax error: Expecting semicolon before rightparen.

Multitouch.inputMode = MultitouchInputMode.TOUCH_POINT.*;
Infobtn.addEventListener(TouchEvent.TOUCH_TAP, fl_TapHandler_15);
function fl_TapHandler_15(event:TouchEvent);

[code].....

View 7 Replies

Java :: Convert Syntax To Actionscript?

Nov 22, 2009

I'm porting an existing java library to actionscript and since they are both realy similar, 95% of the work is simply flipping variable and function definition around.

public int foo(int bar) {}
//converts to
public function foo(bar:int):int {}

Is there a tool to automate the transition between java syntax and actionscript? I'm not looking to compile java to swf, just transform the source code to be (often nonworking) actionscript.

View 1 Replies

Actionscript 3 :: Incorrect Syntax Highlighting Vim

Jun 24, 2010

The braces shown below after ...ret):String are incorrectly being highlighted as red I'm using the following syntax definition file for actionscript: [URL] 2 Questions: Does anyone happen to know off-hand what causes this weird matching? Is there anyway of identifying the current syntax matching group under the cursor?

View 1 Replies

Flash :: Can't Find Syntax Error

Jan 17, 2012

have anyone can tell me what syntax error on this actionscript (actionscript3.0)?

var rotY: Number = (mouseY - (stage.stageHeight / 2)) / (stage.height / 2) * 400;

View 2 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved