ActionScript 2.0 :: Display The New Instance's Position And Instead Report "undefined"?
Nov 2, 2005
the following code won't display the new instance's position and instead report "undefined"?
Code:
row = column = 0;
for (i=0; i<30; i++) {
for (j=0; j<20; j++) {newNoc = "noc_" + row + "_" + column;
[Code]...
View 2 Replies
Similar Posts:
Jun 17, 2005
Is there something in actionscript that allows you to get an mc's instance name or a way to make an mc report it's instance name?
For example something nice and easy like this would be: this._whatIsMyInstanceName
I would like to build something like the following into an mc I'm using that is being attached in multiple instances:
Code:
this.onRelease = function(){
_parent.changeTheColourOfThisMCWithoutKnowingItsInstance(this._whatIsMyName);
}
View 3 Replies
Mar 10, 2010
After dragging many MovieClips/Components onto the stage, how can I generate a report (or display on screen)by listing the names,parameters, values of all the movie clips/ components dragged on the stages?
View 5 Replies
Feb 21, 2008
how do you do this...if (you rollover instance 'imgsmall' ) then
display visible instance 'imglarge' then
rollout (instance 'imgsmall') then do not display 'imglarge'
View 2 Replies
Sep 12, 2007
I have a named movieclip instance coming up undefined in AS2/CS3. the movieclip is on the stage, and I am having trouble accessing it from actionscript. does anyone have any ideas what might be causing the problem?
View 1 Replies
Nov 1, 2010
I've got a movieclip in my library called primaryCommMC.I'm loading these 5 times onto the stage and naming them commMC0-4 using the following:[code]Right now they're all obviously loading on top of each other. I want to stack these movieclips on top of each other so the first movieclip will be at y=0 and the following at y=(the height of the proceeding MC + 5 (a little gap)).
View 1 Replies
Nov 18, 2009
How can I obtain the position of a instance whose name is stored in an variable? If there is a instance whose name I don't know, but the instance's name is store in an variable x. How can I obtain its position?
View 4 Replies
Feb 3, 2011
i'd like to count and get position of instance of the same type in the stage.
i have tried:
var target;
for(var item in _root){
if(_root[item] instanceof MovieClip || _root[item] instanceof TextField){
[Code]....
but it says access to property _root undefined, and instanceof deprecated
View 1 Replies
Oct 22, 2010
basically, I am trying to create an instance at the correct position. I understand that I will have to utilize globalToLocal() and/or localToGlobal() to get relevant positions, but for some reason, I can't position the instance at the correct location. here is the codes:
parent class:
Code:
//create bullet
bulletList.push(new Bullet(100, 100));
addChild(bulletList[bulletList.length - 1]);
Bullet class:
Code:
x = localToGlobal(new Point(pX, pY)).x;
y = localToGlobal(new Point(pX, pY)).y;
pX and pY are the arguments for the Bullet Class. When I do this, it is shifted over 100, so the absolute position being x = 200, y = 200, and the local position being x = 100, y = 100.
View 4 Replies
Feb 22, 2011
I have an instance, hero linked to class Hero.as, and enemy instances "enemy1", "enemy2", "enemy3", each linked to Enemy.as class. From inside the Enemy.as class I would like to know the position of the hero instance and be able to move them accordingly towards the hero. If I was working from within the document class I could do something like hero.x and hero.y to get the x and y position of the hero.
View 1 Replies
Feb 1, 2004
How to get the _y position of a movie instance generated by the AttachMovie method? I'm trying to do something like this.
_root . mc full of attachedMovie instances . one of those clips . _y
The path I'm really using looks like:
_root . text . infoblock4 . _y
View 3 Replies
Mar 18, 2010
I'm currently dealing with a very annoying problem, for which I can't find any solution, because - as I think - it does not result from a AS coding mistake but more or less has to do with the rendering of the swf.I am generating a seamless tileable stripe out of a few symbols. Then I am creating an endless animation that scrolls that stripe up. The scrolling is implemented as follows: I'm creating a second BitmapData of 500pxl height, that with every frame scrolls all its pixels 10 pixels downwards and then copies the 10 "missing" pixels at the top from the appropriate position of the prepared seamless tileable stripe.
During the animation there seems to be (at least on less performant systems) some kind of flickering (stripes tthat look like the animation wouldn't use a seamless tileable stripe - ALTHOUGH IT DEFINITLY DOES!!!)...The only guess I have - that it could result from a unsynchronized rendering of the swf..To the right you see a section of the prepared seamless tileable stripe from which these 10 pxl sections are copied.
View 2 Replies
Aug 11, 2009
What it says on the tin: I have an XMLList, and I want to find where in it a particular XML item falls. First index is good enough for my purposes. Note that I have no problem writing a function to do this by hand... but I was hoping that the API has something buried somewhere that'll do it for me. I didn't see it, though.
View 2 Replies
Dec 7, 2009
What I want to achieve is to display the XML data once I click the button. But I kept getting undefined error.Here's what I have:
t1.onRelease = function (){
xmlDoc = loadXMLDoc("bestofposts.xml");
x=xmlDoc.getElementsByTagName("message")[0].childNodes[0];[code].....
View 6 Replies
May 7, 2010
I am currently working on a shooting game, its also a trial for me to use Classes and Packages.My set up is the stage holds the player, the script then adds 2 movieclips, enemy holder and a bullet holder. The bullet is then added to the bullet holder.
Here is what I have:
[code]...
How can I find the player, or any other instance?
View 5 Replies
Apr 19, 2009
hey guys i have 6 moveable objects, what i want is to be able to click a button and a text field appears that displays the x and y co-oridinates off each object, is this possible and if so is there a way also i could have another button where the user inputs the numbers he wants from x and y and the objects will go to that posisition
View 1 Replies
Apr 21, 2003
is there a way to follow-up on a bug report that i submitted i have the bug number, but would like to see if the report was understood, filled out properly and determine the status of the bug report.
View 7 Replies
Nov 3, 2009
I am using Macromedia Flash 8, trying to show the detail positioning of mouse pointer in button through video tutorials but following errors appears:
**Error** Scene=Scene 1, layer=Layer 1, frame=1:Line 1: Statement must appear within on handler
import flash.external.ExternalInterface;
[code].....
View 2 Replies
Feb 9, 2010
how I can change the X and Y positions where the ContextMenu displays. I know you can do it with the display() method, but not sure how to implement it. My code, so far:
ActionScript Code:
var my_cm:ContextMenu = new ContextMenu();
my_cm.hideBuiltInItems();
[Code].....
View 2 Replies
May 28, 2010
I'm having issue regarding the display when using Safari on MAC, I can see my menu and the display is correct. However it doesn't position correctly on Firefox on MAC. The menu just position above what it supposed to be positioned.My flash size is: 1440x750Using Firefox 3.5 on MACI'm using swfobject 1.5, on my html I have that:
Code:
<script type="text/javascript">
var swf = new SWFObject("gallery.swf", "mymovie", "100%", "100%", "10", "#000000");
[code]......
View 6 Replies
May 6, 2005
actionscript and was trying to display a movie clip's x and y positions in dynamic textboxes. I can make them display the mouse's x and y positions but need to get it to say the movie clip's
View 2 Replies
Jun 28, 2010
I've been learning AS3 lately and am trying to put together an interactive map. I've brought in some map data and converted it to individual movie clips, each of which has an instance name that I'd like displayed when each clip is clicked on. ideally an informational box would appear with the name of the clip and some other info that I've specified.
What do I need to script so that if one clicks on a movie clip, the instance name is displayed?
View 1 Replies
Aug 21, 2009
Why am I kept getting the Incompatibility report saying something about the Blend: Color Burn? It turns most my vector grahpics to bitmaps. How do I avoid this?
View 1 Replies
Oct 26, 2011
I have 2 possiblities. It looks like these are the same (or I'm wrong). Which is better and why?
var quest1:DisplayObject = FrameCanvas.baseCanvas.addChild(app.questionmark1); //
quest1.x = posX; //
quest1.y = posY; //
or
app.questionmark1.x = posX;
app.questionmark1.y = posY;
View 1 Replies
Feb 15, 2012
A display object container on the stage has some bitmap images of sizes 50x50 arranged in a order one by one. Now if i click on any of the thumbnail image (bitmap) the entire container should move and position itself so that, the bitmap image clicked is placed in the center of the stage.
View 1 Replies
Apr 30, 2009
I have a website i designed which contains buttons that navigate the user to different points on the timeline using frame labels. when they get to the appropriate frame label, they are presented with a movieclip containing two layers. The bottom layer is a map, and the upper layer is a collection of printer buttons that have a tooltip component on them that show you detailed printer info on mouse over and takes you to the printer remote ui on release. each button has a unique queue name for the appropriate printer as its instance name (ex. itm100_btn). Here's the jist... I want to be able to place a dynamic text box near the printer button and using action script have it display the printer queue name automatically simply based on the button its targeting, or even placing the dynamic txt box inside the printer button mc. See, on some pages, there are like 24 printers... I DREAD having to put all these names in manually as there are like 150 printers total
View 7 Replies
Jun 3, 2011
I have a collection of movieclips, I would like to create a clone (a new instance) of a instance everytime I create a new object.
For example
var s:Star = new Star(); // star-shaped movielcip
addChild(s);
// then I want to duplicate an instance of s and add it beside s
For an example like above, it's simple enough to create a new instance with a different name and just add it to the display list. But I have a list of objects I would like to clone as a group...?
View 2 Replies
Nov 20, 2009
I am getting a swf movie report in the output window and nothing else, cant get rid of it
View 3 Replies
Feb 10, 2011
I'm using Amazon EC2 and AFMLE 3.2. How do I generate a report that will tell me how many viewers I have watching?I figured out how to report on the Kb out in an hour but that only tells me average viewers, asuming they all watched an entire hour I need unique viewers and average viewers at different points in the webcast.
View 3 Replies
Dec 19, 2011
I'm trying to generate a report on what classes are being used in our application... bonus points if i can tell which methods and properties are actually being used as well.
I know I can read the catalog.xml for RSL Libraries which is a great start, but I'm not sure if such a thing exists for applications and modules(compiled or uncompiled).
I think I'm looking for some kind of recursive describeType() method, or (gag) maybe I just need to write my own? I don't care how it works, my app dioesnt even tneed to be running... we just need an inventory of what's really being used and what might be garbage, essentialy.
View 3 Replies