flash - What is <rs: in Flex/Action Script 3? -
i found
<rs:page> <mx:image source="@embed('image1.jpg')" /> <mx:label x="400" y="40" fontfamily="verdana" fontsize="9" color="#cccccc" text="butn" /> <mx:label left="100" right="120" y="90" color="#ffccdd" textalign="left" text="label text" /> </rs:page>
in mxml file. means?
edit: 1
<?xml version="1.0" encoding="utf-8"?> <mx:application xmlns:mx="http://www.adobe.com/2006/mxml" xmlns:filters="flash.filters.*" xmlns:rs="com.mybooks.book.*" layout="absolute" backgroundcolor="#333333" creationcomplete="oncreationcomplete()" viewsourceurl="source/index.html" width="600" height="330">
it means custom namespace prefix rs
defined. definition @ beginning of mxml file:
<?xml version="1.0"?> <mx:application xmlns:mx="http://www.adobe.com/2006/mxml" xmlns:rs="example.package.name.*" >
page
custom component defined in rs
namespace.
in plain actionscript write this:
import com.mybooks.book.page; private function createpage(): void { var page: page = new page(); this.addchild(page); var image: image = new image(); // todo: set image properties page.addchild(image); var labela: label = new label(); // todo: set labela properties page.addchild(labela); var labelb: label = new label(); // todo: set labelb properties page.addchild(labelb); }
Comments
Post a Comment