发新话题
打印

搞不定它,郁闷之极!!!!太简单了都不好意思问人

搞不定它,郁闷之极!!!!太简单了都不好意思问人

搞不定它,郁闷之极!!!!太简单了都不好意思问人
这是一个flash向director传递参数的问题。
我打算在flash设定两个
getURL("lingo:foo"add junk);
getURL("lingo:we"add are);
分别响应两个按钮的动作。
在director中又写道:
on foo junk
  member(2).text=string(junk)
end
on we are
member(5).text=string(are)
end
但就是得不到该得到的值,求各位老大看看是什么毛病。请留下信箱,我现在上传不了附件:)

TOP

搞不定它,郁闷之极!!!!太简单了都不好意思问人

getURL("lingo:someLingoCommand"):这种写法会呼叫指定的Lingo指令.但无法传递(Parameter)的.
你应该用:
getURL("event:someHandler,someParameter"):这个指令会启动Lingo中的指定事件(event).
具体嘛,应该是这样的:
在flash设定两个
getURL("event:foo,\"junk\"");
getURL("lingo:we,\"are\"");
分别响应两个按钮的动作。
在director中写(MovieScirpt):
on foo junk
member(2).text=string(junk)
end
on we are
member(5).text=string(are)
end

TOP

搞不定它,郁闷之极!!!!太简单了都不好意思问人

哈哈,真是的,谢谢了楼上的

TOP

搞不定它,郁闷之极!!!!太简单了都不好意思问人

补一补:http://www.macromedia.com/support/director/ts/documents/sample_flashvarsend.htm Currently these are the different ways to pass the data: 1 Using 'GetURL:lingo (custom handler)' (the example file uses this model) Must have a Flash movie containing 'setVariable' and 'GetURL:lingo (custom handler)' actions Must have a Director movie handler of the same name as (custom handler) and a place holder for the variable passed. Can only pass integers. The following methods offer less control than the method above and are not used in the example file. 2 Using 'GetURL:event: (custom handler)' Implement essentially the same as above. Can only pass integers. 3 Using GetURL: (any string) Requires the Director movie to have a behavior called 'on GetURL me, stringVariable' When using a movie script instead of a behavior the 'me' is not needed in the above handler. The 'stringVariable' value will be the holder for the passed value from Flash (i.e. stringVariable = ). This method is executed every time a 'GetURL' event is issued in the Flash movie.

TOP

发新话题