ActionScript 2.0 :: Finding Part Of A Value In ._droptarget Name?

Apr 14, 2011

I'm doing a drag and drop type interaction. When the user drops an mc on another mc it will reveal a hint on screen. I want to determine the hint to display by the number contained in the _droptarget name (dragObj_mc1, dragObj_mc2, dragObj_mc3 etc). I'm then splitting that string into an array, converting each index back to a string and using indexOf to determine the number. I've got the following code which works but there must be a better way

ActionScript Code:
hintReveal_btn.onRelease = function() {
this.stopDrag();

[code]......

View 2 Replies


Similar Posts:


ActionScript 2.0 :: Finding _droptarget With A Swf

Nov 24, 2004

I am having trouble in finding target in a drag drop scenario. I have a movie placeholder named onepic1 and i load a movie using

Code:
onepic1.loadMovie(this.img1lnk);

[Code].....

View 1 Replies

ActionScript 2.0 :: Finding _droptarget With A Swf!?

Nov 24, 2004

I am having trouble in finding target in a drag drop scenario. I have a movie placeholder named onepic1 and i load a movie using

Code:onepic1.loadMovie(this.img1lnk);I load the img1lnk variable externally using

Code: img1lnk=onepic1.swf The SWF loads into the placeholder, NO PROBLEM in that!

And I identify a dragged object into that movie using

[Code]...

View 1 Replies

ActionScript 2.0 :: Telling A Null Value In The _droptarget Property?

May 23, 2002

Is there a way of telling a null value in the _droptarget property?

Basically I've got 9 draggable objects, and what I want them to do is if there is no _droptarget when you release the drag, flick back to it's riginal position.

View 2 Replies

ActionScript 1/2 :: .size ._droptarget - Change The Font Size Of TfNum_mc_.tf?

Sep 28, 2011

var tfNum_mc:MovieClip = tl.attachMovie("tfID","tfNum_mc_",tl.getNextHighestDepth());

If I'm to assign the above code to a dragDrop action. Is there a way to change the font size of tfNum_mc_.tf? I've tried;

tfNum_mc_.tf.size = 12;//did not work

var format1:TextFormat( = new TextFormat();

format1_fmt.size = 12;

tfNum_mc_.tf.setNewTextFormat(format1);//did not work

View 9 Replies

Regex :: If Part Of Substring Is True Then Replace Part Of Substring With Running Var?

Mar 9, 2011

Ok perhaps ive bitten off too much here...I know you are not supposed to parse xml/html to regex but the thing is there just arent many other options.Im using AS3.im parsing the source of textflowlayout text to a different format.

string to parse :

< fontFamily=Verdana encoding=unicode fontWeight="bold"> some text < fontFamily=Verdana encoding=unicode > some text < fontFamily=Arial encoding=unicode fontStyle="italic"> some text < fontFamily=Arial encoding=unicode fontWeight="bold" fontStyle="italic"> some text

what i really need is:

< fontname=Verdanabold encoding=unicode> some text < fontname=Verdana encoding=unicode > some text < fontname=Arialitalic encoding=unicode > some text < fontname=Arialbolditalic encoding=unicode > some text

logically i think of it as taking apart the string into substrings

checking if there are fontWeight or fontStyle in the substring

if there is then appending the font name with the weight or style so so that the font name becomes font NameWeightStyle.then rebuilding the string.The font could be any font with variouse styles or weights..so far:

pattern = /<(.*?)>/gixsm;
var matches:Object = pattern.exec(str);
var finalstring:String = "";[code]...........

View 1 Replies

Flash :: Flv/video Player Which Allows To Seek For Part Of Not Loaded Video Part?

Mar 11, 2012

I'am looking for a flv/video player which allow to seek for not loaded part of the video,just like on youtube.

View 1 Replies

Finding A Swf To Fla Converter?

Feb 8, 2008

finding a good swf to fla converter. I would love a trial version that lets me actually see the action script.

View 1 Replies

Finding Where An Instance Of An Object Is Placed?

Mar 7, 2011

I need to find an instance of a movieclip that is on my flash file. It is really big and uses a lot of memory. It says on the number of times used that there is one instance of the object on the flash file, but I can't find it. I thought I deleted them all but there must be one left. How do I go about finding it? It's a really large flash file with many layers, and I don't want to just delete the library file. Is there any way I can find where the object is placed in my file?

View 2 Replies

Finding The Mouse X And Y Coordinates?

Apr 18, 2011

I'd like to use the x and y mouse coordinates as variables in a program. I'm very new to Flash and ActionScript and I'm not even sure which classes I need to import or which listeners or handlers I need to use.

View 1 Replies

Finding A Good Swf To Fla Converter?

Oct 24, 2011

I am interested in finding a good swf to fla converter. I would love a trial version that lets me actually see the action script.

View 2 Replies

Finding Object At X And Y Coordinates

Oct 16, 2009

We have a client server architecture where a C++ server talks to Flash clients. I'm developing the server and would like to send through tcp an xy coord to simulate a button press where the receiving flash client would find the topmost visible object at that coord and send a mouse event to it such that we could simulate play without a human present. I'm told this is incredibly difficult, but it seems to me that there must be a way to do this. Am I off the mark? Or is there a mechanism in flash to iterate through all objects regardless of parent child relationships to find a visible button at an x, y coord and signal a press event?

View 2 Replies

Professional :: Finding The Help Files In CS5?

Feb 11, 2011

I am studying CS5 but I can't find help files or tutorials... is everything  online now? Where should I go for help?

View 3 Replies

ActionScript 3.0 :: Finding A Value In An Array

Dec 13, 2011

This should be a simple one. I am running an IF statement that needs to check the 5th value in a pre-populated array. I'm finding it hard to find the right method of searching the array.

[Code]....

indexOf seems to just return where the value is...but I already know where it is! I just want to know WHAT it is! There will also be values that are exactly the same in other positions in the array. I have to focus in specifically on the 5th value.

View 3 Replies

Flash :: Not Finding Crossdomain.xml?

Sep 2, 2010

I have a flash app hosted at The contents of that crossdomain.xml file are as follows:

<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE cross-domain-policy SYSTEM "http://www.adobe.com/xml/dtds/cross-domain-policy.dtd">

[code].....

View 2 Replies

Actionscript 3 :: Finding 2's And 3's Such That Sum Is A Given Number

Mar 18, 2011

I need to break a number down to be represented by a randomly ordered sequence of 2s and 3s.[code]I'm currently doing this with a loop in ActionScript 3 but have been looking into the possibility of using some kind of mathematical formula to save me a few lines of code. I'm a bit of a sop when it comes to Math and I've not yet found anything suitable.

View 4 Replies

ActionScript 3.0 :: Finding A MC And Removing It

Jan 8, 2009

At some point I will have created a MC on the stage. Later on, I want to put a different on in its place. The original MC may, or may not, be there.So I need to first check and see if it is there, whack it if it is, then add my new one.I know the name of the variable I used to create the MC, but I think the problem is I did this from INSIDE another clip. When I am trying to find it and remove it, I am outside that clip, so I don't think the main timeline knows of that variable. So when I try:if(ribbonEGM) removeChild(ribbonEGM);[code]How can I test and remove the ribbonEGM clip from the main timeline?

View 9 Replies

ActionScript 3.0 :: Finding Biggest Value Without Using An If

Jun 25, 2009

Does anybody know if there is a command to say: x= biggest value out of a,b,c,d,e ( without using an if )

View 2 Replies

ActionScript 2.0 :: Finding Of Node Value In Xml?

Jun 30, 2009

I have to find a node value in my xml, and where is this childnode there to reading the block.

[Code]...

View 0 Replies

ActionScript 2.0 :: Finding X And Y Coordinates Of A MC

Oct 6, 2011

I have made a few posts now, and I'd like to especially Prid for not only answering them, but for giving me guidance on how to learn AS2. I am progressing very nicely, and have made a couple of simple games without any tutorials, but theres one thing I couldn't find. I have this character which can move, up and down, left and right. I also have an enemy trying to shoot at him. However, this enemy needs to know where the character is. I already have the shooting code (Prid), but it was for shooting in the direction of the mouse. What I need now is to replace the bit of code that finds the mouse coordinates with code that finds the coordinates of the player.

The shooting code is on the frame (doubt that is important to say, but still) and the instance AND name of the Character is, well, Character. So basically, I need a code to calculate coordinates of a movie clip that does not have a fixed position. Oh and one more thing, should I post simple stuff like this in the beginner section, because I've seen waaay more complicated stuff there than in the AS2 section.

View 9 Replies

ActionScript 3.0 :: Finding Level Of Swf?

Feb 4, 2012

My main loads an external swf. Then it creates a bunch of ball movie clips on the stage. I need to reference the content from labeled frames in the external swf. In AS2 all you had to do was use _level.

View 6 Replies

ActionScript 2.0 :: Finding Any Value In Array?

Aug 26, 2005

I am wondering if Flash has a built in way of finding if a value in an array exists. IndexOf only works with string values, but I couldn't find any function that tries to find a value of any data type in an array.

If there isn't one, I will just end up using this:

Code:
contains = function (array, input) {
for (i=0; i<array.length; i++) {
if (array[i] == input) {
return 1;
}
}
};

I am trying not to use my own functions for things that Flash already has built-in, so I just want to double check with you all in case I missed something

View 14 Replies

ActionScript 2.0 :: Finding Out Where The Swf Is Embedded?

Apr 17, 2007

Is there a way in AS 2, to figure out where a swf is embedded, without the use of FlashVars? I have a widget that is being embedded on different sites, and some sites disallow the use of flashvars.I'm trying to figure out all of the sites that my swf is embedded on.

View 1 Replies

ActionScript 2.0 :: Finding Library Name

Aug 15, 2007

When I drag a movieclip from the library and create an instance on stage I can select it and look in the properties to see what it's an instance of. If I create the instance dynamically using attachMovie, how can I find out what it's an instance of?

View 5 Replies

ActionScript 2.0 :: Finding The Highest Y Value In 2.0?

Aug 13, 2008

I have a shape and I want to find out what the highest y value is for an x value.Example: I have an oval, and with width 200 px. I input an x value like 78 px from the left and I want to know what the highest y value is that matches the x value (the top of the oval at point x)

View 3 Replies

ActionScript 3.0 :: Not Finding One Child?

Apr 18, 2010

I'd calling out

trace(this.parent.numChildren);

which returns me "2". Now, when I call out

trace(this.parent.getChildAt(1));

it returns me "null".

What is the problem as there are two movieclips in the parent called "sb" and "content".

View 1 Replies

ActionScript 3.0 :: Finding Which MC Is On Top Of Layers?

Jun 21, 2010

I have to resolve a problem I encounter to find the equivalence between menu links and displayed pictures. (in order to highligh the good menu name) how I can find and trace which MC is on top of a defined layer. All these MC were created dynamically from an Array.

View 2 Replies

ActionScript 3.0 :: Finding Num Of Children?

Sep 12, 2011

how to find the Num of Children in a particular case, as below. I am trying to figure out how many birds are there at a particular time, so that I may control their growth.

Code:
var timer: Timer = new Timer(500, 45);
timer.addEventListener(TimerEvent.TIMER, timerFunc);
timer.start();

[Code]....

where to use "parent", "this", and "root" etc. it can help me for the future as well.

View 5 Replies

ActionScript 2.0 :: How To Add The PHP Part

Jul 26, 2009

Here is the code I have in my flash

System.useCodepage = true;
send_btn.onRelease = function() {
my_vars = new LoadVars();

[code]....

I need help figuring out how to add the PHP part, I have no idea about how to script it. I looked over some tutorials but I just don't understand it. I got this code from when I was in college, I used it before but I can't find the original PHPcode I used. It's for my website, just a simple email form with a name, email, and message

View 2 Replies

CS3 :: Finding A Standalone Flash Player?

Apr 2, 2009

What should I use to test my swf movies on another (not my development machine) ?When I open them with IE or firefox the Flash active x player doesnt have the zoom 100% option so I end up with distorted (resized to window) swf is there a standalone flash player for that kind of purposes or something?

View 1 Replies







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