Repositioning a calendar (swf) within a flash website

One other question that I do have is now that I have loaded the calendar using:

on(release) {
loadMovie ("calendar8_01.swf", 1);
}

How do I position the new window where I want it within my flash site. It is loacated by default in the top left corner, but I am wanting it to be in the middle of the screen both horizontally and vertically. Is this possible?
TCUBusiness09Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Aneesh ChopraCommented:
it should like this:

on (release) {
      var mc = this._parent.createEmptyMovieClip('calendarHolder', 1);
      mc.loadMovie("calendar8_01.swf");
      mc._x = 50;
      mc._y = 50;

}
0
TCUBusiness09Author Commented:
Thank you for your help! I will try this out tomorrow and get back to you with the results.
0
blue-genieCommented:
hi just a add on from your previous post.

if you want better control over the items you're loading, try using MovieClipLoader (AS2) and Loader (AS2 & 3) classes for loading items.
in AS3 levels aren't used anymore, so get into the habit of using display objects (for AS3).

in AS2 when using loadMovie(whichmovie);
generally you only tell it what to load
when using loadMovieNum(whichmovie, whichlevel);
you have the extra parameter of the level.

you can use moviecliploader to load into levels (AS2)

have a look at the snippet below.
i create an instance of the movieclip loader.
then i create a listener.
when the listener says INIT i.e. finished loading you can access it now.
i set the items x position.

so you can do the same with your calendar.
var mclListener:Object = new Object();
mclListener.onLoadInit = function(target_mc:MovieClip) {
 
target_mc._x = 500;
 
};
var image_mcl:MovieClipLoader = new MovieClipLoader();
image_mcl.addListener(mclListener);
image_mcl.loadClip("test2.swf", 1);

Open in new window

0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
TCUBusiness09Author Commented:
aneeshchopra, you code seems to be loading up the calendar file, but it is not visible. Is it possibly on the wrong layer?
0
TCUBusiness09Author Commented:
blue-genie, extrordinary work yet again. All I had to do was put your code in the on(release) handler and modify the position and it worked perfectly. You have been such a great help throughout this process. Thanks again!
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Adobe Flash

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.