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 Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Targetting clips inside swf

Status
Not open for further replies.

walahe

IS-IT--Management
Feb 24, 2005
11
GB
Hi

I need to target 2 movie clips inside an external laoded swf, from 2 buttons in the main stage. Dont know how to target them. The Hotels.swf loads into the main movie fine but i need the clips inside it.

This is my code:

var mc_New = pinkie_mc.createEmptyMovieClip("abcd", 1);
mc_New._x = 100;
mc_New._y = -120
mc_New.loadMovie("hotels.swf");

Thanks
Koosha
 
Code:
abcd.targetName = value;

Hope it helps.

Wow JT that almost looked like you knew what you were doing!
 
sorry i'm a bit new to this, where do i need to put this line ?

Thanks
 
On the button.

Example:

Code:
on(release){
   abcd.targetName.gotoAndPlay("Start")
}

This would cause targetName MC of the ABCD movie clip on the main timeline to go to the frame label "Start" and play.

Hope that helps.

Wow JT that almost looked like you knew what you were doing!
 
Looks good but i'm stacking swf on top of eachother and i have this code on each button:

tot_mc.hotels_btn.onPress = function() {
var someDepth = empty_mc.getNextHighestDepth();
var mc_New = empty_mc.createEmptyMovieClip("hotelsup", someDepth);
mc_New._x = 500;
mc_New._y = 26.5;
mc_New.loadMovie("myMovie.swf);
trace(someDepth);
var mc_Target = empty_mc.getInstanceAtDepth(someDepth-2);
trace("mc_Target = "+mc_Target);
if (mc_Target != undefined) {
removeMovieClip(mc_Target);
}
};

How would i target a frame inside myMovie.swf?

Thanks for your help
Koosha
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top