Can't get the page to change

I don't really know much about actionscript, but I want the login page to show up when the movie start, to go away when someone logs in and to come back if someone logs out.  I also want the pages to appear dynamically and not use goToAndStop or .visible, but I can't seem to get the login button working. If I remove the document class from the login pags and all references to it the button works, but it doesn't work when the document class and things are there.
so here is the code.
this is the document class .as code
package {
    import flash.display.MovieClip;
    import flash.events.*;
    import flash.net.URLRequest;
    import flash.net.URLVariables;
    import flash.net.URLLoader;
    import flash.net.URLLoaderDataFormat;
    import flash.display.Loader;
    public class loginPage extends MovieClip {
        public var noPass:Number=-1;
        //public var subBtnClick:Number=-1;
        public function getPass(event:Event):void {
            if (noPass==0) {
                var passRequest:URLRequest=new URLRequest("PasswordPageTwo.swf");
                var passLoader:Loader = new Loader();
                passLoader.load(passRequest);
                addChild(passLoader);
                //addEventListener(Event.ENTER_FRAME, zeroPass);
                removeEventListener(Event.ENTER_FRAME, getPass);
                trace("back to the pass page");
            } else if (noPass==1) {
                //addEventListener(Event.ENTER_FRAME, zeroPass);
                var navRequest:URLRequest=new URLRequest("Connect/ILNav.swf");
                var navLoader:Loader = new Loader();
                navLoader.load(navRequest);
                addChild(navLoader);
                removeChild(passLoader);
                removeEventListener(Event.ENTER_FRAME, getPass);
                trace("here is the nav page");
            } else if (noPass==3) {
                var defaultRequest:URLRequest=new URLRequest("PasswordPageTwo.swf");
                var defaultLoader:Loader = new Loader();
                defaultLoader.load(defaultRequest);
                addChild(defaultLoader);
                //addEventListener(Event.ENTER_FRAME, zeroPass);
                removeEventListener(Event.ENTER_FRAME, getPass);
                trace("default pass page");
      public function listenPass(event:Event):void{
            addEventListener(Event.ENTER_FRAME, zeroPass) 
            removeEventListener(Event.ENTER_FRAME, listenPass) 
        public var reLoginName:String; 
        public var reLoginPassword:String; 
        public var myTheme:Number; 
        public var myHelper:Number; 
        public var myFont:String; 
        public var myBackground:String; 
        public var userSet:Number; 
This is the first layer movie's code. This works in the begining to load the login layer.
function zeroPass(event:Event):void {
    if(noPass>=0){
    addEventListener(Event.ENTER_FRAME, getPass);
    removeEventListener(Event.ENTER_FRAME, zeroPass);
    } else {
        noPass=3;
    addEventListener(Event.ENTER_FRAME, getPass);
    removeEventListener(Event.ENTER_FRAME, zeroPass);
addEventListener(Event.ENTER_FRAME, zeroPass);
This is the login code.  I just have the testing code done so when it clicks it is meant to log off. This is where the button does not work.
function myLogin(event:MouseEvent):void {
    trace("submit works");
    noPass=0;
    addEventListener(Event.ENTER_FRAME, listenPass);
    submit_btn.removeEventListener(MouseEvent.CLICK, myLogin);
submit_btn.addEventListener(MouseEvent.CLICK, myLogin);
I also have the navigation page that I cannot test because the login page doesn't work but it is the same code so it I think it is safe to say it does not work either.
function myLogout(event:MouseEvent):void {
    noPass=1;
    trace("logout works");
    addEventListener(Event.ENTER_FRAME, listenPass);
    Logout_btn.removeEventListener(MouseEvent.CLICK, myLogout);
Logout_btn.addEventListener(MouseEvent.CLICK, myLogout);
like I have said I am new to actionscritp so I most likely have it all wrong.

IF you are using 2-sided printing, in the print dialog you will have a selection for long side binding OR short side binding. Whichever setting you have set, switch to the other one.
Walt

Similar Messages

  • My InDesign document has two page 1s and I can't get the page numbers to work.  Help!

    My InDesign document has two page 1s and I can't get the page numbers to work.  Help!  How do I fix this?

    Do you mean the first section is starting at page one?
    And the second one now is starting at page two?
    So I would ask why you would need sections at all?
    Did you set the controls for Automatic Page Numbering?
    If you select the particular page where section two is starting in the Pages Panel, you could untick the Start Section option in the numbering and section dialog. That would remove the section. You cannot do that with the very first section, but you should set the first section to Automatic Page Numbering if you ever want to use your document with an inDesign book file.
    Uwe

  • How can I get the page to curl when turning to the next page in iBooks author?

    How can I get the page to curl when turning to the next page in iBooks author?

    I don't think you can. If you need that effect, you should use ePub (that can be authored via Pages) not iBA.
    I hope Apple give us the option in the future though.

  • Bought a Mac 10 days ago can I get the pages app free

    Bought a Mac 10 days ago. Can I get the pages app free?

    https://uptodate.apple.com/welcome?locale=en_US

  • Getting the "Page Has Changed" error.

    I'm using InContext Editing and am getting this error:
    Page Has Changed
    The page you are trying to edit or duplicate could not be found on the server. You can check if the page was deleted or moved in the meantime.
    The page does exist, I can view it in the browser and thru includes/ice/ide.html. I can Duplicate the page, and the page gets duplicated on the server, but  I can't edit the duplicated page either.
    My pages are pretty simple, but do have a few include files in them. So I deleted the includes, uploaded a straight .html file, and I still get the error.
    In the "Configure Site" section, I can connect to my ftp site. I can browse the directories, etc., so I'm definitely connecting.
    The weird thing is, I upload this exact same site to a test server (on Linux), configure a new site in the admin, edit the same files and it works perfectly. But once I upload these files to a Windows/IIS server, I get this error.
    Any ideas?
    Thank you in advance.

    Please send the url of the site,  the FTP server, username and password to [email protected] and we'll investigate this issue; also include a link to this forum post in your message.
    Regards,
    Dan Popa

  • I can't get the page numbers in my table of contents to update when I update the book.

    I'm using Framemaker 11 and I have two TOCs in my book: one in English and one in French. Each TOC links to different documents in the same book. The reference page for each TOC is set and correctly displays the heading 1 and 2 I've told it to display, but the numbers do not update when the content in my document files changes to a different page. I've checked the conditional text settings in my document files; they are correct. When I update the book, I choose to update Numbering, All Cross-References, All Text Insets, OLE Links, Generate Table of Contents, Lists, and Indexes. What am I doing wrong? Thanks.

    I just tested this out and saw the same result as Rick - a book with child books ignores all generated files within the child books. This applies to adding content from them (e.g. their titles) to actually including them in the output. This applies to all versions of FM since v.9!
    However, there is a workaround for this. You need to use the hierarchical book structure in the parent book and create Folders for each book that you want to add. Then manually add the generated files (TOC, IX, List of..., etc.) and book to the respective folder. This is what it looks like for two child books in a parent book:
    Note that the child book generated files (TOC, IOR) show as just regular files at this point in the parent book. To get the page numbering to be continuous throughout the parent book, you will need to make a couple of passes. First set folder, files and books to have the Numbering continue from the previous (if you want all sequential page numbers). This will set the page numbers correctly except for what they were in the respective book TOCs. You will need to use the starting page number of the child TOC files in each folder (it shows in the Book status bar when click on the TOC file in the master/parent book).
    To set the individual book TOCs to be correct in the parent book, open the child book and set the TOC Numbering to start at the page stated in the parent book (status bar). Now update the child book to set the correct (parent book) page numbers in the child TOC. [This is a necessary manual step, as the page number assigned in the parent book is ignored when th child book is individually updated and FM uses 1 to start off the sequence in the child book.]  Repeat for each child book in the master/parent book.
    The final step is to Update the parent book and create the PDF. You should now have all of the files included in the PDF and the child TOCs should show the correct page numbers of the master book.
    This whole process of books within books seems a bit borked and one shouldn't have to be jumping through hoops to include child generated files. Please report this as a bug via: https://bugbase.adobe.com/index.cfm

  • How can I get the page loading in progress indicator visible as in 3.6??

    1)
    When a page takes long to load it would be nice to see its progress, if any, as I used to have in the earlier 'FF-version. Is it possible somehow?
    2)
    If I choose "no tabs" to save space on screen can I get the tabs visible when needed, without going to preferences?

    1. https://addons.mozilla.org/en-US/firefox/addon/status-4-evar/
    2. That pref suppresses the Tab bar when there is only one Tab open. With two or more Tabs Firefox should always show the Tab bar. ''Unless you are referring to a preference added to Firefox by an add-on.''

  • If i purchased a macbook pro in late september, can i get the pages,keynotes,

    hi, i purchased a macbbok pro in late september 2013, can i get the numbers,pages, and keynotes free?

    No.
    iWork and iLife for Mac come free with every new Mac purchase. Existing users running Mavericks can update their apps for free from the Mac App Store℠. iWork and iLife for iOS are available for free from the App Store℠ for any new device running iOS 7, and are also available as free updates for existing users. GarageBand for Mac and iOS are free for all OS X Mavericks and iOS 7 users. Additional GarageBand instruments and sounds are available for a one-time in-app purchase of $4.99 for each platform.
    If you already have older versions from the App Store, you can upgrade them for free.

  • How can I get the page where a page item is localized?

    Hi<br /><br />I move some page items to the next spread using kMoveToSpreadCmdBoss. This works fine. But when I want to get the page uid where the page item is localized now (I use Utils<ILayoutUtils>()->GetOwnerPageUID to do that) I get the uid of the spread and not the uid of the page where the page item is localized.<br /><br />- What is wrong?<br />- What can I do to get the page uid?<br /><br />Thanks<br />Hans

    Hans,<br /><br />I recently had to do the same, so I'll show you what I have done.  I start by getting the spline item UIDRef and the value that Utils<ILayoutUtils>()->GetOwnerPageUID gives you.  Then I figure out which side of the spread the item falls on:<br /><br />InterfacePtr<IGeometry> splineGeo(ItemRef, IID_IGEOMETRY);<br /><br />PMRect itemRect = splineGeo->GetStrokeBoundingBox();<br /><br />PMPoint currPoint = itemRect.LeftTop();<br /><br />InnerToPasteboard(splineGeo, &currPoint);<br />     <br />if(currPoint.X() < 0){<br />     //it's a left-hand page<br />     left = true;<br />}<br /><br />Once I know which side the item is on, I can calculate which page the item falls on(where OwnerUID is the UID that the call to GetOwnerPageUID returns):<br /><br />UID GetOwningPageUID(IDocument *docPtr, UID OwnerUID, bool left)<br />{<br />        UID rc;<br />     int32 index;<br />     <br />     //get the database <br />     IDataBase *db = ::GetDataBase(docPtr);<br /><br />     //Get the list of pages<br />     InterfacePtr<IPageList> pgList(docPtr, IID_IPAGELIST);<br /><br />     index = pgList->GetPageIndex(OwnerUID);<br /><br />     if(index >= 0){<br />          //the passed in UID refers to a page<br />                rc = OwnerUID;<br />     }else{<br />                //dealing with a spread UID<br />          UIDRef pageSpreadUIDRef(db, OwnerUID);<br /><br />          InterfacePtr<ISpread> pgSpread(pageSpreadUIDRef, UseDefaultIID());<br /><br />          int32 pageCount = pgSpread->GetNumPages();<br /><br />          if(pageCount == 1){<br />               rc = pgSpread->GetNthPageUID(0);<br />          }else if(pageCount <= 2){<br />               if(left){<br />                    rc = pgSpread->GetNthPageUID(0);<br />               }else{<br />                    rc = pgSpread->GetNthPageUID(1);<br />               }<br />          }else{<br />                     rc = nil;<br />          }<br />     }<br /><br />     return rc;<br />}<br /><br />I hope this helps.<br /><br />Dan

  • How can I get the page status light to come on?

    The page status indicator light ha been non-functional ever since I downloaded newer versions... as a result of this problem I have seldom been using Mozilla firefox because I have no confidence in secure searching! If need be, I will delete Mozilla Firefox altogether!

    When you had to reset and secure the router that provides the wireless network, does this mean that you changed either the wireless security setting or wireless network password?
    If yes, then you will need to reconfigure the AirPort Express and provide it with those new settings so that it can join the wireless network correctly.

  • HT1311 I can't get the country to change because I need to get rid of all my money but I have 84 cents

    I have accidentally change countries for my iTunes Store and now I can't change back to Australia. I try to change it but it says I need to get rid if all my money but I only have 84 cents and can't get rid of it. Can anybody help me with my problem

    You can't buy something for more than 84 cents? like spend a $1? 

  • Can't get the pages sidebar to scroll all the way down

    If I'm using Acrobat 9, and I have the pages sidebar open, I am unable to scroll all the way down to the very last pages. For example, if I have the sidebar set so that each row has thumbnails for two pages, and the document has 51 pages, I can only drag the scrollbar down far enough to show page 50. I can access the last page, but I can't select the icon to, say, move it to another place in the document. Same thing if it is four pages wide and the document's lenght isn't a multiple of four: the sidebar doesn't want to show the last half-full row of pages. Any ideas what might be causing this?

    Useful article here on the causes of the Spinning Beach Ball and how to troubleshoot it:
    http://www.computerworld.com/s/article/9177479/Troubleshoot_the_spinning_beach_b all?taxonomyId=89&pageNumber=1
    and also this:
    http://www.thexlab.com/faqs/sbbod.html

  • I can not get the link to chang my password

    i forgot my password to my firefox sync and i did the reset telling it was going to send me a link to my email to change it, but i get no link sent to my email. help

    You can find the sync password and the sync key in the password manager on the computer where you originally created that sync account.
    Look for:
    * chrome://weave (Mozilla Services Password)
    * chrome://weave (Mozilla Services Encryption Passphrase)
    Tools > Options > Security: Passwords: "Saved Passwords" > "Show Passwords"

  • I'm new to keynotes and I have a lot of powerpoint presentations I'm trying to salvage.  I can't get the slides to change on a click plus I can't find the way to change the "transition" time changes within each slide.  Where can I find the answer

    I'm new to keynotes and I'm trying to salvage several powerpoint presentations.  I can't control my slide presentations by clicking to change slides and/or for transitions within the slides.  I'm sure there's an answer but I can't find it.  Can someone please give me directions.

    Show the Inspector;   view > show inspector
    to run a presentation using manual control:
    Inspector > Document: set Presentation to Normal
    many transitions set in PowerPoint are not available in Keynote;  to set the transition options:
    Inspector > Slide > Transition
    select the effect you want and either choose auto or manual control

  • Im trying to help someone locate their lost iPhone.  Why can't I access the Fine My iPhone app from my iPhone? I can only get the page to install it on my phone.

    I am trying to locate someone's lost iPhone using the "Find my iPhone" app.  Why does safari keep re-directing me to the install Find My iPhone page?  Why can't I log in to MobileMe from my iphone?

    Apple don't give access to the MobileMe web site from an iPhone. To use the service you need to use apps, like the Find My iPhone app.

Maybe you are looking for

  • Clipboard FlavorListener on Mac OS X

    Hi all, for an Eclipse plug-in, I need to intercept text that another application copied to the clipboard (unfortunately, communication through the clipboard is currently the only way to communicate with that other application). I implemented this by

  • Deep search

    Hi, I'm trying to proceed a pretty complicated search. Here's the structure of my custom architecture ; all these are PublicObject Instances,and they all extend the 'Document' Class : class Po3 with a single String-type attribute : 'bob' class Po2 wi

  • Is Adobe working on a version of Shockwave for the iPad?

    Is Adobe working on a version of Shockwave for the iPad? I've tried to access the Junior RAI site on my iPad.  It uses Shockwave.  It has great content for children, but the site is blank because I don't have shockwave on my iPad.  There are many sit

  • I brought new unlocked iphone 4s one year ago and i put pay as u go sim in but now its locked

    i brought new unlocked iphone 4s one year ago and i put pay as u go sim in but now its locked

  • IMovie Upgrade to iMovieHD6 after purchase of iLife 08 for G4 Powerbook

    I purchased iLife 08 two days ago and found that all my iLfe5 programs would update except iMovie because I use them on a Powerbook G4, because of processor limitations. Is there any way I can upgrade to iMovie HD6 without incurring additional expens