Lingo13-geturl for interaction with Flash

Source: Internet
Author: User

First, geturl is as2 and earlier practices. as3 is like this.

 

Use URL of as3 

Import Flash.net. navigatetoURL;
Import Flash.net. URLRequest;
// Usage
VaR TargetUrl: URLRequest = new URLRequest ("lingo: moviedo (\" withlingo \")");
NavigatetoURL (TargetUrl );

 

Flash uses geturl to interact with ctor script in three ways: lingo statement, directly calling event handler, and passing string to D.

 

Lingo statements

// Flash as2.0
Geturl ("lingo: moviehandlername (arg1, arg2, argn )");

//Flash as3.0
VaRTargetUrl: URLRequest = new URLRequest ("lingo: moviehandlername (arg1, arg2, argn )");
NavigatetoURL (TargetUrl );

-- Director (movie script)
On moviehandlername a, B, c
Put a & B & C -- puts: arg1 arg2 argn
End


 

Event

// Flash as2.0
Geturl ("Event: handlername, arg1, arg2, argn ");

//Flash as3.0
VaRTargetUrl: URLRequest = new URLRequest ("Event: handlername, arg1, arg2, argn ");
NavigatetoURL (TargetUrl );

-- Director (behavior script attached to flash sprite)
On handlername me, a, B, c
Put a & B & C -- puts: arg1 arg2 argn
End


String 

// Flash as2.0
Geturl ("anything you want can go here ");

//Flash as3.0
VaRTargetUrl: URLRequest = new URLRequest ("anything you want can go here ");
NavigatetoURL (TargetUrl );

-- Director (behavior script attached to flash sprite)
On geturl me, STR
Put str -- puts: Anything you want can go here
End

Or 

// Flash as2.0
Geturl ("anything you want can go here ");

//Flash as3.0
VaRTargetUrl: URLRequest = new URLRequest ("anything you want can go here ");
NavigatetoURL (TargetUrl );

-- Director (movie script)
On geturl Str
Put str -- puts: Anything you want can go here
End


 

-------------------------------------------

This method is compared with the method used to call as in lingo. The latter is indeed called and the process is complete.

In this way, I just throw a "Call request" to lingo, even if the request is thrown out. If you haven't done it, you don't know.

After testing, it seems that no matter how many times you throw it, you can only do it once within one frame of lingo. Others will be discarded and will not accumulate until the next time.

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.