ActionScript 3.0 :: Exact Same Strings Not Equalling?

Jul 12, 2009

Code:
var messages:Array =
[
"SWEATSHIRT"[code].......

I have a text box called whatToClick which contains the words (copy and pasted) SWEATSHIRT. As such, that should trigger checkMask(), which checks if the clicked item is the same as the one in the text box. While running various trace commands, the string traces out exactly the same, capitals and all. But this always runs the else instead, which means the if isn't true.

View 9 Replies


Similar Posts:


ActionScript 3.0 :: Exact Same Strings Not Equaling?

Jul 13, 2009

Here's my AS:

ActionScript Code:
var messages:Array =
[
"SWEATSHIRT",

[code]....

I have a text box called whatToClick which contains the words (copy and pasted) SWEATSHIRT. As such, that should trigger checkMask(), which checks if the clicked item is the same as the one in the text box. While running various trace commands, the string traces out exactly the same, capitals and all. But this always runs the else instead, which means the if isn't true. [URL]

View 4 Replies

ActionScript 3.0 :: Push Multiple Strings Into An Array, And Some Of The Strings Are The Same?

Aug 24, 2009

I work on AS3 one week, and then take a break for a few weeks, then work on it a day, take a break, etc.. So I forget some of the basics, and need refreshers. I think I need to stop taking breaks.

Problem: I push multiple strings into an array, and some of the strings are the same.

Code:
var myArray = new Array();
myArray.push (Snivvle);
myArray.push (Kirupa);
myArray.push (Snivvle);

I want to find out which element positions "Snivvle" hogs up. We can see that it would be using element 0 and 2, and if we do an "indexOf" we would only get to see element 0, and doing a "lastIndexOf" we would only see element 2. How do I find out ALL of the element positions "Snivvle" is located in, so that it returns: element 0, element 2.

View 2 Replies

Descriptions For Each Product To Appear In The Exact Same Place

Jun 8, 2009

on my stage are 5 buttons, each with the name of a product.  i want to be able to hover over each product and see a Description of the product with a "learn more" link at the bottom of the description.  the problem is that i want the Descriptions for each product to appear in the exact same place.
 
if the hit area of each button covers only the button itself, you can't click the "learn more" link because it disappears when you move off the buttonif the hit area of each button covers the Description area, the hit areas overlap each other.  this causes the Description to always show the same thing (i think it is the Description of the last button i added) if you are hovering over anything besides an actual button. 

View 6 Replies

ActionScript 3.0 :: Get The Exact Number 19.99 * 100 - 1999?

Aug 9, 2011

I've got a problem when I need to display (19.99 * 100 - 1999) on the screen. When I trace it, it will show -2.27373675443232e-13. The problem is that 19.99*100 != 1999. I can use Number(( 19.99*100 ).toString()) to get 1999 exactly using Action Script 2, but this method failed using Action Script 3.

View 3 Replies

Finding The Exact Length Of An XML Node?

Sep 12, 2011

I have decided to give XML a go, so I thought I would start with something small : ) and give creating a dynamic menu a try.

I load my menu headings using textField and I can not get my code to find out the actual length of each menu heading. It all produces 100. I wanted to get each individual lengths so I can divide it by 2 and positon that to the center of my menu buttons.

I am also try to turn my menu buttons into buttons, so I can add my eventlisteners, but it doesnt seem to work. The menu text seems to get in the way, even though I made them non selectable.

This is my XML code

Code:

<?xml version="1.0" encoding="utf-8"?>
<menu_list>
<menu title="1">Home</menu>
<menu title="2">About Us</menu>

[Code].....

View 12 Replies

Flex :: How To Get Characters Exact Position In TLF

May 2, 2011

Any way to get the exact position for every character inside a textflow?, also I'm having trouble with the TLF documentation, is there anny documentation that shows more on how to work with it in actionscript rather than mxml, I am looking to write my own component and perhaps not use richtexteditor if I don't need to. How to get each characters position in the textflow:

private function getCharPosition():void {
for (var i:int=0; i<=textController.flowComposer.numLines; i++) {
var textFlowLine:TextFlowLine = textController.flowComposer.findLineAtPosition(i);
var textLine:TextLine = textFlowLine.getTextLine();
trace('number of atoms in this line: ' + textline.atomCount);
[Code] .....

This returns an error that's why I have try and cache, I have tried to change textLine.atomCount to -1 but that wont work either. Now I don't know what character exactly that I have the position for.

View 1 Replies

ActionScript 3.0 :: Recording With 2 Exact The Same Webcams?

Oct 19, 2009

I hav ea problem with recording (or even showing) the video of 2 separate webcams which are the same type, brand etc. Somehow one shows its stream and the other one doesn't.

ActionScript Code:
var widthPos=Math.ceil(Math.sqrt(Camera.names.length));
var heightPos=Math.ceil(Camera.names.length/widthPos);
var tWidth=640/widthPos;
var tHeight=480/widthPos;

[Code]...

View 0 Replies

ActionScript 2.0 :: Masking An Exact Shape

Apr 7, 2004

id like to mask an exact shape so i can do some cool animations that are only seen over that shape.

example:

lets say i have a big letter 'P' that i made in photoshop and import it into flash. i made the background transparent and saved it as a .png file. so then i place a 'P' on stage that i want to be visible and i place another one directly on top of it to act as the mask. when i use set mask in this situation it doesnt use the shape of a 'P' is uses a box of some weird dimension.

View 2 Replies

IDE :: Draw Lines With Exact Length?

Apr 15, 2010

I would like to have a possibility, where a user could draw simple lines, but with exact length (5000mm, 3150mm, 3950mm etc).where a user could just click and see the lines. Together these lines would make a floor plan for a house. These lines don't have to have thickness, because it will be just a sketch where walls are located. After user has drawn the sketch i would need the program to generate a text file with coordinates of the lines.

View 3 Replies

ActionScript 2.0 :: Masking An Exact Shape?

Apr 7, 2004

id like to mask an exact shape so i can do some cool animations that are only seen over that shape.example:lets say i have a big letter 'P' that i made in photoshop and import it into flash. i made the background transparent and saved it as a .png file. so then i place a 'P' on stage that i want to be visible and i place another one directly on top of it to act as the mask. when i use set mask in this situation it doesnt use the shape of a 'P' is uses a box of some weird dimension.

View 2 Replies

CS4 - Tweening To End On Exact Copy Of Original Keyframe

Apr 23, 2010

I have made a tween using the new tween feature in CS4. I would like the tween to end on an exact copy of the original key frame so that it will loop seamlessly but I just cant figure out how to do this. I am unable to just recreate the keyframe because the object has rotated and moved to much to. I can do this with a classic tween but cant achieve the same effect.

View 1 Replies

Flash :: What Is The Exact Difference Between Both The HitTest Methods

Aug 3, 2010

What is the exact difference between mc1.hitTest(mc2) and mc1.hitTest(mc2._x,mc2._y,true)

View 2 Replies

Actionscript 3 :: Synthesize Exact Frequencies On Flash?

Apr 5, 2011

I've researched a bit and I discovered a way to generate sounds dynamically on flash:

import flash.media.Sound;
var mySound:Sound = new Sound();
mySound.addEventListener(SampleDataEvent.SAMPLE_DATA, sineGenerateSound);

[Code]...

I would just like to know how I can make it generate the exact frequency I need, for example 100Hz.

View 3 Replies

ActionScript 3.0 :: Cannot Push An Object Into An Exact Same Array With A Different Name?

Jun 21, 2009

I have two arrays on my Globals.as document:

ActionScript Code:
public static var special:Array = [];
public static var ground:Array = [];
public static var playertouchme:Array = [];

I go to push an object onto one of the arrays:

ActionScript Code:
Globals.special.push( this );

That works fine. However, when I replace it with:

[Code]....

I get this error:

[Code]....

View 4 Replies

ActionScript 2.0 :: Load External Swf In The Exact Place?

Oct 7, 2005

I bought a template website and I understand pretty much all of the AS by now that they use. But I would like to decrease the file size so I wanted to load things externally. Here's a layout:Main Timeline:page1movieclips of all kinds plus a thumbnail scrollbar to load some other movieclips inside page1.page2page3page4code on the buttons inside the thumbnail scrollbar:

on (rollOver) {
gotoAndPlay(2);
}

[code].....

View 1 Replies

ActionScript 2.0 :: Calculate The Exact Position And Scale?

May 15, 2006

imagen I have a movieclip (space_mc) w1000Xh1000 px?

inside the space_mc I have 2 movieclips:
- vlak1_mc (w100xh100px, _x:100,_y:100);
- vlak2_mc (w100xh100px, _x:400,_y:400);
ok!?

now i put the space_mc on the stage and scale it to 20% the stage (document properties) are w800xh600

Now i want that the USER clicks on vlak1,2_mc and the space_mc scales to 100% But the clicked vlak(1,2)_mc must have the exact coordinates as in the space_mc?

so if clicked on the vlak1_mc!

the space_mc zooms in to 100% and the _x,_y of the vlak1_mc are x100,y100 on the stage(800x600)?

[URL]

View 1 Replies

ActionScript 3.0 :: Loading Image To An Exact Size?

Jun 25, 2009

how can i load an image to an exact size in the movie clip ?

lets say i have an img which is 1000X1000 and i want to leave it at the same proportion but display it at 800X800

View 2 Replies

ActionScript 2.0 :: Exact The Sound From This Avi File So That I Can Use It In The Flash?

Feb 16, 2002

I want to record speaking and used in the flash. But I don't have digital recorder or something like that. I then use digital camera with the ability to record about 10 secs movie with sound. It's an avi file. so anybody can tell me how to exact the sound from this avi file so that I can use it in the flash.

View 7 Replies

ActionScript 2.0 :: Make An External Swf File Exact Size?

Jan 13, 2010

I have a script that calls for an external swf file. It can import the file no problem but it is always the same size. The problem is that I made the swf file with smaller dimensions and it is still to larger in my window.[code]...

View 1 Replies

Flash :: NetStream.seek() For Mp4 To Exact Position Not Keyframe?

Jul 26, 2010

It seems seek() on mp4 file seeks to the closest keyframe (seekpoint). Is it possible to seek to exact position in between of keyframes?

View 2 Replies

AS3 :: Flash - Get Exact Size Of Movieclip If Stage Scaled?

Jun 9, 2011

How do I get an exact width and height of a MovieClip if it was scaled on stage resize?

for example if I have:

stage.scaleMode=StageScaleMode.EXACT_FIT;
stage.addEventListener(MouseEvent.MOUSE_DOWN, checkSize);
function checkSize(e:MouseEvent):void{
trace(mc.width);
}

It will always output the same width and height no matter how big or small the stage is. Is there anyway to get exact current size?

View 2 Replies

ActionScript 2.0 :: Simple NetStream Put The Exact Same Code Within A Function

Jul 17, 2009

This seems like a simple problem but I can't seem to figure it out. If I use this standard code from the reference:

ActionScript Code:
var nc:NetConnection = new NetConnection();
nc.connect("rtmp://myserver/");
var stream_ns:NetStream = new NetStream(nc);
my_video.attachVideo(stream_ns);
stream_ns.play("myflv");

the video streams fine, but if I put the exact same code within a function like this:

[Code]....

View 9 Replies

ActionScript 3.0 :: Making A Sound Play At Exact Millisecond?

Jan 9, 2011

I'm having trouble making a sound play at an exact millisecond sinde framerate and timers are not 100% precise. First I tried creating a timer and playing the sound every second. But this causes delay. I can't think of any other way... I'm trying to create a game that marks the rythm precisely by playing small sound clips every specific amount of milliseconds.

View 3 Replies

ActionScript 3.0 :: Get Exact Size Of Movieclip If Stage Scaled?

Jun 9, 2011

How do I get an exact width and height of a MovieClip if it was scaled on stage resize?for example if I have:

ActionScript Code:
stage.scaleMode=StageScaleMode.EXACT_FIT;
stage.addEventListener(MouseEvent.MOUSE_DOWN, checkSize);

[code]........

View 3 Replies

ActionScript 2.0 :: Listener Know The Exact Coordinates Of The Mouse, And Control It?

Mar 24, 2005

I want to know how can a listener know the exact coordinates of the mouse, and control it(move the mouse to 100,100 for example).I used this:

lis=newObject(); //Listener
lis.onMouseMove=function(){ // Iwant this function to be able to control the
//mouse position[code]...

View 3 Replies

Actionscript 3.0 :: Opening New Window, Exact Size With A Button

Oct 14, 2010

I'm looking for code which will use my buttons instance name and when the button is clicked a new window will open up a new web page at the exact size referred to in the code. I tried playing around with this code but it comes up with errors.

test_btn.addEventListener(MouseEvent.MOUSE_DOWN, mouseDownHandler1);
function mouseDownHandler1(event:MouseEvent):void {
navigateToURL("hhtp://www.website.com/onlinesurvey.html","_self";
var jscommand:String = "window.open('http://www.website.com

[Code]....

View 2 Replies

ActionScript 2.0 :: Create EXACT Duplicate Using DuplicateMovieClip Function?

Mar 16, 2006

how to create something like that? With all the subMCs that were attached dynamically, and variables and so on..

View 1 Replies

IDE :: CS4 - Retain Newlines In To Send Exact Data In As Email?

May 19, 2010

I am using multi line text input in flash. Predefined text it sends as it is. I application when i edit text and send there are no new line. All text comes in single line.

View 1 Replies

ActionScript 3.0 :: Connect To Sql Server Ex 2008 To Be Exact Or Is It Easier With Other DB's?

Oct 16, 2010

How easy is it for as3 to connect to a database? I want to connect to Sql server ex 2008 to be exact or is it easier with other DB's?

View 2 Replies







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