Trying to properly code a menu with buttons that can go back and forth between external swf files

I have a project I've been working on that, when properly coded, has a "main menu" with 4 "doors" (buttons). When the corresponding buttons to these "doors" are clicked, it should go to and play an external .swf file. If that doesn't make sense, think of a DVD menu. You click play movie, it plays the movie. When the movie is over, there's two buttons on that swf file to either play the movie over or go back the main menu, which is an external .swf file (Remember, we go to the movie from the menu, which is a seperate file). So far, the buttons work. The menu works. However, from the movie, at the conclusion, when I click the button to go back to the main menu, it displays the movie clip and the buttons, but none of the buttons work. I'm starting to think it has to do with the fact the main menu was written in AS3 and the movie was made in AS2. If anyone can assist me in being to able to keep both files and still navigate between the two, being able to bring up the menu from the movie and be able to play the movie again, and so on and so on, that'd be GREAT. I'm somewhat of a noob to Flash, but I learn quickly and I'm open to any suggestions. Here's the code for main menu, which I guess acts as the parent file, and the movie. If I get this to work, I essentially would duplicate the same actions for the other 4 doors, once I complete the environments for them. Thanks
Main.Fla/Swf (written in AS3)
(This is the action on the first frame, that has all the buttons. For this question, I'm just trying to properly code for 'Door4', which is the "door" to the movie.)
import flash.display.Loader;
stop();
var myLoader1:Loader=new Loader ();
Door4.addEventListener(MouseEvent.CLICK, jayzSwf);
function jayzSwf(myevent1:MouseEvent):void
          var myURL1:URLRequest = new URLRequest("jayzspeaks.swf");
          myLoader1.load(myURL1);
          addChild(myLoader1);
          myLoader1.x = 0;
          myLoader1.y = 0;
Movie.Fla/Swf (written in AS2)
(This is action on the button that returns to the menu)
on (release) {
          this.createEmptyMovieClip("container",this.getNextHighestDepth());
          container.loadMovie("main.swf");

At least you're going in the correct (mis)direction. You have AS3 loading AS2. So that's not a huge hurdle.
I believe all you really need to do is send your Main.swf a signal that the content it loaded (e.g. jayzspeaks.swf) is done and you want to get rid of it.
The code I pointed you to asks you to (upon download and import then) instantiate it in both AS2 and AS3. They give a very simple easy to understand line of code.
// as2, load this in jayzspeaks.swf
var myBridge:SWFBridgeAS2 = new SWFBridgeAS2("connectionID", clientObj);
// as3, load this in main.swf
var myBridge:SWFBridgeAS3 = new SWFBridgeAS3("connectionID", clientObj);
Make sure the connectionID matches between them. Set it to whatever you want.
When you're done with your as2 loaded content you'd send a signal (over localconnection) back to the AS3 Main like they say:
myBridge.send("someFunctionToUnloadContent");
myBridge.close();
You'd need to make the as3 function "someFunctionToUnloadContent()" (example purposes only name) and it should unload the jayzspeaks.swf that was loaded in the loader.
Make sure you get that close in there so you don't drill up a bunch of localconnection objects just like the simple source code says.

Similar Messages

  • I usually scroll with page up/page down on my laptop. With firefox, it will go back and forth between my previous pages. How do I fix this?

    My question pretty much sums it up. I like to scroll with the page up/page down buttons, and it's hit or miss working with firefox lately. It will go between my previous pages that I've visited instead of scrolling down the page.
    Any suggestions?

    When you say ''"It will go between my previous pages that I've visited"'' like clicking Back button to go to a previously browsed webpage ?? OR does your current Tab switches back/forth to previous/next tabs located in the Tab Strip(Tab bar) ??

  • How do I disable the flipping back and forth between pages with PgUp and PgDn? Please tell me that I can!

    As of Firefox 4, it seems to have been decided that PgUp and PgDn are now buttons with which you flip back and forth between pages. To me, this essentially means almost losing valuable information because I actually use those to go up and down pages, so I wonder; How do I disable this new and utterly inconvenient feature?
    Please tell me that I can!

    In your system details, I see this plug installed: ''Macromedia Shockwave for Director Netscape plug-in, version 8.0''
    You also appear to have a later one, though still out of date installed namely, ''Adobe Shockwave for Director Netscape plug-in, version 11.5 ''
    First of all, click the orange Firefox button, go to Add-ons, then Plugins and disable the Macromedia version.
    Then go to http://get.adobe.com/shockwave/ and update the other one.
    If the problem persists afterwards, try running Firefox in [[Safe Mode]]. If it functions properly in that configuration, then one of your add-ons is the culprit.

  • MMy iPhone 4s is struggling to send messages and dial out.. service is going back and forth between Verizon with a little circle, Roaming, and No Service.. Best fix for this problem..? Thanks

    My iPhone 4s is struggling to send messages and dial out.. Service is going back and forth between Verizon (with a little circle), Roaming, and No Service.. Best fix for the problem..?
    Thanks

    My iPhone 4s is struggling to send messages and dial out.. Service is going back and forth between Verizon (with a little circle), Roaming, and No Service.. Best fix for the problem..?
    Thanks

  • Three finger or two finger gesture to move back and forward between pages of file only work on safari, unlike with old os. this new lion won't let me do it. Any help?

    three finger or two finger gesture to move back and forward between pages of file only work on safari, unlike with old os. this new lion won't let me do it. Any help?

    I have decided to dedicate this thread to the wonderful errors of Lion OSX. Each time I find a huge problem with Lion I will make note of it here.
    Today I discovered a new treasure of doggie poop in Lion. No Save As......
    I repeat. No Save As. In text editor I couldn't save the file with a new extension. I finally accomplished this oh so majorly difficult task (because we all know how difficult it should be to save a file with a new extension) by pressing duplicate and then saving a copy of the file with a new extension. Yet then I had to delete the first copy and send it to trash. And of course then I have to secure empty trash because if I have to do this the rest of my mac's life I will be taking up a quarter of percentage of space with duplicate files. So this is the real reason they got rid of Save As: so that it would garble up some extra GB on the ole hard disk.
    So about 20 minutes of my time were wasted while doing my homework and studying for an exam because I had to look up "how to save a file with a new extension in  mac Lion" and then wasted time sitting here and ranting on this forum until someone over at Apple wakes up from their OSX-coma.
    are you freaking kidding me Apple? I mean REALLY?!!!! who the heck designed this?!!! I want to know. I want his or her name and I want to sit down with them and have a long chat. and then I'd probably splash cold water on their face to wake them up.
    I am starting to believe that Apple is Satan.

  • How do I text back and forth between iPads with only wifi capabilities

    How do I text back and forth between iPads with only wifi capabilities

    Using FaceTime http://support.apple.com/kb/ht4319http://support.apple.com/kb/ht4319
    Troubleshooting FaceTime http://support.apple.com/kb/TS3367http://support.apple.com/kb/TS3367
    The Complete Guide to FaceTime + iMessage: Setup, Use, and Troubleshooting
    http://tinyurl.com/a7odey8http://tinyurl.com/a7odey8
    Troubleshooting FaceTime and iMessage activation
    http://support.apple.com/kb/TS4268http://support.apple.com/kb/TS4268
    iOS: FaceTime is 'Unable to verify email because it is in use'
    http://support.apple.com/kb/TS3510http://support.apple.com/kb/TS3510
    Using FaceTime and iMessage behind a firewall
    http://support.apple.com/kb/HT4245http://support.apple.com/kb/HT4245
    iOS: About Messages
    http://support.apple.com/kb/HT3529http://support.apple.com/kb/HT3529
    Set up iMessage
    http://www.apple.com/ca/ios/messages/http://www.apple.com/ca/ios/messages/
    iOS and OS X: Link your phone number and Apple ID for use with FaceTime and iMessage
    http://support.apple.com/kb/HT5538http://support.apple.com/kb/HT5538
    How to Set Up & Use iMessage on iPhone, iPad, & iPod touch with iOS
    http://osxdaily.com/2011/10/18/set-up-imessage-on-iphone-ipad-ipod-touch-with-io s-5/http://osxdaily.com/2011/10/18/set-up-imessage-on-iphone-ipad-ipod-touch-with-io s-5/
    Set Up Alert Sounds
    http://www.quepublishing.com/articles/article.aspx?p=1873027&seqNum=3http://www.quepublishing.com/articles/article.aspx?p=1873027&seqNum=3
    Extra FaceTime IDs
    http://tinyurl.com/k683gr4http://tinyurl.com/k683gr4
    Troubleshooting Messages
    http://support.apple.com/kb/TS2755http://support.apple.com/kb/TS2755
    Troubleshooting iMessage Issues: Some Useful Tips You Should Try
    http://www.igeeksblog.com/troubleshooting-imessage-issues/http://www.igeeksblog.com/troubleshooting-imessage-issues/
    Setting Up Multiple iOS Devices for iMessage and Facetime
    http://macmost.com/setting-up-multiple-ios-devices-for-messages-and-facetime.htmhttp://macmost.com/setting-up-multiple-ios-devices-for-messages-and-facetime.htm l
    FaceTime and iMessage not accepting Apple ID password
    http://www.ilounge.com/index.php/articles/comments/facetime-and-imessage-not-acc epting-apple-id-password/http://www.ilounge.com/index.php/articles/comments/facetime-and-imessage-not-acc epting-apple-id-password/
    Fix Can’t Sign Into FaceTime or iMessage iOS 7
    http://ipadtutr.com/fix-login-facetime-imessage-ios-7/http://ipadtutr.com/fix-login-facetime-imessage-ios-7/
    FaceTime, Game Center, Messages: Troubleshooting sign in issues
    http://support.apple.com/kb/TS3970http://support.apple.com/kb/TS3970
    Unable to use FaceTime and iMessage with my apple ID
    https://discussions.apple.com/thread/4649373?tstart=90https://discussions.apple.com/thread/4649373?tstart=90
    How to Block Someone on FaceTime
    http://www.ehow.com/how_10033185_block-someone-facetime.htmlhttp://www.ehow.com/how_10033185_block-someone-facetime.html
    My Facetime Doesn't Ring
    https://discussions.apple.com/message/19087457#19087457https://discussions.apple.com/message/19087457#19087457
    How to watch FaceTime calls on the big screen with Apple TV
    http://www.imore.com/daily-tip-ios-5-airplay-mirroring-facetimehttp://www.imore.com/daily-tip-ios-5-airplay-mirroring-facetime
    Send an iMessage as a Text Message Instead with a Quick Tap & Hold
    http://osxdaily.com/2012/11/18/send-imessage-as-text-message/http://osxdaily.com/2012/11/18/send-imessage-as-text-message/
    To send messages to non-Apple devices, check out the TextFree app https://itunes.apple.com/us/app/text-free-textfree-sms-real/id399355755?mt=8https://itunes.apple.com/us/app/text-free-textfree-sms-real/id399355755?mt=8
    How to Send SMS from iPad
    http://www.iskysoft.com/apple-ipad/send-sms-from-ipad.htmlhttp://www.iskysoft.com/apple-ipad/send-sms-from-ipad.html
    How to Receive SMS Messages on an iPad
    http://yourbusiness.azcentral.com/receive-sms-messages-ipad-16776.htmlhttp://yourbusiness.azcentral.com/receive-sms-messages-ipad-16776.html
    Apps for Texting http://appadvice.com/appguides/show/apps-for-textinghttp://appadvice.com/appguides/show/apps-for-texting
    You can check the status of the FaceTime/iMessage servers at this link.
    http://www.apple.com/support/systemstatus/http://www.apple.com/support/systemstatus/
     Cheers, Tom

  • Using code, I'd like to animate a movieclip so that it sways back and forth

    I'd like a piece of text to basically move around
    slightly....like it's floating. Just a slight back and forth, maybe
    a little up and down. Real subtle though.
    how would i do this with code. Can you please help me.
    Thanks

    make a movieclip then give it a instance name then create a
    minFloat (x,y) and maxFloat (x,y) variables to hold the minumum and
    maximun float from origional position then create a looping
    function that will contain a randomFloat variable to generate a
    random number and check to make sure it will not move past the max
    float (x,y) or regenerate another random number then once it finds
    a number tell it to move. I would create a move function to ease in
    and out the movement to add your subtleness and have the looping
    function fire the move function once it gets a correct
    randomFloat.

  • Navigation back and forth between anchor points with "prev" and "next" buttons?

    Hi all,
    I am working on a horizontal layout site that has anchor points on each part. As the user scrolls, it snaps to each anchor point. It works fine with just the mouse wheel, but I'd like to have previous and next buttons that allow for easy navigation between the points. I know on each section I can have the buttons to jump from say A>B>C and then C>B>A, but this is a single "prev" and "next" set of buttons that are pinned to the page. So, as the page scrolls left to right, the buttons stay put. Is there a way to just have them go to the previous and next point in the line, rather than linking a button to anchor point A/B/C, etc?

    I'm not sure I'm making my question very clear. Your response doesn't address what I'm asking, unfortunately. I know how to make buttons that are linked to individual anchor points. But I'm trying to make buttons to link to the next anchor point, or a specific spot on the page. Think of how you would navigate on a horizontal page, that's what I'm looking to duplicate.

  • Prior to updating the iphone 5 to ios.7, i used to be able to go to Notes and scroll through all listings until I found what I wanted.  Now i am only able to view one page at a time and have to back and forth between the main menu and each page.  Help?

    Prior to updating my iPhone5 to the "new and improved" ios.7, I used to be able to go to my Notes app and scroll through the various categories until I found the item I was looking for.  Now, under the "improvements" I have to open each page, one at a time, until I find the desired category.  This strikes me as a big step backword.  Any solutions in the community?

    Have you tried restarting or resetting your iPhone?
    Restart: Press On/Off button until the Slide to Power Off slider appears, select Slide to Power Off and, after It shuts down, press the On/Off button until the Apple logo appears.
    Reset: Press the Home and On/Off buttons at the same time and hold them until the Apple logo appears (about 10 seconds).
    Also consider deleting and reinstalling the Mail Account in question.

  • When i try to purchase an app that is free, i click the install green button and it just goes back to the free button and i can't download it?  it just toggles back and forth between free and install.  Please help.

    When I try to purchase any free app, I try to click the green install button and it toggles between the install and free icons in the app store.  Tried rebooting and also syncing iphone to computer but no luck.  Any suggestions?

    If resetting the iPad doesn't help, try these things.
    Quit the App Store app completely and restart the iPad. Go to the home screen first by tapping the home button. Double tap the home button and the task bar will appear with all of your recent/open apps displayed at the bottom. Tap and hold down on any app icon until it begins to wiggle. Tap the minus sign in the upper left corner of the app that you want to close. Tap the home button or anywhere above the task bar. Restart the iPad.
    Restart the iPad by holding down on the sleep button until the red slider appears and then slide to shut off. To power up hold the sleep button until the Apple logo appears and let go of the button.
    If that doesn't work - sign out of your account, restart the iPad and then sign in again. Settings>iTunes & App Store>Apple ID. Tap your ID and sign out. Restart the iPad by holding down on the sleep button until the red slider appears and then slide to shut off. To power up hold the sleep button until the Apple logo appears and let go of the button. Go back to Settings>iTunes & App Store>Sign in and then try to download an app again.
    If that fails, try downloading something in iTunes. There is free content in there so find something that you don't have to pay for and download it. If that works, try the App store again.

  • Why is my ipad 4 suddenly going back and forth between the logo screen and lock screen and wont reset when i hold the power and home buttons down? please help, apple store is very far from my house

    my ipad has never been dropped or overheated, but suddenly the screen went to the lock screen and then the logo screen and it keeps doing that. i tried resetting but its unresponsive. is this a common issue with ipad and whats wrong with it? i was checking the AccuWeather app when this happened and my battery was full if that helps. thanks

    Thank You, thank You ...so much......that feature made me crazy!  
    Ocean20 wrote:
    This can be turned off in settings/accessibility/zoom. Then on the next screen turn off

  • How to go back and forth between my windows and Mac after installing windows with boot camp?

    Im in my Mac and I want to go back to my windows but dont know too.

    Restart with the Option key held down, or use the Startup Disk pane of System Preferences, or the Startup Disk control panel in Windows.
    (124963)

  • How do I change back and forth between screen names with iChat AV?

    Im completely new to the iMac system thing so when I signed into ichat, everything worked fine. But then I wanted to sign out and switch to a different screen name and couldn't do it. It just kept signing into my screen name without asking my password. How do i change this?
    Message was edited by: SC391

    Go to iChat Preferences>Accounts and click on the account you want to use, then check "use this account" or click on the + sign at the bottom and create a new account if that's what you want.

  • Command Button colors corrupt after switching back and forth from design view.

    I would say my experience level with Access is "getting there."
    I therefore don't thing I'm making a newbish mistake.
    Has anyone else noticed this?  As it's bugging me quite badly.
    1.  A command button has had it's color formatted (pressed, hover, etc. nothing fancy)
    2.  It works fine.
    3.  In my navigation form, if I switch to design view, then select a given sub-form... like "customers" - and switch back out of design view, to form view - then without fail, all customized command buttons within that sub forms' color will 'corrupt'
    ie, change.
    4. Closing and reopening the navigation form (ie, my main menu) restores it, but the same thing will happen should I go back to design view for the sub form.
    5.  Finally - this behaviour does not happen when switching back and forth between views on the original form that isn't a sub form in the navigation form.  (Ie,. the main 'customers' form). 
    Can any clever folk give me a solution? :(
    Thanks,  
    Eric Rowlands
    EDIT - My apologies, I am using Access 2013 for a desktop database.

    1) We will need to understand whether the issue is seen on any sample database.
    2) IS this seen only on your system, we would need to check on other system also
    3) If the issue is seen in all system & issue is not seen in the sample database then this could be database specific issue
    4) As per my understanding the issue is consistent, we would need to find what is the VBA code or which code is used while designing this form.
    5) We would need to see if the issue is seen only on that particular navigation form?
    6) Is the button gets corrupt I mean to say non-usable once it get discolored ?
    7) What is your end goal just in case if you are able to work on your database i.e. when working on the navigation form without going in design view is issue still seen there ?
    8) Since when are you experiencing this issue ?
    9) If possible please provide me the environment details of your system & Access application, whether the issue is seen only in access 2010 can we check in access 2007 or in access 2013.
    I would really appreciate if you can answers the above questions this will really help us to isolate the issue further
    in terms of technical troubleshooting after answering the above question I might come up with another question so that we can do extensive isolating the issue so the if required we can involve the developer also.

  • TS2972 used to be able to pick out which songs in iTunes in my computer were not on a 2nd computer on homeshare in iTunes 10.  Now with V11, cant find the button that compares two libraries and finds the songs that are different.  Anyone know how to do th

    Used to be able to pick out which songs in iTunes in my computer were not on a 2nd computer on homeshare in iTunes 10.  Now with V11, cant find the button that compares two libraries and finds the songs that are different.  Anyone know how to do this now?

    Jneklason wrote:
    ~snip~
    I know this email is confusing and really hard to understand...perhaps now you will know how i've been feeling--lost and confused with all the mis-information, with a hit and miss phone, and out of time with all the 1 1/2 hr to 2 hrs EACH wasted on this issue.
    On top of all this, I can't even find out how to file a complaint with anyone higher up than Customer Service.
    I hate to tell you this, but you didn't write an email. You wrote a discussion post on the Verizon Wireless Community forum which is a public peer to peer forum. Unfortunately since you didn't mark your post as a question, the VZW reps that roam this community won't ever see your post. Before you re-post it, don't. Duplicate posts get removed from the community.
    I see there were several missteps both by the reps and yourself in your post. First you should have insisted on returning the phone within the 14 day return policy period. Second which Samsung Galaxy mini model did you purchase? The S3 mini or the S4 mini? Did you do any research prior to deciding on this device. The reps at that time deflected the easiest course of action, by trying to get you to replace the phone under insurance instead of returning the phone. The Early Edge payment option requires the current phone on the line using the early Edge must be returned to Verizon Wireless. Did you once considered going to a third party site like Swappa to purchase a gently used device for your daughter?

Maybe you are looking for

  • Externally Hosted DNS - How do I set up my 2003 DNS server for sub domain to point to internal IP address??

    I have a domain name(domain.com) DNS hosted at my ISP. I also have 3 sub domains DNS hosted at the same ISP pointing to various external ip addresses (mail.domain.com, vpn.domain.com and ts.domain.com). We want to set up sales.domain.com to point to

  • Output from ssoldif

    I am having a look of the possibilty of using LDAP for Portal authentication. I have changed some portal users passwords and some portal database schema's passwords such as "portal30" and "portal30_sso" from the default ones. But when I using "ssoldi

  • How can i transfer photos from my macbook to my imac without altering their quality

    I am trying to transfer photos from my macbook to my imac, with the same version og iphoto, but it seems that the imac is having trouble to give me clean photos, as if it was putting 2 images, one on the other.... any suggestion for a clean and quick

  • Select first rows with rowno

    Problem: I search for 20 companies with highest turnover in a table. Its a dynamic SQL (created at runtime), I can not use a hard coded fetch of 20 rows. (Example is a simple table with companyID, turnover and a key) I read in documentation, that fir

  • How to group in ssrs?

    Hello everybody I have a two columns with following values Column1   Column 2 A                1 A                 2 B                3 B                4 I want the output as follows A 1 2 B 3 4 i.e i want the grouping o n the basis of Column1 Can s