Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 8 of 8
  1. #1
    New to the CF scene
    Join Date
    May 2008
    Posts
    4
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Question SWF file in Flash MX

    New user with an older version of Flash. "Flash MX"
    need to create a one page album with 4 different albums

    here is the problem
    i have the text typed out "Album1 Album2... and so on"
    viewing the movie i can click A1 and it works fine, then A2 and works fine the issue starts when i try to click back over to A1 from A2 it will not go back to the first album. here is the code i have down for it.

    text button code on (press) {
    loadMovieNum("album1", 2);
    }


    also i have this in the scene for the button

    on (press)
    {loadMovieNum("album1.swf", 2);
    gotoAndPlay("Level 2");
    }


    Album 2

    on (press) {loadMovieNum("album2.swf", 3);
    gotoAndPlay("Level 3");
    }


    can anyone please help me with this. its very frustrating and i am new to this
    Thank you.

  • #2
    Senior Coder gnomeontherun's Avatar
    Join Date
    Sep 2007
    Location
    Houston
    Posts
    2,846
    Thanks
    10
    Thanked 238 Times in 229 Posts
    The will be issues when reloading the same movie again and again, since you already loaded it once onto Layer 2. You should put a conditional statement which checks if that layer has already been loaded before reloading it.

    Then another issue is that things on the top layer are going to stay visible while things below are going to be hidden by the upper layers. You should place your SWFs into movieclips to have more flexibility as to how they are displayed.

    Code:
    loadMovieNum("album2.swf", _root.movieClipName)
    Then you can use the swapDepth to switch which clip is on top or bottom.

    This may sound confusing, but take it step by step and look up the methods for each of the processes.

  • Users who have thanked gnomeontherun for this post:

    Flashy (05-06-2008)

  • #3
    New to the CF scene
    Join Date
    May 2008
    Posts
    4
    Thanks
    1
    Thanked 0 Times in 0 Posts
    Thank you for your help!

    i now have an error.

    "Error opening URL "file:///C|/DOCUME%..."

    on (press) {
    loadMovieNum("album1", 2);
    _leve2;
    }

    so that is what i had to start with.

    then you helped me out and this is what i have.

    on (press) {
    loadMovieNum("album1", 2);
    loadMovieNum("album1.swf", _root.movieClipName);
    _leve2;
    }


    also i do not understand where to put in swapDepth

    Thank you again.

  • #4
    Senior Coder gnomeontherun's Avatar
    Join Date
    Sep 2007
    Location
    Houston
    Posts
    2,846
    Thanks
    10
    Thanked 238 Times in 229 Posts
    Ok what I gave you isn't the real code, but rather the structure of the code. You need to look up what loadMovieNum does and realize that it requires.

    Lets start with the first thing I said - conditionals.
    Code:
    on (press) {
         if (!movieClipName) {
               loadMovieNum("album1.swf", _root.movieClipName);
         }
    }
    This should check if the movie has already been loaded into a clip named movieClipName. You need to change those variable names to something appropriate and place a blank movieClip on your site with the same instance name as the variable.

    How much about Flash do you know at this point, or how long have you been doing this? This may help me to answer your question better, or if I should point you to tutorials instead to catch up to a level of working knowledge.

  • #5
    New to the CF scene
    Join Date
    May 2008
    Posts
    4
    Thanks
    1
    Thanked 0 Times in 0 Posts
    just the basics. i have been looking at tutorials online and such to help.
    i also have been reading up on the code and trying to figure that out.
    not long at all. i have had a small class on it. that only hit the very basic topics
    such as how to make buttons and movie clips as well as learning a few actions.
    and what makes the learning process difficult is that the class was taught with Flash 8. but i am doing the albums using Flash MX.

  • #6
    Senior Coder gnomeontherun's Avatar
    Join Date
    Sep 2007
    Location
    Houston
    Posts
    2,846
    Thanks
    10
    Thanked 238 Times in 229 Posts
    Going backwards is hard. I just looked and FLash 8 sells for a measly 60 bucks on some sites. Might be worth getting just for sanity's sake.

    I suppose the reason I asked your experience is I wasn't sure if your program design was necessary. Are you just doing this to learn more, or is this a real project of some kind? I would rather help you make something with a better design if its for something practical. If its just to learn more, then we can keep going.

  • #7
    New to the CF scene
    Join Date
    May 2008
    Posts
    4
    Thanks
    1
    Thanked 0 Times in 0 Posts
    It is a small project.
    i am also using it as a learning process as well.
    i agree that learning what i know on flash 8 then working on an actual project with flash mx is very difficult. so many things are different with the two.

  • #8
    Senior Coder gnomeontherun's Avatar
    Join Date
    Sep 2007
    Location
    Houston
    Posts
    2,846
    Thanks
    10
    Thanked 238 Times in 229 Posts
    Is there any reason to try and include external SWF files into the document? Why not just make different points on the timeline which you can jump between instead? That would be a simpler solution in most cases.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •