Link to home
Start Free TrialLog in
Avatar of inverted_2000
inverted_2000Flag for United States of America

asked on

Flash - Basic User Interaction Questions

Hello everyone,

I'm working my way through a Flash site for my friend that is about to be apart of an art show where he is going to make new contacts and show off some of his work.  I'm building his site as a favor, and am learning Flash as I go.  I am experience with animation in Flash, but not so much with the ActionScript and navigation aspect.  

I've already gotton the loader scene completed, and it throws the user into the main movie scene.  This is where I need help with.

Please view what I am trying to accomplish to better help you understand what I am asking:
http://www.ncwave.com/ds/flashmovie.jpg

When the main movie loads, I would like to have an option bar at the top right of the screen.  Whatever option the user selects, I would like another window to appear at the bottom left of the window.  Then the user can select what items that they would like to view and a preview of that item will appear in the lower right hand corner.

So for example, like the screenshot of the movie details:
1) User clicks on "Art"
2) Art window appears showing pieces of work.
3) User clicks on the piece that they want to see
4) piece of art appears in the lower right hand corner.

To view the whole movie so far please visit:
http://www.ncwave.com/ds/

Thank you very very very much for taking time to help me with this.
Chris
Avatar of inverted_2000
inverted_2000
Flag of United States of America image

ASKER

Oh yeah......
I've used ActionScript 1.0 so far (o:
Avatar of Billystyx
Billystyx

You need to load the movies, the menu can be part of the swf, (using attachMovie), the jpgs load from extrnal with loadMovie or loadMovieNum.
First step would be to create the separate menus, and if you are using buttons for your example of 'art', on the button have this code:
on(release){
dep=_root.getNextHighestDepth();
container.attachMovie("menu1","menu1",dep);
}
where container is an empty mc positioned in the bottom left corner of the stage (instance name 'container'), and menu1 is the linkage identifier of the menu relating to art.

Then on each click of each menu item button(art1, art2, etc)
container2.loadMovie("myjpeg1.jpg");

where container2 is the instance name for an empty mc positioned in bottom righthand conrer of stage, and myjpeg1.jpg is a jpg image in the same folder as your html page that holds the embedded main swf.

if you need more help please ask

Billystyx


Okay....I've gotten some work done.

I've created the menu movie and added buttons to the movie.  View the movie via: www.ncwave.com/ds

I've got the code like this:

Button "Art" has the code
on(release){
dep=_root.getNextHighestDepth();
container.attachMovie("menu1","menu1",dep);
}

Button "Shows" has the code
on(release){
dep=_root.getNextHighestDepth();
container.attachMovie("menu2","menu2",dep);
}

Button "Bio" and Button "Contact" have the same code just change the menu to "menu3" and "menu4" respectfully.

Now I need to know how to make the "container."  Does each menu (1 through 4) get it's own container, or is it shared?

Thanks again,
Chris

shared. You only need 2 containers for the swf, one for the menu to load into and one for the pics, because you'll only have one of each at a time.

Billystyx
Just click on the white page at bottom left of the library and it will create a new empty mc.
Step back to scene1 and drag the empty mc onto stage, it will be a small white dot.
Position it so that with the menu in it the menu will lay down and to the right of the white dot. Name the instance container1, and then drag the same clip onto stage, positioning on the lower right of the stage, again so the jpgs will spill down and to the right of the dot. Name the instance container2

Billystyx
how do I create the containers???

