PDA

View Full Version : Using movieclip menu to jump to frame on diffrent layer


SylvesterWebster
07-13-2007, 06:48 PM
Hi,

I'll explain this as best i can. I'm trying to create my first flash site for a tree surgery company but have encountered a problem.

The structure of the site is as follows

The main content of the site is contained within the main timeline and I'm using _root.choose to jump to various frames containing the different pages using a standard navigation bar.

Also on the main timeline is a second menu in the form of a movieclip. menu_mc . This is an animated menu & thus when I double click on the menu I'm taken to the level containing the animation for the menu. From what i understand this is a child of the main timeline. (not sure about that)

When the user rolls over the menu, the menu animation plays & the timeline jumps to the services frame.

On the services frame I have another movieclip services_mc which contains the animated information relating to the companies different services.

So when i double click on this I'm then taken into the services_mc where the information is stored. (again maybe another child of main timeline.

My problem is that I want to be able to select a frame within the services_mc when I select an option on the menu_mc.

I'd been trying to use the _root.choose property as I have been on the main timeline but when I selct an option from the menu it jumps back to frame one of the main timeline.

what can i use to get the main timeline to remain stationary (at the services frame) but to select a specific frame within the service_mc

If u an make head nor tail of that you are a god, please lend some of your knowledge to a newby.

Cheers

Tim

atomic
07-13-2007, 07:20 PM
Attach your .fla.

SylvesterWebster
07-14-2007, 11:41 AM
Hi folks,

I've now attached my flash file for you to have a look at.

Any help you can give would be much appreciated.

Also any hints or tips as to how to achieve the effects I've created more efficiently would also be appreciated. As this is my first flash site I'm sure I'm not going about it the best way possible.

Cheers

Tim

atomic
07-14-2007, 12:28 PM
Don't know how you did this... But can't decompress any of your posted files.

Rar's in .zip's?

SylvesterWebster
07-14-2007, 12:53 PM
Do u have Winrar???

If so double click on each zipped file & put the rar file into a new folder

Do this for all four parts, then select all four files, right click & select extract here

I'll try n upload it in a simpler form, its just the upload doesn't accept zips & the progam I have couldn't zip it small enough!

cheers

tim

atomic
07-14-2007, 01:47 PM
I have Stuffit 9.0, and get an EngineError:Format error when trying to decompress it, once out of the .zip and in a folder.

SylvesterWebster
07-14-2007, 02:30 PM
I downloaded stuff it but still cant get the file size small enough, when I compress my .fla the smallest I can get it is 1.25Mb

any ideas???

Cheers again

atomic
07-14-2007, 02:57 PM
Simply zip up the .flas and mail them to me. I'll provide an address through a PM.
Make sure any zip package is not larger than 10MBs... If it is send 2 or more mails each with one zip.

atomic
07-14-2007, 03:28 PM
Ok, trying to understand this...
When I'm within the menuback_mc, stopped on frame 62, and about to select Sectional Dismantling, where's the services_mc (on which layer) or if it isn't within the menuback_mc, where is it?

And what's choose ( services_mc.choose=...)? A variable within the services_mc?

SylvesterWebster
07-14-2007, 03:43 PM
Ok, trying to understand this...
When I'm within the menuback_mc, stopped on frame 62, and about to select Sectional Dismantling, where's the services_mc (on which layer) or if it isn't within the menuback_mc, where is it?

And what's choose ( services_mc.choose=...)? A variable within the services_mc?


Ok, services_mc is on the main timeline on the content layer, if you click on frame 255 of the content layer you'll see a transparent blue box, double click on the small circle in middle to go into the services_mc.

and as far as the choose bit, I had been using

on (release) {
_root.play();
_root.choose = "dismantle";
}

as this was working for me on the main timeline, i.e if you look at the actions attached to each of the main navbar buttons this then lets me select the frames on the main timeline containing the various pages.

I'd just been trying to change the _root bit as this wasn't working for me!

Cheers again,

thanks for all ure time thus far!

Tim

atomic
07-14-2007, 04:44 PM
Ok. Somewhat confusing, 'cause you have a services_mc (title only) and a Services movie clip, which is really the one you're trying to target...

First on frame 255, give the Services mc the instance of Services - you need to give instance names to movie clips if you want to target them - and then change your script on the Sectional Dismantling button to...

on (release) {
_root.Services.play();
// use services_choose rather than chose alone already used on root.
_root.services_choose = "dismantle";
}


Change the scripts on the other buttons accordingly, as...


on (release) {
_root.Services.play();
// use services_choose rather than chose alone already used on root.
_root.services_choose = "cleaning";
}


Last, in the Services mc, change all your gotoAndPlay's

From...

gotoAndPlay(_root.choose);

To...

gotoAndPlay(_root.services_choose);

Keep me posted, if it doesn't work...

SylvesterWebster
07-14-2007, 05:07 PM
Absolute legend,

Works perfectly. Thank you soooo much again. Very much appreciated, I'd tried a million combos n couldn't quite get it!!

Superb.

what dya think of the site??? anything you'd do differently??

Cheers again

Tim

atomic
07-14-2007, 05:15 PM
You're most welcome.

Overall, the site is fine... Curious that the home button would be to the far right, but hey, it's works...

I might need some of those services on my own grounds, but they're too far away! :o

SylvesterWebster
07-15-2007, 12:10 PM
Hi,

Sorry to bother u again but could I send u my fla file again as I'm having a few more problems.

if I select any service it always goes to sectional dismantling first, after that it works fine.

Also how do I get my grinding movie to load in a specific location. i.e. where the trees are in the other service screens. And how do i get the movie to only be visible on the stump grinding section rather than always there when u navigate away from the screen.

