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

Using aliases for portability

Status
Not open for further replies.

SimJim

Programmer
Apr 7, 2003
26
0
0
KR
I need this mc to be portable using parent or this. The commented out version works fine with the direct address, but the following aliases didn't work:

on (rollOver) {
_parent.iPTInd.gotoAndStop("off");
_parent.iPTHov.gotoAndStop("on");
_parent.iPTClk.gotoAndStop("off");

this._parent.iPTInd.gotoAndStop("off");
this._parent.iPTHov.gotoAndStop("on");
this._parent.iPTClk.gotoAndStop("off");

//_root.iPT01.iPTInd.gotoAndStop("off");
//_root.iPT01.iPTHov.gotoAndStop("on");
//_root.iPT01.iPTClk.gotoAndStop("off");
}
 
have you tried...


_parent._parent.iPTInd.gotoAndStop("off");
Regards,

cubalibre2.gif
 
OldNewbie,

I tried _parent._parent just now but it is not working.

The clip has four objects. Three of them are just pop-up panels, and then the button on the top layer of the mc. The button is used to call each one into display depending on the condition of the mouse over/clicking the button area.
Since the button is at the same level as the other three mc's I assumed I would just need to _parent to the main mc.

PT_mc
PT_button //containing script
iPTInd_mc
iPTHov_mc
iPTClk_mc
 
Can you post a fla. or a small mockup re-creating this set up, so I can better understand? I'm not very good at reading stuff, I prefer to have the damn thing in front of me! Regards,

cubalibre2.gif
 
OldNewbie,

Made a mockup, but how do you post to a thread? there's no button on this posting page for attachments.
 
You can upload it to your server and provide a link to download it from there, or hit my handle and e-mail it to me at the address you'll finfd in my profile. Regards,

cubalibre2.gif
 
Don't have a website.

Currently at work with a wartime netspeed that is failing everytime I transmit this .fla to your email. I'll try again in a moment and see if it will go through. It may actually be sending, but I can't see it from my side as the browser failure pops up before the message sent confirmation. If not I'll retry from home in 4 hours.
 
Nothing yet on either addresses! Soon going to bed!
Maybe in the morning then! Regards,

cubalibre2.gif
 
Yes,

It should be there waiting at the hotmail account.

P.S. How do you guys get paid for this support?

I greatly appreciate it, but nothing in this life is free!
 
We don't! I was once given a "a 3 month cookie club" thingy by a charming lady, but that's about it, outside of Virt2002 that owes me a couple of beers, if I ever get back down to Orlando!

For the fun of it basically!

Will check my e-mail, but probably won't answer before morning... And if I do find a solution! Regards,

cubalibre2.gif
 
Thanks Oldnewbie,

I mailed your message to myself at work so I can go through it.
 
I see your modified brackets, and the code fail callouts are all gone. But........ Those little green buttons hanging of the sides of mc01 in the movie should be dancing up and down at the rate of the cosine conversion of the "x" counter. That is,Do you have any idea why they are just sitting there? I modified the code as follows:

this.onEnterFrame=function(){
RangeofMovement = 100;
}
x+=.02;
c=Math.cos(x);
s=Math.sin(x);
_root.SP01.tmp_mc.mc01.Blft._y = RangeofMovement * c;
_root.SP01.tmp_mc.mc01.Brht._y = RangeofMovement * c;

Got any ideas?

More importantly, and back to the original thread, do you have any ideas on how to reference the mc "tmp_mc" with an alias?
 
Sorry, but I have absolutely no idea of what you're talking about! Regards,

cubalibre2.gif
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top