Skip to main content
Participant
December 22, 2014
Question

How to center gif on streching banner (Adobe Flash Pro, Action script 2.0)?

  • December 22, 2014
  • 1 reply
  • 301 views

Hello,

I try to center my gif image on streching banner.

What i make:

1. Click F8 on image layer and transform into symbol ("img1"). Registration is centered.

2. Add a name for this copy in properties ("img2")

3. On the layer "Action Script" i got a code:

Stage.scaleMode = "noScale";

Stage.align = "LT";

var obResize:Object = new Object();

Stage.addListener(obResize);

obResize.onResize = function() {Resize()};

function Resize(){

    back._width=Stage.width;

    img2._x=Stage.width/2;

};

Resize();

-------------------------------

Gif image is not centered. When i use static image, for ex. JPG, that's ok.

Please, help me if you know how to solve this problem.

Thank you!

This topic has been closed for replies.

1 reply

kglad
Community Expert
Community Expert
December 23, 2014

how is your banner stretching?   is that javascript?

Participant
January 22, 2015

Thank you, i have solved this problem!