---
title: "replaceAll"
author: "琛哥哥"
date: "2012-12-26T16:39:09Z"
tags: []
categories: ["非技术"]
slug: "replaceall"
draft: false
lastmod: "2012-12-26T16:39:09Z"
id: 1754546
url: "https://pczhuce-126-com.iteye.com/blog/1754546"
---

```java
<?xml version="1.0" encoding="utf-8"?>
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009" 
			   xmlns:s="library://ns.adobe.com/flex/spark" 
			   xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="955" minHeight="600" creationComplete="application1_creationCompleteHandler(event)">
	<fx:Script>
		<![cdata[
			import mx.controls.alert;
			import mx.events.flexevent;
			import mx.utils.stringutil;
			import mx.utils.uidutil;
			
			protected function application1_creationcompletehandler(event:flexevent):void
			{
				var id:string = UIDUtil.createUID().replace(/-/g,"");
				Alert.show(id);
			}
			
		]]>
	</fx:Script>
	<fx:Declarations>
		<!-- 将非可视元素（例如服务、值对象）放在此处 -->
	</fx:Declarations>
</s:Application>

```