target/rewind another MC from another button on stage???

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • elamberdor
    New Member
    • Mar 2007
    • 39

    target/rewind another MC from another button on stage???

    Hi All!
    Have a complex roll in / roll out button (ag_mc) that unwraps, then re-wraps a chocolate upon roll in - roll out. However - to complicate things, I would also like another button ( ag_desc) when rolled over / out, to also target/animate/control that other button to animate on the stage as it does as if it was pressed itself...


    The rollover button (ag_desc) has a simple movie clip inside on the rollover state to let ppl know to click it, and the ag_mc I'm targeting has a shape tween that I would like to rewind on roll out.

    Here is the current complete working script (for anyone who would like it) that is inside the animated button to make it play back and forward easily on roll over:

    on ag_mc button, frame 1:
    Code:
    stop(); 
    											 
    this.onEnterFrame = function(){
    	if(rewind == true){ 
    		prevFrame();
    	}
    }
    
    this.onRollOver = function(){
    	rewind = false; 
    	play(); 
    }
    
    this.onRollOut = function(){
    	rewind = true;
    }
    this above script works great on the actual button that is being pressed, but now I would like to target that movie clip animation playing from ag_desc movie clip... they are both on the same stage also.

    This is what makes the other clip play (working) on ag_desc for ag_mc:
    Code:
    on (rollOver) {
    	ag_mc.play();
    }
    I think someone has the right track/thought/idea with this:
    Code:
    sociology_btn.onRelease = function () {
    	
    	_global.nyusoc_click = 1;
    	
    	[B]_parent._parent._parent.gotoAndPlay ("folio");[/B]
    	
    }
    I'm trying things like:
    Code:
    on (rollOver) {
    	ag_desc.onRelease = function() {
    		_root.ag_mc.gotoAndPlay("open");
    	};
    }
    but not quite getting there!

    Any ideas to target another movie clips frames to make it animate??

    Thanks so much in advance!!!

    =D
  • elamberdor
    New Member
    • Mar 2007
    • 39

    #2
    Ok! well, I got this working!

    After some fishing around, I've changed direction and used tellgarget and if statements to control my remote movie clips, (six of one half a dozen of the other i know... but it feels a bit cleaner to work with when its all actionscript on the stage)

    This progbox tutorial was great!

    Cobey Rokes is a composer from the UK who covers a wide range of genres. To date he has composed and produced tracks in the rock, hip hop, chiptune and orchestral genres.


    I just have to make sure that on the button that is targeting the other movie clip, in its hit state it has another invisible button over the area of the animation, and it also animates! yay!

    Comment

    Working...