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

Reach or send infomation to an movieclip

Status
Not open for further replies.

webscriptprogrammer

Programmer
Nov 26, 2005
31
SE
I try to send some information from a movieclip to another movieclip.

I use two scrollpane (scroller and scroller2) that I control two movieclip (mc1 and mc2)

I use a asfunction in a movieclip and that send to a function in the other movieclip.

I have try so many address I can get but nothing.
I have try now in two days.

I have try

Code:
asfunction:mc2.MyFunc,1

Code:
asfunction:_root.mc2.MyFunc,1

Code:
asfunction:_parent._parent.mc2.MyFunc,1

Code:
asfunction:_parent.mc2.MyFunc,1

I have no idea right now :-(
 
is just some name of category.

I use asfunction because I like to create textmenu basic and dynamic
Code:
<a href='asfunction:_parent._parent.MyFunc,"+category+"'>"+category+"</a>
 
Right now is just basic because I like to see if I can send information to the other movieclip

Code:
function MyFunc(cat) {
	trace(cat);

}
 
So where is this function defined? Within the second movie clip, which is the content clip of a scrollpane?

Why don't you define the function on the main timeline and once you get it working there, then simply pass that variable to the second mc in that scrollpane?

First, the proper syntax should be...

"<A HREF="asfunction:myFunc,category">Category</A>"

Then the function should be defined on the main timeline's first frame...

function MyFunc(cat) {
trace(cat);
}

Regards. Affiliate Program - Web Hosting - Web Design
03/13/05 -> OLDNEWBIE VS FLASHKIT
 
The problem is that I'm not so god in actionscript but I trying and read very much information.

Only time I can make the asfunction to work is when the asfunction and the other function is at the same place.

I have even try to see if I can send information from the main timeline in to the movieclip but nothing happen.

I have problem to find right address to the function.

I have two movieclip because that is two menu and I need scrollfunction to both :)
 
I have try now but still nothing happen.
seem to be hard to send to a function inside a movieclip??
 
Code:
text_mc.html = true;
text_mc.htmlText = "<a href='asfunction:[b]_level0.scroller.spContentHolder[/b].MyFunc,1'>menu 1</a><br><a href='asfunction:[b]_parent._parent.scroller.spContentHolder[/b].MyFunc,2'>menu 2</a>";

No linebreaks in the above second line... It's all one continuous line.

Works fine with both different paths. The absolute (_level0...) and the relative one (_parent...).

Regards. Affiliate Program - Web Hosting - Web Design
03/13/05 -> OLDNEWBIE VS FLASHKIT
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top