Nested OnEnterFrames Migration from AS2 to AS3

I have an external Class file on a movieclip in AS2 and I am trying to understand how to convert the external class file from AS2 to AS3. How do you write nested onEnterFrame functions in AS3?

My Code:

function callAlbum(albumXML, title, description, photoNum)
    {
		
        if (photoNum == null)
        {
            pNum = 0;
        } // end if
        var p = 0;
        aTitle = title;
        aDescription = description;
        aXML = albumXML;
		
        function onRollOver()
        {
        } // End of the function
	this.onEnterFrame=function():Void
        {
            if (content_mc.exitPage() || content_mc.exitPage == null)
            {	
                content_mc.unloadMovie();
		this.onEnterFrame=function():Void
                {
                    if (photomcs[p] == null)
                    {
						
                        delete this.onEnterFrame;
                        delete this.onRollOver;
                        transitioning = false;
                        if (albumXML == null)
                        {
			this.onEnterFrame=function():Void 
                            {
                                if (description_mc.switchText(null, null, false))
                                {
                                    delete this.onEnterFrame;
                                    activePhoto_mc = null;
									
                                    this.loadContent(title, description);
									
                                } // end if
                            } // End of the function
                        }
                        else
                        {
                            _global.CONTROLLER.switchMode("ON");
							
                            this.loadAlbum(albumXML, title, description);
                        } // end else if
                    }
                    else
                    {
                        delete photomcs[p].onEnterFrame;
                        if (photomcs[p].isVisible() && photomcs[p]._currentframe > 1)
                        {
                            photomcs[p].nail_mc.dim();
                            if (photomcs[p].nail_mc.photo_mc._currentframe > 1)
                            {
                                photomcs[p].nail_mc.photo_mc.prevFrame();
                            }
                            else
                            {
                                photomcs[p].removeMovieClip();
                                ++p;
                            } // end else if
                        }
                        else
                        {
							
                            photomcs[p].removeMovieClip();
                            ++p;
                            this.onEnterFrame();
                        } // end else if
                    } // end else if
                } // End of the function
            } // end if
        } // End of the function
    } // End of the function