Need HELP loading and unloading SWFs external when the user clicks on the buttons

Hi everyone, I'm working on a few Web sites at the moment, one for being my online portfolio, as well as my Web site for a product of sleep, that I'm selling.  I have very little experience with AS3, last time I created a Web site that as2 has been used.  I tried a few tutorials online, but nothing performs the work, there is always an error...

I have an index.swf that loads the default home.swf.   There is also an about.swf, contact.swf, order.swf and testimonials.swf...

It was a hair pulling 4 days now, not be able to get this working.

All I need is for the swf external to pull up when you click on the corresponding button, and when the next button is clicked, the current to unload swf and swf to load new file.  It was so simple with AS2, you would think things could be as easy, if not easier.   So any help that all the world can offer, I would be so very you happy for me!  If necessary I can copy my current code, even if it doesn't work!   Thanks, Mike

var loader: Loader = new Loader();

addChild (loader);

home_btn.addEventListener (MouseEvent.Click, loadF);

about_btn.addEventListener (MouseEvent.Click, loadF);

contact_btn.addEventListener (MouseEvent.Click, loadF);

function loadF(e:Event):void {}

Loader.Load (new URLRequest (e.currentTarget.name.split ("_") [0] + ".swf")); / / assuming that each reference button is also the button's name property

}

Tags: Adobe Animate

