ActionScript 2.0 :: AttachMovie - How To Get Y Position Of Movie Instance
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
Similar Posts:
Aug 10, 2010
I'm triyng to use the attachmovie command to load and position a movieclip. It doesn't show anything when playing movie. I'm using Flash MX.
_root.attachMovie("Symbol", "mcp", 0);
_root.mcp._x = 100;
_root.mcp._y = 100;
View 7 Replies
Oct 1, 2009
How do I convert the following into Actionscript 3.0. I want to give each instance a unique name.
[Code]...
View 4 Replies
Aug 10, 2010
Im triyng to use the attachmovie command to load and position a movieclip. It doesn't show anything when playing movie. I'm using Flash MX.
_root.attachMovie("Symbol", "mcp", 0);
_root.mcp._x = 100;
_root.mcp._y = 100;
View 5 Replies
Mar 31, 2011
when you use attachMovie how do you set its position on the stage?
View 3 Replies
Oct 4, 2004
I am using attachMovie function to dynamic attached MCs depending on the database. How can I overwrite the current attachMovie MCs with a new set of MCs at the same position and location after a click on a next button?
View 4 Replies
Aug 16, 2007
I'm currently making a TicTacToe game to help build my Flash experience and I've come across an issue. I'll try and explain what everything is doing in my code thus far. I know it's a lot of code for a forum post, but I don't want to leave anything out as someone may have a really nice way to work with this.
Code:
this will be switched to a user defined value (1 or 2), depending on which person the user decides should go first. currently it is set up for the 2nd player to go first
new _global.whosTurn();
_global.whosTurn = 2;
//this sets all cells DISABLED so, at the beginning of the game, any cell is selectable
cell1_isUsed = false;
cell2_isUsed = false;[code].....
View 4 Replies
Apr 16, 2011
I placed a movie clip instance inside a button, and I want this movie clip to play when the button is released. I'm using this code on the frame containing the button:
function playMovie(event:MouseEvent)
{
this.theButton.theMC.gotoAndPlay(3);
[code].....
View 2 Replies
Jul 19, 2004
Does anyone know if it is possinle to scroll a graphic or a movie instance as well as a text instance in flash. I want to scroll text and images as well. Actually text with imges embedded in it.
View 3 Replies
Feb 1, 2006
Basically the x position of the mouse should control the play position of a movie. Do I need something like an event handler (I'm not sure exactly what these do, but I've seen similar scripts that seem to use them).
View 2 Replies
Jun 15, 2009
I've loaded a swf into my project by using loadClip, and now need to put some movieclips over the top of it using attachMovie. All the new movieclips appear behind the loaded movieclip. Is this normal?The movie I have loaded is inside an empty movieclip I've created called "container". Eg:[code]The "sparkle" movie clips are attached much later, on a keypress.
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
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
Nov 1, 2009
I want to add 5 movie clips to the stage. The movie clip at this point is just a red box and called testMovie. Ultimately i want to have 5 red boxes displayed on screen tiled vertically one under the other. Here's the code i have so far:
[Code]...
View 7 Replies
Mar 30, 2002
Still plugging away, but I've run up against a problem that seems like it should be easy to fix, if I only knew how. Made a hairline for use in drawing lines with attachMovie(). Wanted to test it by making a "crosshair" at (100,100). You'd think:
[Code]...
View 6 Replies
Sep 9, 2005
What I have is a news blogger that is loaded via xml which uses php to write to the xml file. I have my "blogger" movie clip that loads all of the different blogger info into it. It is loaded into a blank container movie clip via attachMovie and when the user adds a new blog it creates new instance of it and moves the rest down. All works great with that.
Now the problem is after the client creates more then 3 blogs, it begins to run off the site. So what I need to do is put it into a scroller. Now I have gotten it into the scroller but it seems that the scroller is not seeing the actual size of the container clip that is holding all of these instances of the "blog" movie that is loaded from attachMovie. The size will change depending on how many blogs there are and I need to figure out how to add script to calculate that. Here is the code I have to load the "blogitem" movie into the blank container movie.
Code:
var i = 0;
if (gateXML.hasChildNodes())
{
child = gateXML.firstChild;
[code]....
View 4 Replies
Sep 14, 2006
basically i am attaching a movie dynamically with the attachmovie method like so:
Code:
for(var y = 0; y < rowSize; y++) {
for(var x = 0; x < colSize; x++) {
attachMovie("box", "box" + count, count);
[code]....
now for each attachmovie they have a Event handler, rollover,rollout, but, on the release event holder I want it to load in some XML like so:
Code:
path.onRelease = path.onReleaseOutside = function(){
//alot of my nifty code that will be skipped for elongated post purposes
//but here is where im getting a error
[code]....
I thought at first having the XML declared in the loop does make it just loop through 15 times ( length of my nodes) and just display the last XML item, but when i declare it before it, it does NOTHING !!!!!!!!!! it doesnt even display a damn thing, soon as i put it within my loop it displayed atleast something?
View 2 Replies
Jun 10, 2002
how to put Movie Clips on my stage using the attachMovie command, but they always appear in the upper left corner of the screen. How can I get them to appear in a predetermined area of the stage, without having to edit the Movie Clip itself?
View 1 Replies
Apr 17, 2010
I am trying to attachMovie from array.
Here it goes like this:
----------------------
var __reg3 = new Array ("1", "2", "3", "4");
_root.p1.attachMovie(__reg3[0] + 1, "run1", 1); -- Not working
Then I tried using string:
test1:String = __reg3[0] + 1
_root.p1.attachMovie('"+'test1+'"', "run1", 1); -- Not working
Then I tried this
_root.p1.attachMovie(" "" +test1+" "", "run1", 1); -- Not working
Then used this:
qt:String = '"';
_root.p1.attachMovie(qt+test1+qt, "run1", 1); -- Not working
But when I use like this, its working:
_root.p1.attachMovie("3", "run1", 1); -- working.
View 1 Replies
Jul 27, 2003
Now that I'm on the verge of madness I must consult the forum. I'm simply trying to take one movie clip I made, make it behave like a button, and attach multiple instances of it on my stage, each of which will load a different image to the page. Therefore each movie clip instance contains one crucial bit of unique info -> a number.
That way when I click on the upper left movie clip button it will load ["poster"+this.num] where this.num = 1 and so on. Im having a heck of a time talking to the variables stored in my movie clips... tried to do an onLoad since I only want to set it once but to no avail. any ideas? i'm confused myself just trying to explain it so i'll attach the fla, it's not too big.
View 2 Replies
Mar 19, 2010
I am working on doing a hitTest using one attachMovie and one repeating movieClip. I am running into trouble because the movie clip is changing it's name every time it's created (panda1, panda2, panda3, etc...) and the attachMovie, fire, is not recognizing the created MC's. here is the code to create the movieClips:
[Code]...
View 3 Replies
Nov 11, 2003
I can't make Flash do a gosh darn thing 'flashy', no matter how many tutorials I read, and how many demo's I see, it never seems to do what would make sense. This worked fine until I tried to plop the dynamic text box into its own movie object in the library... I've opened flash, drawn a simple dynamic text box. Set the dynamic text box's data variable to szTextBoxData (why don't text boxes just have a value property? anyways..).
Then selecting it, I convert it to a symbol (as a movie) call it DynamicTextMovie, and stuff it away into the library. Now I delete it from the layer, as I want to add it dynamically at run time. Next, on frame one of the main movie, I insert this code. (sorry for the bad formatting, limit of the forum here..)
[Code]....
View 4 Replies
Oct 23, 2009
I have a label I am referencing form a movie clip inside the movie clip which contains the "label_2." Here is the code I used: MovieClip(parent.parent).gotoAndPlay("return_2"); Now I need to reference a instance name of a movie clip in side the same scene.
View 10 Replies
Mar 20, 2009
Does creating a new instance of an Object that uses an identical name to an older instance, delete the previous instance? Or should the original instance be deleted first? The code uses a ridiculous amount of XML vars. Isn't it less memory intensive to parse the XML and save the properties to an Object, and then delete the XML Object, rather than keep the XML Object around and reference it's child nodes directly? Is it better form to break up a huge XML file (>600lines/3200vars) into smaller chunks?
View 1 Replies
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
Apr 28, 2009
I have a Flash movie with a movieclip inside called main (main has been dragged into the stage).In main at certain frame I have[code]...
Which loads teletipo.swf but in a x=0 and y=0 position. As I need it in a x=320 and y=165 position I've done[code]...
View 2 Replies