PDA

View Full Version : controlling dynamically loaded movie clips



sk8tool
March 3rd, 2004, 04:39 AM
Hi guys,

Im creating a booklet with turning pages, like the one previously posted, so all the content is loaded dynamically.
On the right hand page i have text, of which some lines are interactive.
On the left page, i have a hidden text box. When the user clicks on a certain line on the right page, the text box on the left page becomes visible, and the relevant txt is loaded into the text box.

Now, i can make the text box on the left page invisible by placing _visible = 0; directly into the actionscript pane of the text box.
What i cant do is make it visible by clicking on the right page text.

Where should i put the code to make the text box visible?
Is it as simple as movieClip._visible = 1; ?

Im really sorry if that doesnt make much sense, it seems like a simple enough problem but not being able to crack it is making me kinda frantic.

Thanx a lot in advance,

blah-de-blah
March 3rd, 2004, 05:04 AM
Yeah, you might have to target the MC using _root, _parent or this. And you can put the codes in the frame or in the actual movieclip, but they are both different.

In the frame:

_root.mc.onRelease = function() {
_root.mc2._visible = True
}


and in the movieclip...

on (release) {
_root.mc2._visible = True
}

sk8tool
March 3rd, 2004, 05:16 AM
thanks for the reply. ill give it a shot and let you know how it goes.

Cheers

sk8tool
March 3rd, 2004, 05:39 AM
Unfortunatly, that isnt working :*(
I tried putting the code in the movieclip itself:

onClipEvent (mouseUp) {
_root.print2._visible = 1;
}

it didnt like that one bit! saying onClipEvent should be used for a movieClip (which is what i was doing!!!), and put the code on a button WITHIN the movie clip :

on(release){
_root.print2._visible = 1;
}

and that did nothing when the movie clip was pressed.

DARN!
Thanx,anyway, for the suggestion blah-de-blah. much appreciated
Anymore ideas anyone?

Cheers

Seticus
March 3rd, 2004, 07:28 AM
could you post us the fla?

sk8tool
March 3rd, 2004, 07:34 AM
here ya go

Seticus
March 3rd, 2004, 07:53 AM
so you want to make "print2" visible when you click on the upper-tab? That's not possible, because it's in another frame, If you want to make something visible and invisible, it has to be in the same frame, you could also jump to that frame, it would become visible then.

sk8tool
March 3rd, 2004, 07:59 AM
No, no,no! :D

i want print2 to become visible when the user rolls over or clicks on print3, which is the grey square on the opposit page. the tabs have nothing to do with this problem.....yet :smirk:

Seticus
March 3rd, 2004, 08:11 AM
but the grey square is in another frame too, you can't set is to visible, because there is nothing to see.

You could jump to the frame where print2 is located, but then your grey square and all the other things will disappear.

You may not work with different frames in your case, if you want something to appear and dissappear without loosing the other things, you have to work in 1 frame

Seticus
March 3rd, 2004, 08:21 AM
if you want to keep the frames like they are now, you can do something like this.

But you don't use the visible action, you just go to another frame.

sk8tool
March 3rd, 2004, 08:35 AM
doing it that way loses the functionality of the flipping pages. plus the prints are being loaded dynamically, so the prints on the timeline arent being accessed directly. Theyre only on the timeline as references.

Thanks anyway. I appreciate your help.