Skip to main content
SeanPercy42
Known Participant
July 27, 2013
Answered

Fading between two pages & controlling one MC from another.

  • July 27, 2013
  • 1 reply
  • 975 views

Let me see if I can explain this properly. I usually use a motion tween and the alpha channel to fade movie clips in or out. What I am currently trying to do is fade one page out and another in, but it could be one of several MCs. I basically have four "pages" for a website including services, portfolio, about, and contact. I have icons on my navigation bar (which is going to be imported into my XHTML seperately so it can float them according to the users window size). The icons need to navigate between the pages and the pages need to fade in and out (eg. fade in the Services MC when the user clicks on the services icon, and fade out of it and into the Portfolio MC when the user clicks on the portfolio icon). Please keep in mind that the icons and pages are in completely different .fla/.swf files because I couldn't figure out how to float them in Flash after several hours of looking around online, but know I can easily do it using div tags + CSS in XHTML.

If someone could quickly explain how to "gotoandplay" a label in a different .swf file (communicate between the .swf NavBar and my main .swf) as well as fade out of the current MC (whichever page the user is currently on) before fading into new page (according to the icon the user clicks on), I'm sure I could 'fill in the blanks' from the rest of the AS3 and Flash I already know. The page also needs to fade out of whatever page it's currently on when the user clicks on the hide button (located on the page in the main .swf file). There is also several subpages on each page (which shouldn't be a big deal if I can figure the rest of this out).

I'm going to be using this same concept for nearly all of the websites I design & develop in the future and really need to know how to do this for the current site I'm working on. I would greatly appreciate any suggestions on how to accomplish these two things.

P.S. Please keep in mind I'm not an advanced user in AS3, but am very computer savy, and have done my share of programming in the past. I looked around for hours online to try and complete this without using the forum, but have come up with links to dead tutorials and short answers left and right. I'm hoping I won't come across the same here.

From what I've read so far I believe I can use tweening in ActionScript instead of a motion tween on the timeline to fade in and out of clips and believe that's the method to use to accomplish what I'm trying to do. Correct me if I'm wrong though.

This topic has been closed for replies.
Correct answer Ned Murphy

You can use the LocalConnection class to communicate between different files in the web page.  For more information just Google "AS3 LocalConnection" or look it up in the help documentation.

For the tweening you can use Actionscript.  AS3 has the built-in Tween class, but for better performance and control most people will recommend you go third party and use TweenLite (or TweenMax for more complex tweening than what you have explained).

1 reply

Ned Murphy
Ned MurphyCorrect answer
Legend
July 27, 2013

You can use the LocalConnection class to communicate between different files in the web page.  For more information just Google "AS3 LocalConnection" or look it up in the help documentation.

For the tweening you can use Actionscript.  AS3 has the built-in Tween class, but for better performance and control most people will recommend you go third party and use TweenLite (or TweenMax for more complex tweening than what you have explained).

SeanPercy42
Known Participant
July 27, 2013

I'm looking for a little better explanation than that if possible. I already heard of the LocalConnection as well as TweenLite, but that didn't explain how to accomplish what I'm trying to do. You just mentioned two of the required steps, but I need someone to reply with specific instructions and not a general direction to go in (that would have me doing another 200 hours of research to produce the correct result).

I'm need someone that's an expert with AS3 & Flash that could take 10 minutes to explain the steps (eg. add this code to your main file, add this code to your navigation bar, arrange your MCs on seperate frames, and download/install tweenlite). This shouldn't be that hard of a task.... Like I mentioned in my post, I am not looking for short, simple answers.

Ned Murphy
Legend
July 27, 2013

If you are looking for someone to prepare a tutorial especially for you in this forum your expectations are not realistic.

If you search what I said to you will find the results of efforts of people who have done what you are asking for... prepared extensive explanations and step by step instructions on how to use things.