• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

attachMovie now I cant access the mc's X or Y position

Engaged ,
Apr 26, 2006 Apr 26, 2006

Copy link to clipboard

Copied

Hey all,

Ive had this problem in the past aswell

this.attachMovie("images_civil", "images_civil_mc", 1);
images_civil_mc.x = -25.7;
images_civil_mc.y = -114.1;
}

the problem is X or Y never changes position on screen even if I take that line out. What do I do to access the X and Y position? Ive tried _root.mc, this.mc but I dont seem to be able to change it. Must be something simple I am doing wrong.

Any help would be great
TOPICS
ActionScript

Views

452

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Apr 26, 2006 Apr 26, 2006

Copy link to clipboard

Copied

complexity wrote:

> the problem isY never changes position on screen even if I take that line
> out.
> What do I do to access the Y position?
>
> Any help would be great

You must use _x and _y (notice the underscores).

Tim.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Apr 26, 2006 Apr 26, 2006

Copy link to clipboard

Copied

answered my own question:

this.attachMovie("images_civil", "images_civil_mc", 0, {_x:-25.7,_y:-114.1});

Seems to have fixed it.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Apr 26, 2006 Apr 26, 2006

Copy link to clipboard

Copied

it's _x and _y.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Apr 26, 2006 Apr 26, 2006

Copy link to clipboard

Copied

of course! Still having some trouble getting the bugs out of that file I showed you.

Ive set up another if statement which I want to act as a trigger. Its sitting on frame 20 (only) of a 40 frame animation.

I thought that the if statement would only execute when that frame is only played, but it seems to execute as soon as frame 1 plays. How do I stop it from executing like that.?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Apr 27, 2006 Apr 27, 2006

Copy link to clipboard

Copied

LATEST
code in a frame won't execute until the frame plays. so, if it executes you can be sure the frame has played.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines