Solved

make a child use stage (_root) coordinates

Posted on 2002-04-10
2
129 Views
Last Modified: 2010-05-18
I'm working on  a quiz interface at: http://dev.ttstrain.com/comp/quiz.swf

After answering a given question a reply is presented with text that explains why the answer is right or wrong. The 'reply' clip holds two children, one for the text itself and one for the brownish color block behind it. (note...3 of the questions there have a sample graphic inside the question...these questions don't have a reply block...ignore 'em);

I'm dynamically controling the background's _height property depending on the number of lines in the text block. But the _y property flucuates depending on the _height value. ... even though I have the reg point at teh top of the clip.

I wanna know how to use the globalToLocal/localToGlobal method(s) to create a stable position for the background. Or I wanna know why I'm too dense to understand why those methods aren't for this sort of situation. I can figure out how to control _y by reversing the calculation that gives me the _height property but I do this sort of thing often enough and it seems like it's time to learn to do it right.

...i'm only starting at 50 in case the answer is 'don't try to use localToGlobal... I've read and tried to reproduce what AS Definitive Guide says...I don't get errors...i just don't get results.

thankx
--steve...

0
Comment
Question by:juststeve
2 Comments
 
LVL 5

Accepted Solution

by:
stef4s earned 50 total points
ID: 6936271
try mc.getBounds this allows you to get absolute positions
0
 
LVL 7

Expert Comment

by:ssdesign
ID: 6976207
have you placed your backgroud graphics, which changes height and width dynamically, at absolute locations?

That means, are the x and y round figures?

if not try by placing the registration point of the clip at rounded X and Y co-ordinates.
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Suggested Solutions

This is a very simple example to help those of you who are still migrating from AS2 to AS3 understand the redesigned event model in AS3. In AS2.0, event functions (that is, the function to be performed when an event is fired) were stored as a pro…
Introduction This article is primarily concerned with ActionScript 3 and generally specific to AVM2.  Most suggestions would apply to ActionScript 2 as well, and I've noted those tips that differ between AS2 and AS3. With the advent of ActionS…
In this tutorial viewers will learn how to create a basic motion tween animation in Flash Open a new document in Flash: Draw/import an image: Press CTRL + F8 to convert it into a graphic symbol: Select a frame (how long you want the tween to last): …
The goal of the tutorial is to teach the user how to use the auto adjust feature and what the different options do. When your video is not working right you can choose the auto adjust feature to help choose your settings.

757 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now