First all you have to do is open a new file of After Effects or you can open a old one and add a new composition by right clicking the composition and clicking the add composition and name it layer masking. Then go in google and search any thing I used the McDonald's logo. After you have saved it go to the composition box right click on it and then import the file after that is done then drag the image composition to your layer masking composition. Then you can resize and make all the adjustments.
After that use potion to move your image. It has to come from the left out of the box to the right side inside of the box.Secondly, You can write any text and do the opposite animation of the image put it out of the box at the right and make it come inside at the left at the same time as the image. Make sure you have kept the background black and make sure you want the design to be final.
The last step is that you create 2 new layers with black rectangle boxes one covering the image and one covering the text make sure the boxes are big so no problems will happen. Name it by which box is covering what and add the masking layer on top of the file. For example keep the black box layer which is covering the text on top of the text same with the image. Then beside of the name of the text and image layer you will have to make it AIM for both and you are done. Then all you have to do is save it.To save it go to export and make sure it is AVI and click done and in the end render the thing. And you are done. Today I learned how to mask a layer, hiding the object for a certain time. by this I can save a lot of my time doing it individual and this is a good experience that would be helpful in the future