Similar Questions

  • With the help of a button to load and unload the external SWF in AS3?

    How can I use a button to load and unload a sequence of external SWF files, as a Next button and previous?

    I don't know if it will work because apparently you are trying to load a swf AS1/2, but try

    change the line to be...

    _swfTempClip = MovieClip (event.target.content);

    If this does not work, then you will need to create _swfTempClip as a new MovieClip and add the event.target.content to this MovieClip using addChild().

  • Loading and unloading of the external swf with buttons

    Alright. Here's the deal. I have 7 buttons on my main page, on the left side of the screen. I want the buttons to the external swf on the right to load and unload then when you push a different button. Should I make a table? Do I need a clip vacuum film to load each swf in?

    ///////////////Buttons/////////////////////

    graphics - load the thumbnail scroll bar

    mixed technique - load the thumbnail scroll bar

    photography - load the thumbnail scroll bar

    illustration - charge the miniature scroll bar

    Words - list history of charges

    Contact - contact information of charges

    charges about - bio

    ////////////////////////////////////////////

    Thanks for any help.

    If you are unable to publish for flash player 10, you will need to use the instead of unloadAndStop() unload() method.

  • Can we load and unload the files in the run time?

    Can we load and unload the files in the run time?

    For example, there are four files named 'test1.h & test1.c' and another series 'test2.h & test2.c' (I have attached as an attachment to this post).

    test1.h contains the code:

    int variable; variable declared as integer

    test1.c contains the code:

    variable = 1; variable a value assigned

    test1.h contains the code:

    char * variable. variable declared as string

    test1.c contains the code:

    variable = "EXAMPLE"; a string that is assigned to variable

    So here, in this case can I dynamically load / unload first & second group files so that the same variable "variable" name can be used as an integer and string? And if so, how to do?

    Hi pa1majeti,

    You cannot simply consider that some code is loaded into memory or not: all code in a compiled application is permanently in memory unless you divide your application into DLLs that you dynamically load if necessary and remove if is no longer necessary.

    But as I understand from your description, you're better given the amount of memory occupied by the data (i.e. the contents of the variables) rather than the code. If this is the case, your only option is to allocate memory for variables dynamically and free it after it has been used. Now, even if this option is useful if you are using large networks of data, there is little or no effect on the unique variables.

    A final Council, given the huge memory installed on modern computers, are you sure you really need that extra work? I mean, the dynamic allocation of memory involves some additional precautions in programming: check the errors on each function malloc or calloc, check that the pointer is valid before each use, freeing pointers before reassignment in order to avoid memory leaks and so forth, so a balance must always be sought between the memory and the difficulty in programming.

  • I need help on how to audio output when I go. I ticked the box at the bottom, but when I go to view my video on quicktime, it does not play audio.

    I need help on how to audio output when I go. I ticked the box at the bottom, but when I go to view my video on quicktime, it does not play audio.

    GUYS, I GOT IT. AND THE SOLUTION IS WAYYYYY WITH JUST A RENDERING. So after countless time I spent trying to make it, I found a way that me really happy that my old rendering has not worked. All you have to do is download adobe media encoder and BAM your gold. I make it in h.264 that i couldt using the old rendering and now it works fine.

  • I need help to write a script that detects the first instance of a paragraph style and then change

    I need help to write a script that detects the first instance of a paragraph style and then he goes to a different paragraph style.  I don't necessarily need someone to write all this, by the biggest problem is to find how to find just the first instance of the paragraph style.  Any help would be greatly appreciated, thank you!

    Hello

    then try this with your active doc:

    ....................

    myDoc var = app.activeDocument;

    mStyle var = myDoc.paragraphStyles.item ("PS_NameToFind"); change the name to paraStyle

    var mStyle_1 = myDoc.paragraphStyles.item ("PS_NameToChange"); change the name to paraStyle

    var mFrames = myDoc.pages.everyItem ().textFrames.everyItem () .getElements ();

    app.findTextPreferences = null;

    app.findTextPreferences.appliedParagraphStyle = mStyle;

    for (var k = 0; k)< mframes.length;="">

    {

    currFound = mFrames [k] .findText ();

    If (currFound.length > 0)

    currFound [0] .paragraphs [0] .appliedParagraphStyle = mStyle_1;

    }

    app.findTextPreferences = null;

    ................

    Rgds

  • I need help for Windows Vista black screen during the connection, even with the login screen removed

    Hey, I have a problem in Windows Vista:

    I've been updating / updated my graphics card and it is the graphics card, I'm updating, after a while, a black screen will appear (PITCH BLACK) and I there is no cursor and I tried Ctrl + Alt + Delete, but nothing seems to work, after I turned off my laptop, starts to load then it was the new dark night! (NO LOGIN SCREEN). Then I turned off my laptop then I constantly pressed f8, then I pressed "Computer repair" then it loads then my screen showed "Another user", then I clicked it then I had to type my ID but I have no details of connection, I pressed on enter with no connection details, but this still does not work because I had to type in my login information. I tried everything, then I went to safe mode and fact a password and changed my admin account type, then I rebooted my laptop, then I have constantly pressed f8 and pressed "Computer repair" then it loads and then my screen showed 'Another user' again... .

    PLEASE I NEED HELP! I WANT TO PLAY MY GAMES!

    Hello

    Follow the steps below:

     

    Method 1: Do the Startup Repair to fix the problem.

    See the following article for more information on the Startup Repair:

    Startup Repair: frequently asked questions

    http://Windows.Microsoft.com/en-us/Windows-Vista/startup-repair-frequently-asked-questions

     

    Method 2: Use the Bootrec.exe tool in the Windows recovery environment to troubleshoot and repair startup issues in Windows

    For instructions, see the following article:

    How to use the Bootrec.exe tool in the Windows recovery environment to troubleshoot and repair startup issues in Windows

    http://support.Microsoft.com/kb/927392

    Let us know if that helps.

  • Microsoft Lifecam 5000. Whenever I'm recording video with her, during playback, I hear clicking on and a beep sound when the camera focuses

    Hello, I have problems with my Microsoft Lifecam 5000. Whenever I'm recording video with her, during playback, I hear clicking on and a beep sound when the camera is focusing. If I put it to my ear, the sound is low but I can still here it when it focuses.

    Hello

    Thanks for posting in the Microsoft Community Forum.

    I understand from your description, that you get beep when the camera is focusing.

    To better understand the question, please answer the following questions:

    1. have you made changes on the computer before this problem?
    2. is it works much earlier?

    Come back with more information to help you better.

    I suggest you to download and install the latest drivers for Microsoft Lifecam 5000 from the link provided:

    http://www.Microsoft.com/hardware/en-us/d/LifeCam-VX-5000

    You can even try recording by reducing the volume on the computer to the minimum level (mute) just to check if beep occurs.

    http://Windows.Microsoft.com/en-us/Windows7/adjust-the-sound-level-on-your-computer

    For more information, see the link below:

    http://www.Microsoft.com/hardware/en-us/help/support/troubleshooting/webcam/LifeCam-Setup

    Hope the above information is helpful. If you have any question back to us, we are happy to help you.

    Thank you.

  • The program monitor has yellow cast and red vertical lines when the video is paused

    The program monitor yellow cast and red vertical lines when the video is paused, I'm not reading. I'm not on external or monitor.

    Thank you!!!   works now! If all goes well there will be an update soon.

  • We have 2 phones and 2 computers and they all sound when the phone rings. How to change that? they all use the same apple ID

    We have 2 phones and 2 computers and they all sound when the phone rings. How to change that? they all use the same apple - ID we buy apps and music coming from the same account. It all works very well, but we don t like any other device to RING eveytime a phone rings.

    Thank you so much: D

    ON both phones, check the settings > phone > call on other devices > Off.

  • the friends hyii UA HUD need help how to make a backup of the files from his deleted with (shift + delete) memory card

    the friends hyii UA HUD need help how to make a backup of the files from his deleted with (shift + delete) memory card

    Hello

    It seems that you want to restore the files removed from the memory card.

    I will definitely help you with this.

    I would say you can search the Internet for data recovery software by using your favorite search engine.

    Warning: Using third-party software, including hardware drivers can cause serious problems that may prevent your computer from starting properly. Microsoft cannot guarantee that problems resulting from the use of third-party software can be solved. Software using third party is at your own risk.

    It will be useful. If you have any other questions, feel free to let us know. We will be happy to help you.

    Thank you.

  • How to display a .swf image when the film is disabled?

    I wonder how to display an image or a swf image when the film is not play. Any information appreciated. Thank you!

    A swf is never really off if it is displayed. But if you want something to show when there is nothing going on in the file, then just do sit in a frame with any content you intend to display.

  • TabNavigator - how to change what happens when a user clicks a tab

    I use a TabNavigator in my Flex application and I wish I could change what happens when a user clicks on a tab on the TabNavigator. I'd like to be able to manage the click on the tab myself and prevent Flex parade is the default actions. Someone has an idea how to do this? Any help would be appreciated!

    Mike

    I think you need to add an event listener for the TabNavigator to 'change' event

    In this case, you have access to the old tab and the new index of tab. If there is a problem, I think you can just reset the tab on the old index or whatever it is you do.

  • Why don't the LOCKING of upper CASE indicator showing when the button?

    Why don't the LOCKING of upper CASE indicator showing when the button?

    A CapsLock indicator should be part of installation Win7 OS normal and here's why.  I use a brand new Microsoft Wireless Keyboard 2000 s/n 0356100416937.  I can send you a photo or the retail sales receipt if you doubt this statement.  It is there no CapsLock indicator on the keyboard itself, probably to extend the life of the battery.  I also use an IOGEAR KVM switch to facilitate the transition between multiple computers.  Emule KVM switch a keyboard of 102 standard keys, so even if I load the last Ko-driver (MS Intellitype 8.2) the pilot reports Microsoft keyboard not detected.  Therefore, there is no way to determine when the CapsLock key is active.  If you have ever tried to enter a long password upper-lower case with the CapsLock key in the wrong state, so you can imagine my frustration with this keyboard.

    So, how do you display CapsLock indicator?

    REMOTELY, HP TECHNICAL SUPPORT TOOK ME AND MY 520TOUCHSMART AS I HAD AN INDICATOR OF CAPS LOCK ON MY SCREEN, NOW HE IS GONE. I GAVE THEM MY MS OFFICE2010 CELA: NOW I FOUND SOMETHING ELSE. I LACK WILLINGNESS TO CONTACT OF COURSE FRIDAY. IF I FIND A SIMPLE SOLUTION TO MY PROBLEM, I'LL POST IT. SOMEONE HAS AN IDEA?

  • Captivate 9 - trying to switch between the States of an object when a user clicks on this object?

    Try to switch between the States of an object when a user clicks on this object? I have successfully used the function of the State of the object to change the object to a different State, but I need it back to its Normal state when it is selected again in the State has changed and then continue to turn every State when you click on it. It is an interaction of flashcard. I can do this using several objects and hide/show, but I would do it with States and unique objects.

    You're talking about custom or InBuilt States. What kind of action do you use: a simple or advanced/shared action?  If you simply switch between two States, use the approach I described in this blog post:

    1 share = 5 buttons toggle - Captivate blog

    You will probably need a user variable to track the status, but you can use the shared conditional action described in this blog.

Maybe you are looking for

  • NEED HELP! Error "WindowsUpdate_80070005" "WindowsUpdate_dt000"

    I tried to get vista update and I get this error-'WindowsUpdate_80070005""WindowsUpdate_dt000"I have configured my mail account and this also seems unable to work and keeps asking me to verify the details of password & account (when it works fine on

  • AutoPlay does not open (as it was)...

    AutoPlay does not open (as it did) when I connect iPhone via USB for importing pictures into my computer (Vista). I selected run Autoplay box and selected "Ask Me every time". From what I read, it seems that a recent update may be what is cancelling

  • CPU at 100% game dosen't work

    It IS PAST MY COMPUTER IS FINE THEN DRANK WOOOSSH 100% AND THEN MY FAV GAME STOPS WORKING AND WINDOWS AND BOOM DEAD I RESTART AND STILL W0OOOOOOSH 100% please help cause I love this computer. Here are my computer details: Windows 7 Pro x 64 bit Penti

  • Unable to connect to the internet, the TPM secure

    All of a sudden from this afternoon, I get the message below: "There was a problem connecting to the module of TPM (safety device) on this computer. It is possible that the software anti-virus or firewall is blocking the connection. A missing or disa

  • YouTube widget problem "blocked plugin" revisited? (NEW!)

    Okay, it's the old problem "blocked plugin" once again when I go to import a video from YouTube in Muse... wait, it's a little different...I'm definitely sticking in the right code of YouTube. Here's the full URL:Experience of CWD Intro - YouTube.. .