dimanche 19 février 2017

.width is the same...but they're obviously different

I have a numerous amount of displayobjects that I made using Adobe Illustrator. I am trying to get them to be exactly the same width and height as my mobile device's stage.

Should be simple....but I have some that are off, and some that are about a pixel less...

I don't mind that they are a bit stretched internally. What matters is getting them to cover the screen when I want.

Take this scene for instance... enter image description here

Just to be sure my resize script was working, I added a before and after trace statement to my script and resized it as soon as I called the function to display it.

```

trace("!!! Profile scene width = " + profileScene_mc.width);
trace("!!! stage stageWidth = " + stage.stageWidth);
trace("!!! stage width = " + stage.width);
profileScene_mc.width = stage.stageWidth;
trace("!!! Profile scene width = " + profileScene_mc.width);
trace("!!! stage stageWidth = " + stage.stageWidth);
trace("!!! stage width = " + stage.width);

```

Traces...

```

!!! Profile scene width = 480.05
!!! stage stageWidth = 480
!!! stage width = 2681.65
!!! Profile scene width = 480.05
!!! stage stageWidth = 480
!!! stage width = 2681.65

```

Clearly this profile scene is not filling up my entire stage. Nothing inside the movie clip is outside it's original bounds. The MovieClip is originally 450 by 800...I don't know what else to do or how to debug this. It's been a sore in my project for the past few weeks. I was going to just break it all in a bitmap and then recreate it if I couldn't figure it out but I'd rather not fall back on that.

Aucun commentaire:

Enregistrer un commentaire