about:flash

Friday, June 10, 2005

Loading flashpaper swf from another domain

loading one swf into another should not give any problem, even if both are on different domains.
But try loading flashpaper swf into another movie. If both are on different domains, it will crash the flash player. i.e. if you try to load a flashpaper swf which is on a different domain into a movie, lets say main.swf, you will receive a player message, 'The script in this movie causing flash player run slowly. Do you want to abort the script?' . You will not able to see the contents of the flashpaper swf as well as flash player will stop working.

For .jpg, check _height instead of getBytesLoaded()

While checking whether any .jpg is loaded or not, it's good to check _height of the container mc instead of getBytesLoaded().
Because, though .jpg loaded fully, it may not be rendered on the screen. So if you want to get the the properties like height/width immediatly after loading, you may get 0.

mcContainer.load("sample.jpg");
this.onEnterFrame = function(){
var val = mcContainer._height;
if(val > 0){
delete this.onEnterFrame;
foo();
}
}

Be careful while using above logic to check .swf loading, since, if the first frame of the .swf being loaded is blank with stop() written on it then, mcContainer._height always written 0 & it will become a endless loop.

Saturday, June 04, 2005

"Hello World"

"Hello World"

A new blog has born.
Thanks to Brajeshwar (http://www.brajeshwar.com) and Abdul Qabiz (www.abdulqabiz.com) for their help & guidance.

This blog is devoted to Flash, xml, AICC/SCORM.

Typically, you will see here the posts related to the tips, tricks, workarounds, issues I faced while developing the projects for the clients.