Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

loadmovie_target 2

Status
Not open for further replies.
setProperty (/:newchannel, _visible, true);
/:currentchannel = /:newchannel;
tellTarget (/:currentchannel) {
gotoAndPlay (2);
}


ok let me see if i understand this..

setProperty (/:newchannel, _visible, true);

your telling it that on press of button to change the clip to visible..

/:currentchannel = /:newchannel;

in the maintimeline the current channels are set to visible false..but they now =visible true..

tellTarget (/:currentchannel) {
gotoAndPlay (2);
}

now this is the transition from visible false to visible true..of course goto and play 2..

am i right?.and this transition will work for all added clips(re:buttons 4,5)..and what about when i add the vcr button clips will it still reveal the static..

 
Hi Carl, sorry for the delay, sleeping.

I’ll start from the top then now that my heads a bit clearer. The first thing that happens is the variable /:currentchannel = "false" is initialized. What this does is it tells the movie to ignore any actions on the variable /:currentchannel, take this out and you’ll see a difference.

The next stage is the button actions:

on (press) {
//this If statement is bypassed to the else statement if
//the user hasn’t pressed any buttons yet. If a channel has previously been selected
//this If statement ensures that no actions take place if the user hits the same
//button twice.

if (/:currentchannel==movie1) {
stop ();
} else {
//The Else statement is the main action when the user swaps channels.
//It tells the movie which channel has been selected, and passes on
//responsibility to the mc “transition”.

/:newchannel = movie1;
transition.gotoAndPlay(2);
}
}


The transition mc. Frame13 contains setProperty (/:currentchannel, _visible, false);. Self-explanatory, but remember that at this point /:currentchannel is set to the previous selected channel and not the channel which the user has just pressed, so this action closes the previous channel. The next frame sorts out the newly selected channel:

//The newly selected channel is instructed to become visible.
setProperty (/:newchannel, _visible, true);
//As we have now performed both of the actions to close the
//previous channel and open the new channel, we can now set the newly
//selected channel to become the ‘previously’ selected channel.

/:currentchannel = /:newchannel;
//The newly selected channel is instructed to play.
tellTarget (/:currentchannel) {
gotoAndPlay (2);
}


Everything is now complete and the movie is ready for the user to select another channel and repeat the whole process.

ok? How’s that? If you have any more questions just ask, I’ll keep checking the thread throughout the day.

dave
davdesign@pinkzeppelin.com

^^^^^^^^^^^^^^^^^^^^^
 
ok dave i just got in from work..reading your post and yes i do understand now thank you for the detailed explanation..
just got my cd writer and my new memory cards in today, so once i get those installed i will be getting started on the tv..will go back and add the rest..one question..will the transition also work for external movies loaded as loadmovie_target..and what about when i load clips from the
vcr will the transition play then aswell?.will be back later..

thanks oldnewbie for all your help, and you as well dave..you guys are the best..
 
external movies: I guess you could put a bytes-preloader in frame13 of the transition mc, ie: when the loaded movie's bytes are loaded it goes onto frame 13 and carries on instructing the movie from there. The actions on the buttons would be similar, I'll do a test in a while.

VCR: the transition will work as long as you use the same button methodology as the tv.

Gonna be around all night again (12.30am now), so I'll keep checking the forum for any queries you have.

dave davdesign@pinkzeppelin.com

^^^^^^^^^^^^^^^^^^^^^
 
still here mate ;-) davdesign@pinkzeppelin.com

^^^^^^^^^^^^^^^^^^^^^
 
glad to hear that but this time i figured it out for my self..thanks anyways..what are you working on so late ..
 
Francois, thought I'd better bring this back into here....

1. FADE IN's >>> yeah, you're right, figured Carl could achieve that himself.

2. TRANSITION JUMP >>> I guess maybe a control variable is called for here, ie: when the transition is running, button actions would be void, the control variable being reset when the transition is completed.

