# Security Sandbox Violation when transforming mc inside onLoadInit

**URL:** <https://forum.kirupa.com/t/security-sandbox-violation-when-transforming-mc-inside-onloadinit/204882>\
**Category:** flash\
**Created:** [October 24, 2006, 10:38am UTC](https://forum.kirupa.com/t/security-sandbox-violation-when-transforming-mc-inside-onloadinit/204882 "2006-10-24T10:38:21Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![isvaljek](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/isvaljek/32/2364_2.png) [@isvaljek](https://forum.kirupa.com/u/isvaljek)\
**Post date:** [October 24, 2006, 10:38am UTC](https://forum.kirupa.com/t/security-sandbox-violation-when-transforming-mc-inside-onloadinit/204882/1 "2006-10-24T10:38:21Z")

</div>

I’m trying to load an image into a placeholder movieclip, using movieClipLoader.loadClip.  
When the onLoadInit event fires, i do some resize and alpha fade-in code. The resize code causes Security Sandbox Violation. This is the culprit:

if(frame2picRatio\<=1){  
mat=target.transform.matrix;  
mat.scale(frame2picRatio,frame2picRatio);  
target.transform.matrix=mat;  
}

When I comment it out in the onLoadInit, the error goes away. I don’t know what connection is there between scaling a matrix and Security Sandbox.

Any thoughts?