Are they graphis, buttons, movies, etc.......
okay.....posting at almost the same time (o:
make sense then?
Okay....I'm back to the main scene and I created an empty Movie Clip and a new layer named Container1.  I dragged the empty movie clip on the the first frame of Container1.

How do I insert the menu into the Movie Clip?  Is the "Instance" actually the MC?
No, the instance name is entered by you in the property field of the movieclip. When you drag the movieclip onto the stage, if you click on it (or if it is selected), you will see in the properties box (at the bottom of the screen unless you moved it - or choose window->properties from the menu at the top if you can't see it), a greyed out field that says 'instancename'. Click in that box and type container1.
Now it has an instance name.
Go to the library and select the menu1 that you have created. Right-click it and choose linkage from the menu that shows. Check the box that says export for actionscript, and then change the name in the top box from symbol1 to menu1
now, on your art button put this
on(release){
dep=_root.getNextHighestDepth();
_root.container1.attachMovie("menu1","menu1",dep);
}

it should work when you test the movie

Billystyx


I need to make the menu's now and that will probably take the rest of the day do to me having to set up his DNS information and root folders on the servers.....I've got the instance stuff down now (o:

I'll be a little bit, but I appreciate this more then you can know (o:

Talk to you soon,
Chris
Are the menu supposed to be graphics, buttons, or MC's

Last thing for the day I swear (o:
Hey Billystyx,

I've read and done everything that you have said to do and I can't bring up menu1 inside of container1.

Please download the .fla file from
http://www.ncwave.com/ds/movie.fla (you can email it back to chris@ncwave.com if you like)
and show me what you mean by:
"Position it so that with the menu in it the menu will lay down and to the right of the white dot."

I think I have it all done except for that.

I'm trying to get the first image to appear before I continue.  This is the order of operations:
1) Button_Art loads with the movie clip DustinMovie
2) The button itself has the ActionScript applied to the "Hit" frame of the button.  The code applied here is:
    on(release){
    dep=_root.getNextHighestDepth();
    _root.container1.attachMovie("menu1","menu1",dep);
    }
3) On the release of the mouse button, container1 should fill with menu1.
4) Menu1 has the button Mother01 in it that when clicked upon, will bring up the file "art/Mother01.jpg" inside of container2 using the code:
    container2.loadMovie("art/Mother01.jpg");


Thanks a ton,
Chris
 
they are supposed to be mcs, so you can then put buttons inside to open the jpgs. But I will look at the fla - just not tonight:)
can't open the fla - it takes me to a different site

Billystyx
Hey Billystyx,

I've email you the source file and included a different link incase you want to download it.

Thanks again,
Chris
Chris, you should post that link here - it is against the rules to communicate via email unless you don't have the ability to post you r fla. Other people may want to check out the fla too to see if they can help:)
I will take a look once you have done this. Sorry for being so pedantic, but rules are rules:)
Also - I have no idea where it is on that site? I don't have time to look this morning anyway, but if you can't get it up there so people can download from there, I will check it out on email - you must email it to anyone that would like to help too though. Thanks
Billystyx
okay doaky....

The .fla source file that I need for you to download and look at is at http://www.acedoran.com/flash/movie.zip

The work so far is now posted at www.dustinsalas.com

I am posting the source .fla file at my corporate server because it is more established.
www.dustinsalas.com just went up yesterday and the DNS might not have trickled to everyone's ISP yet.

Thanks,
Chris

no worries, will check this evening:)
ASKER CERTIFIED SOLUTION
Avatar of Billystyx
Billystyx

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Will you please send me back that .FLA file and I will post it as part of the solution that we were working on.

Thanks,
Chris
Wow that did it.....(o:

Thank you very very much.

view the solution at http://www.acedoran.com/flash/movie1.zip

Thank you again Billystyx

You have taught me a ton.

Chris
I will send it:)

Billystyx
oops - lag in post there - good to see you got it sorted:)

Billystyx
Almost there (o:

I'm using the code:
container2.loadMovie("mother1.jpg");
for the "hit" frame for the button Mother to load it into the 2nd container,....named container2

no response from the "Mother 1 " button on menu1 to load the .jpg into the container2.

Please take one more look and then you'll have done enough to keep me busey for some time to come (o:

Chris
I figured it out.....the button isn't what actually holds the code on the hit frame.....you had the action code on the frame in the movie for the menu.

Thanks again for everything,
Chris
Good to see you figured it out:)

Billystyx