Easy Inner Popups in Flash CS4 & CS5- Part 2

Best Viewed in HD Format

Learn how to create inner popups using the UILoader component in Flash CS4. (This procedure is nearly identical in CS5.) Load any external SWF as a popup. Create as many popups as you need. Part 1 and Part 2 walk you through the entire process, from configuring the component to creating a close button movie clip, to scripting the popup.

Part 2 covers writing the ActionScripts and creating a Close button.

Learn this and other techniques in William Harrel’s Introduction to Adobe Flash CS4 (and soon to be released Introduction to Adobe Flash CS5) Course at Ed2Go.

Click here to download popups.fla.

William Harrel – williamharrel.com



18 Replies to “Easy Inner Popups in Flash CS4 & CS5- Part 2”

  1. Hey Thx for this!

    I have a Q, i am putting different popups in my flash, this in the same frame. When i repeat the process for new buttons.

    The uploader is giving me the same jpg file i have from the first sett up. I have changed the source in each frame, but this is giving me the jpg from the first sett up.

    How do i fix this? So i can have from each button a different jpg.

    Wesley

  2. Thx for the reply.

    I have created in frame 1 different buttons like orpheus creations, fortuna republica button and so on. On frame 120 i have created the UIloader with source orpheuscreations.jpg to hit button orpheus creations on frame 1. On frame 121 i have created the UIloader with source fortunarepublica.jpg to hit button fortunarepublica on frame 1.

    When I play the movie and hit on button fortunarepublica I get image orpheuscreations.jpg in stead of fortunarepublica.jpg.

    How do I fix this? So fortunarepublica button shows fortunarepublica.jpg?

    Is this more clearer? If not I also can send the .fla file, so you can see it yourself?

  3. thx for your fast reply.

    Let me explain it in better words.

    On frame 1 I have different set of buttons like orpheus creations button, fortuna republica button, and so on. I have created on frame 120 the UIloader with source orpheuscreations.jpg to hit on frame 1 button orpheascreations. On frame 121 I have created the UIloader with source fortuanrepublica.jpg to hit on frame 1 button fortunarepublica.

    When I test the movie, and hit the button fortunarepublica I get orpheuscreations.jpg instead of fortunarepublica.jpg. I have looked into all the variables, but everything is okay.

    So how can I fix this problem? So when I hit the button fortunarepublica to show fortunarepublica.jpg?

    Is this more clearer? or do u need to see my .fla? I can send it if you want. Because I cant figure it out.

    Thx!

  4. Two things I can think of:

    Make sure you have the right file called out in “source” in Component Inspector. Also, with this method you’ll need a separate frame and script for each button and instance of UILoader. The scripts need unique instance names and function names.

    Hope this helps.

  5. Thank you for your reply.

    I have all done that, but still it doesnt work.

    I have double checked it…

    Still it is getting orpheuscreations.jpg instead of fortunarepublica.jpg

    ……..
    …..
    ….

    Hope u can help me more

  6. Thanks a lot for the tutorial on pop up, I had searched as you did a method for this and finally got to your site. You did a great job, congratulations!

  7. I run into trouble, AS2 seems doesn´t have UILOADER as a component, I tried the “LOADER” component built in AS3 but, no luck. Do you have anysugestion?

  8. Sorry I took so long to answer. Very hectic last few days. I’m a little confused by your question. If you use AS3, you have access to UILoader. It debuted in CS3 with AS3. It’s in the Components panel or you can call it with some pretty basic AS3 code, like this.

    import fl.containers.UILoader;

    var myLoader:UILoader = new UILoader();

    //Now define the your first myLoader instance

    //position on the stage
    myLoader.x = 200;
    myLoader.y = 200;

    //size
    myLoader. w = 200;
    myLoader.h = 200;

    //content to load
    //text, SWFs, JPG and so on

    myLoader.source = filename.swf

    //many, many properties you can assign

    //load UIloader

    addChild(myLoader);

    and there are zillions of ways to load it, unload, and us it.

    Check out this video. He uses Loader, but it will work exactly the same with UILoader.

  9. First off: Thank you for your answer William!
    I´m very, very sorry for the confussion and for the trouble to make you coding.
    It was a typo, I´m using AS2 not AS3 , I´m ashamed…….

    I´m a noob and I´m using AS2 because I found “behaviors” (only available in AS2 I guess) very handy to use to do the “go and stop” function without the need to write the code. I guess I´m going to switch to AS3 now.

    Thanks a lot for your time!

  10. Hey there, I just thought you’d like to know that your blog’s layout is all messed up in Avant (browser) for some reason. You might want to check out your HTML code. -Philip

  11. Thank you for that, but the code meets w3c standards and Avant is not using it correctly. I won’t introduce errors so that an obscure browser can use it.

  12. Hi William

    Thanks a lot for your tuto…. Helpful

    I haven’t find the sources files with your link

    Can you help me through this ?

    Thanks

  13. Hi William,
    I cant get source file popups.fla either.
    can you help with link please.
    thanks
    Peter

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.