• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 984
  • Last Modified:

Close button for swf in flash

I am creating a flash website and within the site, i am using another flash file for the calendar feature. I have the code to pop-up the calendar (swf) on the correct page, but now I am in need of a close button.

I have created a flash button with the three different states and hit area in the .fla file of the calendar, but the actionscript is the issue. It needs to be able to close the individual swf (calendar) without affecting the rest of the flash website.

I'm not even sure if creating the button on the calendar file is the right way to do this, or creating the button on the website file and pointing it to the swf of the calendar.

I hope this explains my problem. Let me know if you have any additional questions. Thanks in advance.
  • 3
1 Solution
how you remove the swf depends greatly on how you loaded it.
but if you put the button inside the calendar swf,
do this.
on (release) {
trace(this);//check if this references the calendar if not modify based on the trace result i.e _parent etc

TCUBusiness09Author Commented:
Thanks! I'll try this code out later today and get back to you on how it worked.
TCUBusiness09Author Commented:
That worked perfectly. Exactly what I wanted. Thanks!
TCUBusiness09Author Commented:
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?
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.

Join & Write a Comment

Featured Post

Introducing Cloud Class® training courses

Tech changes fast. You can learn faster. That’s why we’re bringing professional training courses to Experts Exchange. With a subscription, you can access all the Cloud Class® courses to expand your education, prep for certifications, and get top-notch instructions.

  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now