3. what would be the proper syntax to set movie2 visibility to false within the playing movie3... as I was trying to do......isn't that what I've included in Frame13/14 of the transition mc?....sorry, I get you now....

The way you have it now is
Code:
[COLOR=green]setProperty ("./previous", _visible, false);[/color]
which is actually looking for an mc literally named "./previous". If you convert it to an expression and use
Code:
[COLOR=green]setProperty (/:previous, _visible, false);[/color]
it would target the variable 'previous' on the main-timeline which is created from within the mc's. I would also change the variable syntax to: var /:previous = welcome1; or even simpler
Code:
[COLOR=green]/:previous = welcome1;[/color]
. Apologies for not answering your question first time round.

4. "....but not when jumping from 3 to 1 for example..." I just put the action:
Code:
[COLOR=green]setProperty ("previous", _visible, false);[/color]
on button 3's actions as you had done with the other two and it seems to work perfect.

dave davdesign@pinkzeppelin.com

^^^^^^^^^^^^^^^^^^^^^
 
TGML.....hmmmmm

Francois, thought I'd better bring this back into here....

1. FADE IN's >>> yeah, you're right, figured Carl could achieve that himself.

2. TRANSITION JUMP >>> I guess maybe a control variable is called for here, ie: when the transition is running, button actions would be void, the control variable being reset when the transition is completed.

3. what would be the proper syntax to set movie2 visibility to false within the playing movie3... as I was trying to do......isn't that what I've included in Frame13/14 of the transition mc?....sorry, I get you now....

The way you have it now is
Code:
setProperty ("./previous", _visible, false);
which is actually looking for an mc literally named "./previous". If you convert it to an expression and use
Code:
setProperty (/:previous, _visible, false);
it would target the variable 'previous' on the main-timeline which is created from within the mc's. I would also change the variable syntax to: var /:previous = welcome1; or even simpler
Code:
/:previous = welcome1;
. Apologies for not answering your question first time round.

4. "....but not when jumping from 3 to 1 for example..." I just put the action:
Code:
setProperty ("previous", _visible, false);
on button 3's actions as you had done with the other two and it seems to work perfect.

dave davdesign@pinkzeppelin.com

^^^^^^^^^^^^^^^^^^^^^
 
Well 4. doesn't really work, 'cause the transition doesn't start over the previous movie since it's visibility has just been set to false.

As for 3. Using setProperty (/:previous, _visible, false); I can now set the visibility of movie2 to false, but since I can't set previous = movie3 before this point, when I go back to channel 1 or 2 (which does work) just can't now get rid of movie3!

Guess I'm too waisted & seeing too many ///// & :::::::!

Will look into it again tomorrow!

Thanks,

;-)
 
talk to you tomorrow ;-) davdesign@pinkzeppelin.com

^^^^^^^^^^^^^^^^^^^^^
 
dave i have another problem..you still there..
 
it was a yes (guess if I wasn't here I wouldn't have replied ;-) ).

See you later....
dave davdesign@pinkzeppelin.com

^^^^^^^^^^^^^^^^^^^^^
 
sorry about that dave..i never gave you a star for your work..thank you
 
Hey Carl! Movie3 is not positioned right!
And 1:30 to download!

;-)
 
yeh i know old i am going to take that out soon..i was just publishing to see how those to pages were gona open up..what do you think so far..and you do mean a minute and thirty don't ya..and now that i'm thinking about that a 1:30 is not good..i'm gona have to bring it down some more..i still have about5 to 6 pages to add..but i'm gona load the links in the movie externaly..there's no way i'm putting all those hi res graphics in there..any way so how are ya..gona be up for a while or what..
 
As a matter of fact your present swf is over 814KB... My present output is 102KB. Guess your 2nd channel movie is quite heavy!

;-)
 
Status
Not open for further replies.

Similar threads

Part and Inventory Search

Sponsor

Back
Top