- Has been a member for 4-5 years
- Sold between 1 and 100 dollars
Hi
I have a problem, in my code i have the following lines
my_anim.x = stage.stageWidth / 2; my_anim.y = stage.stageHeight / 2;
now when i test it (ctrl+enter) the anim is centered corectly, but when i publish it, the animation is a little off. i believe that it has something to do with stage.scaleMode. but i don’t know.
if i use the movie’s resolution in the index.html (width =’30’, height = ‘30’) nothing happens, it loks normal, but if i use 100%(width = ‘100%’ height = ‘100%’) the animation is off.
Thanks, Jolt
- Sold between 250 000 and 1 000 000 dollars
- Has been a member for 6-7 years
- Author had a File in an Envato Bundle
- Most Wanted Bounty Winner
- Interviewed on the Envato Notes blog
- Author was Featured
- Item was Featured
- South Africa
my_anim._x = (Stage.width - my_anim._width) / 2; my_anim._y = (Stage.height - my_anim._height) / 2;
- Has been a member for 4-5 years
- Sold between 1 and 100 dollars
my_anim._x = (Stage.width - my_anim._width) / 2; my_anim._y = (Stage.height - my_anim._height) / 2;
i don’t think this will work. this just centers the animation if the registration point is in the corner, mines is in the center of the animation.
p.s. in my initian post when i said i publish it and it is off, i mean that in the html it is off
- Exclusive Author
- Item was Featured
- Author was Featured
- Author had a File in an Envato Bundle
- Has been a member for 4-5 years
- Sold between 100 000 and 250 000 dollars
- Repeatedly Helped protect Envato Marketplaces against copyright violations
- India
Did you checked how the stage aligned?
stage.align = StageAlign.TOP_LEFT;?
