yoshiweb.NET

visible = false;しても表示オブジェクトに含まれる

getBoundsのヘルプに「表示オブジェクトの領域を定義する矩形を返します。」ってあるけど
非表示にしてる visible = false; に設定してるオブジェクトも含んだ状態で返すんですね。。。

import flash.display.Sprite;
import flash.display.Shape;
import flash.display.Graphics;

// シェイプを作成
var sp:Sprite = new Sprite();
sp.x = 150;
sp.y = 150;
this.addChild(sp);

// シェイプに丸を描く
var maru:Shape = new Shape();
maru.graphics.beginFill(0xFF0000);
maru.graphics.drawCircle(0,0,100);
sp.addChild(maru);


// 表示オブジェクトの領域を出力
trace( maru.getBounds(sp) );
// (x=-100, y=-100, w=200, h=200)


// 丸を非表示にしてみる
maru.visible = false;

// 表示オブジェクトの領域を出力
trace(maru.getBounds(sp));
// (x=-100, y=-100, w=200, h=200) ← かわらない


投稿日 : 2014年09月29日 - yoshiweb - カテゴリ: Flash

コメント

投稿者 : tinyurl.com

I needed to thank you for this great read!! I certainly loved every bit of it.
I've got you book marked to check out new things
you post…
2022年07月07日 10時52分41秒

投稿者 : tinyurl.com

An impressive share! I have just forwarded this onto a co-worker who was doing a little
research on this. And he in fact bought me dinner because I stumbled upon it for him...
lol. So allow me to reword this.... Thank YOU for the meal!!
But yeah, thanx for spending the time to talk about this subject here
on your internet site.
2022年07月12日 07時23分40秒

投稿者 : tinyurl.com

It's going to be end of mine day, except before finish I am
reading this fantastic article to increase my experience.
2022年07月15日 19時23分06秒

投稿者 : http://bit.ly/3zpKAwX

My spouse and I stumbled over here by a different web page and
thought I should check things out. I like what I
see so now i'm following you. Look forward to looking into your web page
again.
2022年07月22日 22時28分47秒

投稿者 : http://tinyurl.com/27o2vp8t

If some one wishes to be updated with most up-to-date technologies
therefore he must be visit this web site and be up to date
daily.
2022年07月23日 14時26分13秒

投稿者 : tinyurl.com

This is my first time go to see at here and i am actually impressed
to read all at one place.
2022年07月26日 21時31分07秒

投稿者 : tinyurl.com

Great delivery. Outstanding arguments. Keep up the amazing work.
2022年07月28日 20時30分24秒

投稿者 : writing process

Howdy! Someone in my Myspace group shared this website with us so I came to look it over.
I'm definitely loving the information. I'm bookmarking and will be tweeting this to my followers!
Fantastic blog and terrific design.
2022年07月30日 14時23分26秒

投稿者 : tinyurl.com

Hey! This is kind of off topic but I need some advice from an established blog.
Is it very difficult to set up your own blog? I'm not very techincal but I can figure things out pretty quick.
I'm thinking about setting up my own but I'm not sure where to
begin. Do you have any tips or suggestions?
Thank you
2022年08月02日 06時30分32秒

投稿者 : tinyurl.com

Hi, I want to subscribe for this blog to take most
recent updates, so where can i do it please help out.
2022年08月03日 16時37分46秒

投稿者 : shadowaccord.nwlarpers.org

Hi, constantly i used to check website posts here in the early hours in the break of day, as i like to learn more and more.
2022年08月08日 03時05分33秒

投稿者 : http://tinyurl.com/2gm8npa6

If you are going for finest contents like I do, only visit
this web site all the time for the reason that it presents quality contents,
thanks
2022年08月08日 13時17分23秒

投稿者 : http://tinyurl.com/

What i don't realize is if truth be told how you are now not really much more neatly-preferred than you might be right now.

You are so intelligent. You understand therefore significantly on the subject of this topic, produced me individually imagine it from
a lot of varied angles. Its like women and men don't seem to be involved except it is
one thing to do with Woman gaga! Your individual stuffs nice.
Always handle it up!
2022年08月10日 02時45分42秒

投稿者 : tinyurl.com

That is really fascinating, You're a very professional blogger.
I've joined your rss feed and look forward to in the hunt for extra of your excellent post.
Additionally, I've shared your site in my social networks
2022年08月10日 21時16分30秒

投稿者 : coupon

Wonderful post! We are linking to this particularly great post on our site.
Keep up the great writing.
2022年08月12日 09時08分13秒

投稿者 : http://tinyurl.com/2m5773cm

Fine way of describing, and good post to get facts concerning my presentation focus, which i am going to deliver in institution of higher education.
2022年08月12日 19時54分53秒

投稿者 : tinyurl.com

Great blog here! Also your web site loads up fast!
What host are you using? Can I get your affiliate link
to your host? I wish my site loaded up as quickly as yours lol
2022年08月13日 23時09分34秒

投稿者 : tinyurl.com

Heya i am for the first time here. I came across this board and I find It really useful & it helped me
out a lot. I hope to give something back and help others like you aided me.
2022年08月14日 11時35分39秒

投稿者 : http://tinyurl.com/2qpx2goh

Hi, after reading this awesome post i am as well cheerful to share my know-how here with mates.
2022年08月15日 11時00分37秒

投稿者 : http://tinyurl.com/2zjflnzs

You can definitely see your expertise within the article you write.

The world hopes for even more passionate writers such as you who are not afraid to say
how they believe. Always go after your heart.
2022年08月17日 08時50分24秒