Cheers

Tim

atomic
07-15-2007, 01:22 PM
Send it.

atomic
07-15-2007, 03:05 PM
To solve your first problem, simply add the following on keyframe 2 of your Services mc...

gotoAndPlay (_root.services_choose);

Looking into your second problem...

atomic
07-15-2007, 03:22 PM
If I understand this correctly, why are you loading the grinding.swf on a level rather than in the grinding_mc? And where do you actually want it to appear? Over the Stump Grinding text or where the grinding_mc presently is?
Or where else?

SylvesterWebster
07-15-2007, 03:56 PM
I would just want the movie to load where the grinding_mc is!

Cheers

Tim

atomic
07-15-2007, 04:06 PM
Can you mail it to me (grinding.swf) or provide a link to it?

SylvesterWebster
07-15-2007, 05:17 PM
One more thing as well if i can prey on ure good nature again.

Can u try n enter either a scroll pane or a scrolling text box using the UIscrollbar on the protfolio screen,

I've been trying to do both but when I test the movie the scrollbar doesn't appear. well its ther but it doesn't have any handles to scroll with.

I've been looking at the tut found at

http://www.flashkit.com/tutorials/Getting_Started/Flash_MX-estudiow-757/index.php

and when I do it in a brand new movie it works fine but when I do it within my current site it doesn't.

although when I find out how to dynamically load a movie into the correct location I may just create a new movie containing the scrollpane n load it into the page.

but it'd be nice to know why this was happening.

cheers

Tim

atomic
07-15-2007, 05:34 PM
The grinding.swf is only 10KBs.. Why are you bothering with loading an external.swf, rather than simply adding that whole animation in the movie, replacing your present grinding_mc with this new content. You'd then just have to position it to your likings, and wouldn't have to bother about clearing it out when navigating out of it.

atomic
07-15-2007, 05:35 PM
I'll have a look at the scrollbar, but quite busy this afternoon...

atomic
07-15-2007, 05:40 PM
Well, this is just some static latin text... Can you again mail me your .fla with your attempts to add dynamic text I gather, and the scrollbar?

SylvesterWebster
07-15-2007, 05:48 PM
I know, but its really just as its my first flash site I'm trying to do as much as i can, using different elements & techniques I havn't used before.

I know for a fact in the future i'll need to use loadmive etc so thought i might as well try n learn how to just now!

Cheers again,

An just whenever u have time to, cheers

Tim

atomic
07-15-2007, 09:33 PM
For the scrollbar (or scrollpane) to work, you need to set it to AS2.0 (Publish Settings) as you have it set in your scrollbar only .fla.

Haven't checked the whole movie, but setting it to AS2.0, may affect other code and cause problems if you haven't casted & initialized variables and stuff...

Will look into the loading after dinner.

SylvesterWebster
07-15-2007, 09:55 PM
Yup that seems to have sorted that problem, haven't come across any errors caused by setting it to AS2.0 thus far.

I'm running out of ways to say thanks again!

Tim

atomic
07-16-2007, 01:18 AM
You would usually not set the width and/or height of a movie clip holder, in which you're loading an external .swf, and leave them at 0.

Since you seemed to want to keep that border around the loaded movie, I created a second container clip (instance name holder...) on it's own layer, nested within your grinding_mclip movie clip, in which I'm loading the grinding.swf.

I positioned that holder mc at x=-126.0 & y=-204.0

I then removed the loading script you had in the grinding_mclip clip, and added the following script on frame 170 of your Services mc along with your stop(); action...

stop();
grinding_mclip.holder.loadMovie("grinding.swf");

You can play around with the positioning, but remember that both mc's are in relation, and that if you move the grinding_mclip clip, you must also move the inner holder clip accordingly...

If you ever want the grinding bits not exiting the frame of your grinding_mclip clip, then you'd have to mask the holder clip, the size of the inner rectangle of the grinding_mclip clip.

Hope you get all of this... If not, I can probably mail you the .fla.

SylvesterWebster
07-16-2007, 04:04 PM
sorry to be a pain in the arse but can't quite get it to work,

would u mind sending me the .fla?

Also when u inserted the holder mc into the grinding_mclip di u use the inser, new symbol & if so how do i then position it on stage??

Cheers

Tim

atomic
07-16-2007, 04:30 PM
I'll mail you the .fla...

As for creating the new holder clip, I created it with New Symbol, then opened up the grinding_mclip and dragged the holder clip from the Library in the grinding_mclip, on it's own layer, and positioned it to the coordinates I posted above...

My 1000th post! :o

SylvesterWebster
07-16-2007, 04:33 PM
thanks,

thats wat i tried to do but to no avail.

See when u click insert, new symbol. Does that actually place it anywhere on stage or just in the library?

Also congrats on yer 1000th post!


Cheers

Tim

dzedward
07-16-2007, 04:36 PM
See when u click insert, new symbol. Does that actually place it anywhere on stage or just in the library?
it places it in the library, then you must drag an instance of the symbol onto the stage.

voodoo1804
06-30-2010, 08:05 PM
hey atomic, im very new here, i have some questions related to this topic and i think maybe you can help me to solve my problem. Here is the thing:

Rigth now im creating my first website in flash and i would love my site to have an intro and outro animation between the sections inside my site, for example if im on the "Contact" section and then i click on the "Portfolio" button, the "Contact" information animates out and after that the "Portfolio" information animates in on the stage. The thing is that i dont know the right code i can use to achieve this effect. Im using AS3 and Im really desperate cause ive been looking on the web and it seems no body can help with this. Please help me :)