ActionScript 2.0 :: Referring To The "updated" Mc After _name Change?

Sep 27, 2003

I have multiple mc (from the same parent), and I have changed the _name property (depending on their depth) thro action script, my question is how do I *refresh* them (without removing and attaching them) so when I refer to them by _name I know I am refering to the "updated" mc after _name change.

View 3 Replies


Similar Posts:


Flex :: Detect The Change In HSlider When Value Is Updated?

Jul 6, 2011

Is there a way to detect the value change in HSlider (in Flex 4.0) without touching the slider.Basically, what I wanted is to detect if the slider value was changed programmatically.

View 1 Replies

Flash Datagrid Change Cell Color Depending Upon Updated Data

Apr 27, 2011

I have a datagrid in my Flash app whose data keeps updating quite frequently.On every update, I need to change the cell color of only those cells whose data has changed.That too, if the updated value is less than the older value then the cell color should change to RED else, GREEN.I have tried using labelFunction, cellrenderer, etc. But to no avail.By no means, I am able to access the present data in the cells to compare it with the new data.

View 1 Replies

ActionScript 2.0 :: _parent._name Not Showing Up

Nov 6, 2011

ok since no replyes to my last post ive added an example: basicly in root i have this code:

var container_mc:MovieClip = this.createEmptyMovieClip("container_mc", this.getNextHighestDepth());
attachMovie("button_mc","button_mcadded",_root[container_mc]);

[Code]....

View 1 Replies

ActionScript 2.0 :: Determining MovieClip._name From MouseClick

Jan 11, 2005

I want to get the name of a movieClip when it under a mouse click, but I don't want to attach any code to the movieClip. I am creating a simple colouring game, but I want it to be easy and quick to change the pictures that are being coloured, so I wanted to avoid adding any code to the movieClips that are being coloured.

View 2 Replies

ActionScript 2.0 :: Determining MovieClip._name From MouseClick?

Jan 11, 2005

I want to get the name of a movieClip when it under a mouse click, but I don't want to attach any code to the movieClip.I am creating a simple colouring game, but I want it to be easy and quick to change the pictures that are being coloured, so I wanted to avoid adding any code to the movieClips that are being coloured.

View 2 Replies

ActionScript 2.0 :: Make A Simple SWITCH Statement With Button._name As Variables?

Jun 18, 2007

I want to make a simple SWITCH statement with Button._name as variables for CASE

so i got this code:

Code:
Button.addListener(_root);
_root.onRelease = function() {

[Code]....

View 2 Replies

ActionScript 2.0 :: Referring To URL In XML?

Dec 21, 2006

This is my problem: I've got a couple of movieclips, when I click on them I want them to open the URL that I've typed in my XML-file.(The photos are thumbnails stored inside of the movieclips)Here's my XML:

Code:
<?xml version="1.0"?>
<select name="photos">
<option photo="film14" url =">[code]....

How do I refer to the url-code in the actionsscript?

View 4 Replies

Professional :: CS4 Referring To A Label

Feb 20, 2010

Now that I've set labels, I'm trying to create actionscript code to go to the labels. Here's an example of my code:
 
btn_me.addEventListener(MouseEvent.CLICK, gotome);
function gotome(event:MouseEvent):void{    gotoAndPlay(me);}
 
This code has been borrowed from the online video - Getting Started 18: Building an Application. Of course, in that video explicit frame numbers are used so the code looks like gotoAndPlay(15). I'd prefer to use labels for obvious reasons. My question - how do I tell Flash that 'me' is a label? I expect I need to use a special character and I've already tried gotoAndPlay(#me) but that gives me a Syntax error.

View 3 Replies

ActionScript 3.0 :: Referring To A Movieclip?

Nov 23, 2009

i need to refere to a whole bunch of mc named a1, a2, a3, a4, a5 and var who:MovieClip="a"+3 dosnt work...

ActionScript Code:
import gs.TweenLite;
stop()[code].............

View 1 Replies

ActionScript 2.0 :: Referring To Another Object?

Apr 12, 2010

I have a small Flash file where I control a ball.In ActionScript 2.0, I have it to where this ball moves around based on input from the Arrows on the keyboard. It also bounces off the edges.I added a new separate ball (not the same symbol) and I want to refer to the NEW ball's X and Y coordinates to see if I am running into the new ball. How do I refer to the other ball's (or any other object for that matter's) properties from within the ActionScript of the first object?

View 2 Replies

ActionScript 2.0 :: Referring To A Variable

Apr 17, 2003

say i have this code: blah = "123 + i" so blah is a variable right? so how would i refer to this variable? i want to be able to do: _root.blah.onPress = function () but this won't work beause you need an instance name instead, so how would you do this? thx, i hope you understood what i was saying

View 9 Replies

ActionScript 2.0 :: Referring To A Movieclip?

Feb 7, 2006

Code:
var l = 2;
duplicateMovieClip(button, "button"+l, this.getNextHighestDepth());

[code].....

View 4 Replies

ActionScript 2.0 :: MC - Referring To Instance Name

Mar 31, 2006

im trying to, to make my MC have a rollover effect but my movie clip had been added by Action Script so this doesnt work

[Code]...

View 5 Replies

ActionScript 2.0 :: Referring To One Level Down?

Jan 29, 2008

How do you refer to the level one below the current level . I know _root refers to the bottom level, parent refers to one level above but I don't know what to use for one level below. Otherwise, is there a way to refer to a level by its name?

For my needs, I have a clip portfolio.swf that is loaded into a Base flash file. Within portfolio, is a loaded movie called Gallery.swf. Gallery contains a movieclip called Thumbnails which has buttons to load various image.swf files. Also within Gallery is an empty movieclip called "ContainerMC" which is where image.swf are loaded into when called upon by the thumbnail buttons. From within Thumbnails, I want to be able to refer to that movieclip "ContainerMC" which those selected image.swf files are loaded into. I can't use _root as that will refer to the base flash file. I can't use "this" as that refers to the Gallery file.

View 2 Replies

ActionScript 3.0 :: Referring To Clip By Name?

Mar 15, 2009

I have created a loop to add my clips by class and give them a name

tempClip = new clientsThumbs[i]();
tempClip.x = xPos;
tempClip.y = yPos;

[Code]....

How do I reference my instances by name

View 1 Replies

ActionScript 3.0 :: Referring To Instance With Variable?

Jul 23, 2009

I'm trying to access an instance by using a variable but when I try to manipulate a property to the instance (by referring to it with a variable) it only recognizes it as a string... for instance... (pun intended??)
public var prevbutton:String = "btn1";
trace(["page"+prevbutton]);
// which traces - pagebtn1
trace(pagebtn1);
// which traces the instance class - [object btn1pageclass]
I want to call the instance by using a variable... how do I do this?

View 11 Replies

ActionScript 3.0 :: Referring To Movieclip Within Object?

Mar 4, 2010

I have an object that I add movieclips into when a user does something.

I'm trying to loop through the items in this object later and perform something when object.objectName = something, however I'm finding it hard to get the right code to use in place of the something.

code within a function that adds movieclip to object:

Code:
if (thisHImage==1) {
healthArray[healthIndex] = new mcCake();
}

[Code]...

when i trace(healthO.objectName) i get [object mcCake], but it won't enter the if statement,

View 2 Replies

ActionScript 3.0 :: Referring To Nested Sprites

Jun 3, 2011

What I am basically trying to do is Like,the yellow boxes are dynamically made,with Actionscript Code: new Sprite(); inside that red and blue are also made with new sprite(); with instance names yellow1(red1,blue10),yellow2(red2,blue2) etc... How can I refer to yellow1.red1?Like,these are dynamically made,and i dont know the limit,like say it adds on with each click,It will make Actionscript Code: 'yellow'+i and red+i etc... How can I refer to the ith sprite when the user clicks?Suppose the user clicks yellow5,I want a reusable code that will refer to yellow5.red5

View 1 Replies

ActionScript 3.0 :: Referring To A Frame In A Different Movieclip?

Jul 8, 2009

I have a button located in a movieclip which I want in its overstate to gotoAndStop a particular labeled frame located in a different movieclip. How do I go to a frame of "movieclip A" by interacting with an element of "movieclip B"? Must I sever the relationship between the button and the movieclip its in which I wouldn't want to do...?

View 3 Replies

ActionScript 3.0 :: Referring To A UILoader In Parent?

Oct 12, 2010

I have a button nested in a moveiclip within a larger flash file. I'm trying to have the button launch another swf file in a UILoader that is nested in the parent of this movieclipI thought that the following code would work to refer to a UILoader in a parent movieclip, but it didn't

archGallery.addEventListener(MouseEvent.CLICK, goArch)
function goArch(e:MouseEvent):void {
loadWindow.(this.parent).source = "archGlider.swf"

[code].....

View 5 Replies

ActionScript 3.0 :: Referring To A Child Instance Name?

Oct 6, 2009

still cant get my head around this..iv created balls inside a function is there a way to reference them out side of the function? with addChild() do they get instance names?

ActionScript Code:
makeBalls();
function makeBalls() {
for (var i:int=0; i<10; i++) {[code]...........

View 1 Replies

ActionScript 3.0 :: Referring To Stage Before Added To It

Jan 21, 2010

've been trying to figure out how to refer to the stage from a Sprite before it is added to the stage.

I'm working on a small program in which I plan to use external classes for each "window" that comes up. I've made the window classes extensions of Sprite. I'd like to make this window add itself to the stage when its constructor is called, and then just remove it from the window class when I'm finished with it. Is this a good idea? I'll post some of my code to show you what I mean.

This code doesn't work. I get the error "type was not found or was not a compile-time constant: Stage"

From my window class:

ActionScript Code:
public class PlayerSelectionWindow extends Sprite{
var stg:Stage;

[Code]....

View 2 Replies

ActionScript 3.0 :: Referring To An Instance That Does Not Yet Exist

Dec 6, 2010

The constructor class has the following code:

Code:
//Phase 2: Parse XML Data
internal var xmlParse:ParseXMLData;

[Code]....

View 7 Replies

ActionScript 2.0 :: GetURL Referring To An Anchor Name?

Jan 26, 2006

I'm using a little flashmovie as a button on a website, and I'm trying to link it to not only a certain page but also a specific place on that page. Right now I'm using the following code:

getURL("SS-nieuws-flash.htm#opendagen", "_self");

This only gets me to the right page, but not the right place on that page. Can this be done in Flash. I haven't been able to find any examples of it in the manual or on the web.

View 1 Replies

ActionScript 2.0 :: Referring To Movie Clips?

Oct 27, 2006

altering values of movie clips (couldnt think of another way to put it)say i need to change the _x of movie clip ##_mc

# being variables
i would normally use:
tellTarget ("_root."+A+B+"_mc")
{
_x++;
}

since the i cant just say _root.G5_mc._x++; cuz i dont know if its G5_mc or G4_mc (follow? im horrible at explaining things!)is there any other way of doing this? or do i have to use tellTarget?

i tried:

"_root."+A+B+"_mc._x" += 1;

but it didnt like that too much

View 5 Replies

ActionScript 3.0 :: Referring To A Variable Within A Class?

Feb 5, 2009

I have found a tutorial which shows me how to create a class. It also shows me how to construct an object in the main code. What I want to do is to access a variable from the object that I made. Heres the code...This is the link to the tutorial:http:[url]....

Code:
package
{
public class Car [code]....

Then I use this code to construct the object, which in this case is a car (the code is in my main flash file):

Code:
var mycar:Car = new Car("Porche", 3.2, 4, "Normal doors");

I understand all of the code, but how do I reference a variable like the engine? I have tried lots of things like "trace(this[mycar] .engine)", "trace(mycar.engine) but nothing seems so work. I just get error messages of property undefined.

View 4 Replies

ActionScript 3.0 :: Referring To Nested Items?

Mar 15, 2009

I must be doing something very stupid here. I have a tab-based menu that has different states for different purposes. I store these states in an Array and have a function I can call when I need the menu to change, which works fine.

But what I cannot at all understand right now is how to access the elements inside the newly create tabs (to add EventListeners for example).

[Code]...

View 4 Replies

ActionScript 3.0 :: Referring To On-stage Movieclips From An Array?

Jan 14, 2009

I have a movieclip on the stage in which I have some 90 movieclips also on the stage.

I created an array to hold the movieclips. But when I try to add eventlisteners to these movieclips by cycling through the array, I get a 1009 error ("Could not parse the XML. Error #1009: Cannot access a property or method of a null object reference.") Oddly, however, the application seems to work correctly, handling my listener events.

On the other hand, if I add eventlisteners for each movieclip individually, all works fine--no errors are thrown.

View 4 Replies

ActionScript 3.0 :: Referring To Functions On The Stage From A Movieclip?

Mar 2, 2010

I just started "coding" in AS3. By "coding", I actually mean trying around with features and generally trying to grasp the vast amount stuff you can do with this software of. I have some coding experience, however the way  Flash likes to hide code snippets all over my project does tend to confuse me. Not knowing where I tried putting the code and/or rewrote some other stuff keeps me sorta busy.
 
Anyway, my issue is this:
 
Messing around with movieclips inside movieclips, I've keep encountering the error "1120: Access of undefined property onTimerComplete." I do realize that this error generally is caused by not having defined an instance correctly or not having it defined at all - an error beginners tend to make. Nonetheless, I'm not trying to refer to an instance/symbol, I am trying to call a function defined on the stage from within a movieclip that also is placed on the stage.

I've been reading huge amounts of text/articles and how-to 's, but they all seem to only touch the subject lightly or simply going in head-first - becoming far too complicated for me (a beginner) to grasp.
 
So, trying to sum my questions up into something that looks like a tl;dr:
 
- What's up with levels, "_root" and referring to functions like in the older versions of flash?

Flash tells me to use some display-package instead of _root, when I use that... (I do realize the article is from Flash 5.0)
 
- How do you refer to a function defined on the stage, from inside a movieclip? (The function is a timer, that is supposed to make the mother-movieclip continue to the next child-movieclip.)

View 7 Replies







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