INSERT INTO sites(host) VALUES('freeactionscript.com') 144: Table './myip/sites' is marked as crashed and last (automatic?) repair failed freeactionscript.com 网站价值¥315,981(不含域名),MYIP.CN网站综合数据统计 - 域名,Alexa,PR,反向链接,关键字
  测网速 网站优化诊断 广告招商QQ3066631932 CodeForge最好的源码站!   手机测速 测速APP

  
                       

网站页面信息

标题:
描述:
关键字:
sponsored links:
连接:
图片:
网站历史:
sponsored links:

网站流量与估价

网站流量:
网站估价:  (注:不包含域名价值,不代表公司价值)

网站排名

Alexa全球排名:
Google Page Rank:
真假PR鉴别:   (提示:若此处显示网站与查询网站不同,则疑为劫持PR)
Sogou Rank:
百度快照日期:

搜索引擎收录

搜索引擎收录情况反向链接
 谷歌Google:
 百度Baidu:
 微软Bing:
 搜搜Soso:
 雅虎Yahoo:
 有道Youdao:
 搜狗Sogou:

服务器信息

Web服务器:
IP地址:    
IP所在地:

域名注册信息

注册人:
Email:
ICANN注册机构:
创建时间:
修改时间:
过期时间:
状态:
Name Server:
Whois Server:

Alexa 排名走势数据

流量统计: 当日 一周平均 三个月平均
排名:
PV:
日独立IP:

网站在各国/地区的排名

国家/地区访问比例

下属子站点被访问比例

Alexa 排名走势图

Alexa Reach走势图

域名 Whois 记录

Who is freeactionscript.com at whois.godaddy.com

The data contained in GoDaddy.com, Inc.'s WhoIs database,

while believed by the company to be reliable, is provided "as is"

with no guarantee or warranties regarding its accuracy. This

information is provided for the sole purpose of assisting you

in obtaining information about domain name registration records.

Any use of this data for any other purpose is expressly forbidden without the prior written

permission of GoDaddy.com, Inc. By submitting an inquiry,

you agree to these terms of usage and limitations of warranty. In particular,

you agree not to use this data to allow, enable, or otherwise make possible,

dissemination or collection of this data, in part or in its entirety, for any

purpose, such as the transmission of unsolicited advertising and

and solicitations of any kind, including spam. You further agree

not to use this data to enable high volume, automated or robotic electronic

processes designed to collect or compile this data for any purpose,

including mining this data for your own personal or commercial purposes.



Please note:
the registrant of the domain name is specified

in the "registrant" field. In most cases, GoDaddy.com, Inc.

is not the registrant of domain names listed in this database.





Registrant:


Philip Radvan



Registered through:
GoDaddy.com, Inc. (
http://www.godaddy.com)

Domain Name: FREEACTIONSCRIPT.COM



Domain servers in listed order:


ns1.718hosting.com

ns2.718hosting.com





For complete domain details go to:


http://who.godaddy.com/whoischeck.aspx?Domain=FREEACTIONSCRIPT.COM

网站缩略图

sponsored links:

网站访问速度测试

国内Ping速度测试      国内TraceRoute路由测试
美国Ping速度测试      美国TraceRoute路由测试

网站关键字指数 (越高越热门)

域名 freeactionscript 其他后缀注册情况   查看更多

后缀 注册时间 到期时间 是否注册
.com
.net
.org
.cn
.com.cn
.asia
.mobi

同类相似网站

查看更多
Alexa标题
306,965Flash AS2 & AS3 Tutorials, Game Code, Source Files & Sample
0Flash AS2 & AS3 Tutorials, Game Code, Source Files & Sampl
409,591Source Code | Free Indo Source Code ~ Technology, Programming, Arti
0Free Flash Source Code | Flash & ActionScript Blog | Warm Forest
2,266,130ActionScript.org Flash, Flex and ActionScript Community - Tutorials, S
6,414ActionScript.org Flash, Flex and ActionScript Community - Tutorials, S
842,330flash game,free flash game,adult flash game,8 development flash game m
0neurofuzzy, flash game development, rich internet applications, free s
513,813Foundation Flash: - Free Flash/ActionScript Tutorials & Help
36,937GameVui.com - Trò chơi vui - Trò chơi trực tuyến - Chơi ga
63,950Flash Tutorials - Flash Animation Tutorials - Actionscript Tutorials -
95,265Code Beach - Free and Open Source Code and Tutorials
526,929Dance MIDI Files & Sample CDs - Free Downloads
30,666Flash Tutorials, ActionScripts, Animations, free tattoo, swf flas free
934,279Wuup, PHP, AS3, Flash, Actionscript, Tutorials, Videos, Articles, SEO,
32,439GameVui.com - C峄
439,492Beginners PHP : tutorials,source code, books, downloads, hosting and l
218,584FREE PHP, Javscript & AJAX, CSS Online Tutorials and FREE Open Source
225,283C++ Source Code, VC++ Source Code, Visual C++ Tutorial & Example, MFC
787,028JDTMMSM.COM Projects, Tutorials and Code Snippet Free Downloads
38,45015 Seconds : asp tutorials, asp.net tutorials, ASP programming sample
015 Seconds : asp tutorials, asp.net tutorials, ASP programming sample
159,266Free Flash Intros.com - Free Flash intros, Flash guestbooks, Flash cha
145,374Free Flash Intros.com - Free Flash intros, Flash guestbooks, Flash cha
1,797,535Free Flash Games and Flash Game Downloads - Play Many Flash Games in
3,888Free Source Code and Scripts Downloads
3,878Free Source Code and Scripts Downloads
958,837Gamers Evolution - Full Free PC Game Downloads » Free Full Versi
722,756Free Visual Basic 6 tutorials, projects and source code examples
2,961JavaScript Source: Free JavaScripts, Tutorials, Example Code, Referenc

模拟搜索引擎蜘蛛抓取

Title: Flash AS2 & AS3 Tutorials, Game Code, Source Files & Sample Downloads | Free ActionScript
Description:
Keywords:
Body:
Flash AS2 amp; AS3 Tutorials, Game Code, Source Files amp; Sample Downloads | Free ActionScript
Free ActionScript
Flash AS2 amp; AS3 Tutorials, Game Code, Source Files amp; Sample Downloads
Home
AS3 Scripts
AS2 Scripts
Resources
About
Contact
Enemy AI #8211; random movement
January 25th, 2011 Posted in Enemy AI, Game Examples AS3
Jan, 25 2011
No Comments #187;
Brand new enemy AI game engine based on my previous smooth follow example.
Features
Smooth movement #038; rotation
Change direction once destination is reached
Bounce off walls on collision
Preview
?[Copy to clipboard]View Code ACTIONSCRIPTspan style="color: #808080; font-style: italic;"/**
* Enemy AI - Random movement
* ---------------------
* VERSION: 1.0
* DATE: 1/25/2011
* AS3
* UPDATES AND DOCUMENTATION AT: http://www.FreeActionScript.com
**/span
package
span style="color: #66cc66;" #123;span
span style="color: #0066CC;"importspan flash.span style="color: #006600;"displayspan.span style="color: #0066CC;"MovieClipspan;
span style="color: #0066CC;"importspan flash.span style="color: #006600;"eventsspan.span style="color: #006600;"Eventspan;
span style="color: #0066CC;"importspan flash.span style="color: #006600;"eventsspan.span style="color: #006600;"MouseEventspan;
span style="color: #0066CC;"publicspan span style="color: #000000; font-weight: bold;"classspan Main span style="color: #0066CC;"extendsspan span style="color: #0066CC;"MovieClipspan
span style="color: #66cc66;" #123;span
span style="color: #808080; font-style: italic;"// player settings span
span style="color: #0066CC;"privatespan span style="color: #000000; font-weight: bold;"varspan _moveSpeedMax:span style="color: #0066CC;"Numberspan = span style="color: #cc66cc;"1000span;
span style="color: #0066CC;"privatespan span style="color: #000000; font-weight: bold;"varspan _rotateSpeedMax:span style="color: #0066CC;"Numberspan = span style="color: #cc66cc;"15span;
span style="color: #0066CC;"privatespan span style="color: #000000; font-weight: bold;"varspan _decay:span style="color: #0066CC;"Numberspan = .98;
span style="color: #0066CC;"privatespan span style="color: #000000; font-weight: bold;"varspan _destinationX:span style="color: #0066CC;"intspan = span style="color: #cc66cc;"150span;
span style="color: #0066CC;"privatespan span style="color: #000000; font-weight: bold;"varspan _destinationY:span style="color: #0066CC;"intspan = span style="color: #cc66cc;"150span;
span style="color: #0066CC;"privatespan span style="color: #000000; font-weight: bold;"varspan _minX:span style="color: #0066CC;"Numberspan = span style="color: #cc66cc;"0span;
span style="color: #0066CC;"privatespan span style="color: #000000; font-weight: bold;"varspan _minY:span style="color: #0066CC;"Numberspan = span style="color: #cc66cc;"0span;
span style="color: #0066CC;"privatespan span style="color: #000000; font-weight: bold;"varspan _maxX:span style="color: #0066CC;"Numberspan = span style="color: #cc66cc;"550span;
span style="color: #0066CC;"privatespan span style="color: #000000; font-weight: bold;"varspan _maxY:span style="color: #0066CC;"Numberspan = span style="color: #cc66cc;"400span;
span style="color: #808080; font-style: italic;"// playerspan
span style="color: #0066CC;"privatespan span style="color: #000000; font-weight: bold;"varspan _player:span style="color: #0066CC;"MovieClipspan;
span style="color: #808080; font-style: italic;"// global span
span style="color: #0066CC;"privatespan span style="color: #000000; font-weight: bold;"varspan _dx:span style="color: #0066CC;"Numberspan = span style="color: #cc66cc;"0span;
span style="color: #0066CC;"privatespan span style="color: #000000; font-weight: bold;"varspan _dy:span style="color: #0066CC;"Numberspan = span style="color: #cc66cc;"0span;
span style="color: #0066CC;"privatespan span style="color: #000000; font-weight: bold;"varspan _vx:span style="color: #0066CC;"Numberspan = span style="color: #cc66cc;"0span;
span style="color: #0066CC;"privatespan span style="color: #000000; font-weight: bold;"varspan _vy:span style="color: #0066CC;"Numberspan = span style="color: #cc66cc;"0span;
span style="color: #0066CC;"privatespan span style="color: #000000; font-weight: bold;"varspan _trueRotation:span style="color: #0066CC;"Numberspan = span style="color: #cc66cc;"0span;
span style="color: #808080; font-style: italic;"/**
* Constructor
*/span
span style="color: #0066CC;"publicspan span style="color: #000000; font-weight: bold;"functionspan Mainspan style="color: #66cc66;" #40;spanspan style="color: #66cc66;" #41;span
span style="color: #66cc66;" #123;span
span style="color: #808080; font-style: italic;"// create player objectspan
createPlayerspan style="color: #66cc66;" #40;spanspan style="color: #66cc66;" #41;span;
span style="color: #808080; font-style: italic;"// add listenersspan
span style="color: #0066CC;"stagespan.span style="color: #006600;"addEventListenerspanspan style="color: #66cc66;" #40;spanEvent.span style="color: #006600;"ENTER_FRAMEspan, enterFrameHandlerspan style="color: #66cc66;" #41;span;
span style="color: #66cc66;" #125;span
span style="color: #808080; font-style: italic;"/**
* Creates player
*/span
span style="color: #0066CC;"privatespan span style="color: #000000; font-weight: bold;"functionspan createPlayerspan style="color: #66cc66;" #40;spanspan style="color: #66cc66;" #41;span:span style="color: #0066CC;"voidspan
span style="color: #66cc66;" #123;span
_player = span style="color: #000000; font-weight: bold;"newspan Playerspan style="color: #66cc66;" #40;spanspan style="color: #66cc66;" #41;span;
_player.span style="color: #006600;"xspan = span style="color: #0066CC;"stagespan.span style="color: #006600;"stageWidthspan span style="color: #66cc66;"/span span style="color: #cc66cc;"2span;
_player.span style="color: #006600;"yspan = span style="color: #0066CC;"stagespan.span style="color: #006600;"stageHeightspan span style="color: #66cc66;"/span span style="color: #cc66cc;"2span;
span style="color: #0066CC;"stagespan.span style="color: #006600;"addChildspanspan style="color: #66cc66;" #40;span_playerspan style="color: #66cc66;" #41;span;
span style="color: #66cc66;" #125;span
span style="color: #808080; font-style: italic;"/**
* EnterFrame Handlers
*/span
span style="color: #0066CC;"privatespan span style="color: #000000; font-weight: bold;"functionspan enterFrameHandlerspan style="color: #66cc66;" #40;spanevent:Eventspan style="color: #66cc66;" #41;span:span style="color: #0066CC;"voidspan
span style="color: #66cc66;" #123;span
updateCollisionspan style="color: #66cc66;" #40;spanspan style="color: #66cc66;" #41;span;
updatePositionspan style="color: #66cc66;" #40;spanspan style="color: #66cc66;" #41;span;
updateRotationspan style="color: #66cc66;" #40;spanspan style="color: #66cc66;" #41;span;
span style="color: #66cc66;" #125;span
span style="color: #808080; font-style: italic;"/**
* Calculate Rotation
*/span
span style="color: #0066CC;"privatespan span style="color: #000000; font-weight: bold;"functionspan updateRotationspan style="color: #66cc66;" #40;spanspan style="color: #66cc66;" #41;span:span style="color: #0066CC;"voidspan
span style="color: #66cc66;" #123;span
span style="color: #808080; font-style: italic;"// calculate rotationspan
_dx = _player.span style="color: #006600;"xspan - _destinationX;
_dy = _player.span style="color: #006600;"yspan - _destinationY;
span style="color: #808080; font-style: italic;"// which way to rotatespan
span style="color: #000000; font-weight: bold;"varspan rotateTo:span style="color: #0066CC;"Numberspan = getDegreesspan style="color: #66cc66;" #40;spangetRadiansspan style="color: #66cc66;" #40;span_dx, _dyspan style="color: #66cc66;" #41;spanspan style="color: #66cc66;" #41;span;
span style="color: #808080; font-style: italic;"// keep rotation positive, between 0 and 360 degreesspan
span style="color: #b1b100;"ifspan span style="color: #66cc66;" #40;spanrotateTo span style="color: #66cc66;" gt;span _player.span style="color: #006600;"rotationspan + span style="color: #cc66cc;"180spanspan style="color: #66cc66;" #41;span rotateTo -= span style="color: #cc66cc;"360span;
span style="color: #b1b100;"ifspan span style="color: #66cc66;" #40;spanrotateTo span style="color: #66cc66;" lt;span _player.span style="color: #006600;"rotationspan - span style="color: #cc66cc;"180spanspan style="color: #66cc66;" #41;span rotateTo += span style="color: #cc66cc;"360span;
span style="color: #808080; font-style: italic;"// ease rotationspan
_trueRotation = span style="color: #66cc66;" #40;spanrotateTo - _player.span style="color: #006600;"rotationspanspan style="color: #66cc66;" #41;span span style="color: #66cc66;"/span _rotateSpeedMax;
span style="color: #808080; font-style: italic;"// update rotationspan
_player.span style="color: #006600;"rotationspan += _trueRotation;
span style="color: #66cc66;" #125;span
span style="color: #808080; font-style: italic;"/**
* Calculate Position
*/span
span style="color: #0066CC;"privatespan span style="color: #000000; font-weight: bold;"functionspan updatePositionspan style="color: #66cc66;" #40;spanspan style="color: #66cc66;" #41;span:span style="color: #0066CC;"voidspan
span style="color: #66cc66;" #123;span
span style="color: #808080; font-style: italic;"// update velocityspan
_vx += span style="color: #66cc66;" #40;span_destinationX - _player.span style="color: #006600;"xspanspan style="color: #66cc66;" #41;span span style="color: #66cc66;"/span _moveSpeedMax;
_vy += span style="color: #66cc66;" #40;span_destinationY - _player.span style="color: #006600;"yspanspan style="color: #66cc66;" #41;span span style="color: #66cc66;"/span _moveSpeedMax;
span style="color: #808080; font-style: italic;"// if close to targetspan
span style="color: #b1b100;"ifspan span style="color: #66cc66;" #40;spangetDistancespan style="color: #66cc66;" #40;span_dx, _dyspan style="color: #66cc66;" #41;span span style="color: #66cc66;" lt;span span style="color: #cc66cc;"50spanspan style="color: #66cc66;" #41;span
span style="color: #66cc66;" #123;span
getRandomDestinationspan style="color: #66cc66;" #40;spanspan style="color: #66cc66;" #41;span;
span style="color: #66cc66;" #125;span
span style="color: #808080; font-style: italic;"// apply decay (drag)span
_vx span style="color: #66cc66;"*span= _decay;
_vy span style="color: #66cc66;"*span= _decay;
span style="color: #808080; font-style: italic;"// update positionspan
_player.span style="color: #006600;"xspan += _vx;
_player.span style="color: #006600;"yspan += _vy;
span style="color: #66cc66;" #125;span
span style="color: #808080; font-style: italic;"/**
* updateCollision
*/span
protected span style="color: #000000; font-weight: bold;"functionspan updateCollisionspan style="color: #66cc66;" #40;spanspan style="color: #66cc66;" #41;span:span style="color: #0066CC;"voidspan
span style="color: #66cc66;" #123;span
span style="color: #808080; font-style: italic;"// Check Xspan
span style="color: #808080; font-style: italic;"// Check if hit topspan
span style="color: #b1b100;"ifspan span style="color: #66cc66;" #40;spanspan style="color: #66cc66;" #40;spanspan style="color: #66cc66;" #40;span_player.span style="color: #006600;"xspan - _player.span style="color: #0066CC;"widthspan span style="color: #66cc66;"/span span style="color: #cc66cc;"2spanspan style="color: #66cc66;" #41;span span style="color: #66cc66;" lt;span _minXspan style="color: #66cc66;" #41;span span style="color: #66cc66;" amp; amp;span span style="color: #66cc66;" #40;span_vx span style="color: #66cc66;" lt;span span style="color: #cc66cc;"0spanspan style="color: #66cc66;" #41;spanspan style="color: #66cc66;" #41;span
span style="color: #66cc66;" #123;span
_vx = -_vx;
span style="color: #66cc66;" #125;span
span style="color: #808080; font-style: italic;"// Check if hit bottomspan
span style="color: #b1b100;"ifspan span style="color: #66cc66;" #40;spanspan style="color: #66cc66;" #40;span_player.span style="color: #006600;"xspan + _player.span style="color: #0066CC;"widthspan span style="color: #66cc66;"/span span style="color: #cc66cc;"2spanspan style="color: #66cc66;" #41;span span style="color: #66cc66;" gt;span _maxX span style="color: #66cc66;" amp; amp;span span style="color: #66cc66;" #40;span_vx span style="color: #66cc66;" gt;span span style="color: #cc66cc;"0spanspan style="color: #66cc66;" #41;spanspan style="color: #66cc66;" #41;span
span style="color: #66cc66;" #123;span
_vx = -_vx;
span style="color: #66cc66;" #125;span
span style="color: #808080; font-style: italic;"// Check Yspan
span style="color: #808080; font-style: italic;"// Check if hit left sidespan
span style="color: #b1b100;"ifspan span style="color: #66cc66;" #40;spanspan style="color: #66cc66;" #40;spanspan style="color: #66cc66;" #40;span_player.span style="color: #006600;"yspan - _player.span style="color: #0066CC;"heightspan span style="color: #66cc66;"/span span style="color: #cc66cc;"2spanspan style="color: #66cc66;" #41;span span style="color: #66cc66;" lt;span _minYspan style="color: #66cc66;" #41;span span style="color: #66cc66;" amp; amp;span span style="color: #66cc66;" #40;span_vy span style="color: #66cc66;" lt;span span style="color: #cc66cc;"0spanspan style="color: #66cc66;" #41;spanspan style="color: #66cc66;" #41;span
span style="color: #66cc66;" #123;span
_vy = -_vy
span style="color: #66cc66;" #125;span
span style="color: #808080; font-style: italic;"// Check if hit right sidespan
span style="color: #b1b100;"ifspan span style="color: #66cc66;" #40;spanspan style="color: #66cc66;" #40;spanspan style="color: #66cc66;" #40;span_player.span style="color: #006600;"yspan + _player.span style="color: #0066CC;"heightspan span style="color: #66cc66;"/span span style="color: #cc66cc;"2spanspan style="color: #66cc66;" #41;span span style="color: #66cc66;" gt;span _maxYspan style="color: #66cc66;" #41;span span style="color: #66cc66;" amp; amp;span span style="color: #66cc66;" #40;span_vy span style="color: #66cc66;" gt;span span style="color: #cc66cc;"0spanspan style="color: #66cc66;" #41;spanspan style="color: #66cc66;" #41;span
span style="color: #66cc66;" #123;span
_vy = -_vy;
span style="color: #66cc66;" #125;span
span style="color: #66cc66;" #125;span
span style="color: #808080; font-style: italic;"/**
* Calculates a random destination based on stage size
*/span
span style="color: #0066CC;"privatespan span style="color: #000000; font-weight: bold;"functionspan getRandomDestinationspan style="color: #66cc66;" #40;spanspan style="color: #66cc66;" #41;span:span style="color: #0066CC;"voidspan
span style="color: #66cc66;" #123;span
_destinationX = span style="color: #0066CC;"Mathspan.span style="color: #0066CC;"randomspanspan style="color: #66cc66;" #40;spanspan style="color: #66cc66;" #41;span span style="color: #66cc66;"*span span style="color: #66cc66;" #40;span_maxX - _player.span style="color: #0066CC;"widthspanspan style="color: #66cc66;" #41;span + _player.span style="color: #0066CC;"widthspan span style="color: #66cc66;"/span span style="color: #cc66cc;"2span;
_destinationY = span style="color: #0066CC;"Mathspan.span style="color: #0066CC;"randomspanspan style="color: #66cc66;" #40;spanspan style="color: #66cc66;" #41;span span style="color: #66cc66;"*span span style="color: #66cc66;" #40;span_maxY - _player.span style="color: #0066CC;"heightspanspan style="color: #66cc66;" #41;span + _player.span style="color: #0066CC;"heightspan span style="color: #66cc66;"/span span style="color: #cc66cc;"2span;
span style="color: #66cc66;" #125;span
span style="color: #808080; font-style: italic;"/**
* Get distance
* @param delta_x
* @param delta_y
* @return
*/span
span style="color: #0066CC;"publicspan span style="color: #000000; font-weight: bold;"functionspan getDistancespan style="color: #66cc66;" #40;spandelta_x:span style="color: #0066CC;"Numberspan, delta_y:span style="color: #0066CC;"Numberspanspan style="color: #66cc66;" #41;span:span style="color: #0066CC;"Numberspan
span style="color: #66cc66;" #123;span
span style="color: #b1b100;"returnspan span style="color: #0066CC;"Mathspan.span style="color: #0066CC;"sqrtspanspan style="color: #66cc66;" #40;spanspan style="color: #66cc66;" #40;spandelta_xspan style="color: #66cc66;"*spandelta_xspan style="color: #66cc66;" #41;span+span style="color: #66cc66;" #40;spandelta_yspan style="color: #66cc66;"*spandelta_yspan style="color: #66cc66;" #41;spanspan style="color: #66cc66;" #41;span;
span style="color: #66cc66;" #125;span
span style="color: #808080; font-style: italic;"/**
* Get radians
* @param delta_x
* @param delta_y
* @return
*/span
span style="color: #0066CC;"publicspan span style="color: #000000; font-weight: bold;"functionspan getRadiansspan style="color: #66cc66;" #40;spandelta_x:span style="color: #0066CC;"Numberspan, delta_y:span style="color: #0066CC;"Numberspanspan style="color: #66cc66;" #41;span:span style="color: #0066CC;"Numberspan
span style="color: #66cc66;" #123;span
span style="color: #000000; font-weight: bold;"varspan r:span style="color: #0066CC;"Numberspan = span style="color: #0066CC;"Mathspan.span style="color: #0066CC;"atan2spanspan style="color: #66cc66;" #40;spandelta_y, delta_xspan style="color: #66cc66;" #41;span;
span style="color: #b1b100;"ifspan span style="color: #66cc66;" #40;spandelta_y span style="color: #66cc66;" lt;span span style="color: #cc66cc;"0spanspan style="color: #66cc66;" #41;span
span style="color: #66cc66;" #123;span
r += span style="color: #66cc66;" #40;spanspan style="color: #cc66cc;"2span span style="color: #66cc66;"*span span style="color: #0066CC;"Mathspan.span style="color: #0066CC;"PIspanspan style="color: #66cc66;" #41;span;
span style="color: #66cc66;" #125;span
span style="color: #b1b100;"returnspan r;
span style="color: #66cc66;" #125;span
span style="color: #808080; font-style: italic;"/**
* Get degrees
* @param radians
* @return
*/span
span style="color: #0066CC;"publicspan span style="color: #000000; font-weight: bold;"functionspan getDegreesspan style="color: #66cc66;" #40;spanradians:span style="color: #0066CC;"Numberspanspan style="color: #66cc66;" #41;span:span style="color: #0066CC;"Numberspan
span style="color: #66cc66;" #123;span
span style="color: #b1b100;"returnspan span style="color: #0066CC;"Mathspan.span style="color: #0066CC;"floorspanspan style="color: #66cc66;" #40;spanradiansspan style="color: #66cc66;"/spanspan style="color: #66cc66;" #40;spanspan style="color: #0066CC;"Mathspan.span style="color: #0066CC;"PIspanspan style="color: #66cc66;"/spanspan style="color: #cc66cc;"180spanspan style="color: #66cc66;" #41;spanspan style="color: #66cc66;" #41;span;
span style="color: #66cc66;" #125;span
span style="color: #66cc66;" #125;span
span style="color: #66cc66;" #125;span
Download Fla Sample
ActionScript Enemy AI, AS3 Enemy Movement, AS3 Enemy Script, Enemy AI in Flash, enemy creation as3, Enemy Random Movement, Flash Enemy AI, Flash Game AI, Game Enemy AI, Random Direction Change, Random Movement, space shooter enemy
Read More
Mouse follow with easing #038; smooth rotation #8211; v2
January 19th, 2011 Posted in Game Examples AS3, Movement
Jan, 19 2011
No Comments #187;
Totally rewrote my previous smooth follow and rotation script.
This version fixes all the previous issues and optimizes everything. No more #8220;jumpy #8221; rotation.
Click and hold to make the player smoothly rotate to and follow the mouse:
?[Copy to clipboard]View Code ACTIONSCRIPTspan style="color: #808080; font-style: italic;"/**
* Player Movement - Follow Mouse on click with Easing and smooth rotation
* ---------------------
* VERSION: 2.0
* DATE: 1/18/2011
* AS3
* UPDATES AND DOCUMENTATION AT: http://www.FreeActionScript.com
**/span
package
span style="color: #66cc66;" #123;span
span style="color: #0066CC;"importspan flash.span style="color: #006600;"displayspan.span style="color: #0066CC;"MovieClipspan;
span style="color: #0066CC;"importspan flash.span style="color: #006600;"eventsspan.span style="color: #006600;"Eventspan;
span style="color: #0066CC;"importspan flash.span style="color: #006600;"eventsspan.span style="color: #006600;"MouseEventspan;
span style="color: #0066CC;"publicspan span style="color: #000000; font-weight: bold;"classspan Main span style="color: #0066CC;"extendsspan span style="color: #0066CC;"MovieClipspan
span style="color: #66cc66;" #123;span
span style="color: #808080; font-style: italic;"// player settings span
span style="color: #0066CC;"privatespan span style="color: #000000; font-weight: bold;"varspan _moveSpeedMax:span style="color: #0066CC;"Numberspan = span style="color: #cc66cc;"1000span;
span style="color: #0066CC;"privatespan span style="color: #000000; font-weight: bold;"varspan _rotateSpeedMax:span style="color: #0066CC;"Numberspan = span style="color: #cc66cc;"15span;
span style="color: #0066CC;"privatespan span style="color: #000000; font-weight: bold;"varspan _decay:span style="color: #0066CC;"Numberspan = .98;
span style="color: #0066CC;"privatespan span style="color: #000000; font-weight: bold;"varspan _destinationX:span style="color: #0066CC;"intspan = span style="color: #cc66cc;"150span;
span style="color: #0066CC;"privatespan span style="color: #000000; font-weight: bold;"varspan _destinationY:span style="color: #0066CC;"intspan = span style="color: #cc66cc;"150span;
span style="color: #808080; font-style: italic;"// playerspan
span style="color: #0066CC;"privatespan span style="color: #000000; font-weight: bold;"varspan _player:span style="color: #0066CC;"MovieClipspan;
span style="color: #808080; font-style: italic;"// globalspan
span style="color: #0066CC;"privatespan span style="color: #000000; font-weight: bold;"varspan _isActive:span style="color: #0066CC;"Booleanspan = span style="color: #000000; font-weight: bold;"falsespan;
span style="color: #0066CC;"privatespan span style="color: #000000; font-weight: bold;"varspan _dx:span style="color: #0066CC;"Numberspan = span style="color: #cc66cc;"0span;
span style="color: #0066CC;"privatespan span style="color: #000000; font-weight: bold;"varspan _dy:span style="color: #0066CC;"Numberspan = span style="color: #cc66cc;"0span;
span style="color: #0066CC;"privatespan span style="color: #000000; font-weight: bold;"varspan _vx:span style="color: #0066CC;"Numberspan = span style="color: #cc66cc;"0span;
span style="color: #0066CC;"privatespan span style="color: #000000; font-weight: bold;"varspan _vy:span style="color: #0066CC;"Numberspan = span style="color: #cc66cc;"0span;
span style="color: #0066CC;"privatespan span style="color: #000000; font-weight: bold;"varspan _trueRotation:span style="color: #0066CC;"Numberspan = span style="color: #cc66cc;"0span;
span style="color: #808080; font-style: italic;"/**
* Constructor
*/span
span style="color: #0066CC;"publicspan span style="color: #000000; font-weight: bold;"functionspan Mainspan style="color: #66cc66;" #40;spanspan style="color: #66cc66;" #41;span
span style="color: #66cc66;" #123;span
span style="color: #808080; font-style: italic;"// create player objectspan
createPlayerspan style="color: #66cc66;" #40;spanspan style="color: #66cc66;" #41;span;
span style="color: #808080; font-style: italic;"// add listenersspan
span style="color: #0066CC;"stagespan.span style="color: #006600;"addEventListenerspanspan style="color: #66cc66;" #40;spanEvent.span style="color: #006600;"ENTER_FRAMEspan, enterFrameHandlerspan style="color: #66cc66;" #41;span;
span style="color: #0066CC;"stagespan.span style="color: #006600;"addEventListenerspanspan style="color: #66cc66;" #40;spanMouseEvent.span style="color: #006600;"MOUSE_UPspan, onMouseUpHandlerspan style="color: #66cc66;" #41;span;
span style="color: #0066CC;"stagespan.span style="color: #006600;"addEventListenerspanspan style="color: #66cc66;" #40;spanMouseEvent.span style="color: #006600;"MOUSE_DOWNspan, onMouseDownHandlerspan style="color: #66cc66;" #41;span;
span style="color: #66cc66;" #125;span
span style="color: #808080; font-style: italic;"/**
* Creates player
*/span
span style="color: #0066CC;"privatespan span style="color: #000000; font-weight: bold;"functionspan createPlayerspan style="color: #66cc66;" #40;spanspan style="color: #66cc66;" #41;span:span style="color: #0066CC;"voidspan
span style="color: #66cc66;" #123;span
_player = span style="color: #000000; font-weight: bold;"newspan Playerspan style="color: #66cc66;" #40;spanspan style="color: #66cc66;" #41;span;
_player.span style="color: #006600;"xspan = span style="color: #0066CC;"stagespan.span style="color: #006600;"stageWidthspan span style="color: #66cc66;"/span span style="color: #cc66cc;"2span;
_player.span style="color: #006600;"yspan = span style="color: #0066CC;"stagespan.span style="color: #006600;"stageHeightspan span style="color: #66cc66;"/span span style="color: #cc66cc;"2span;
span style="color: #0066CC;"stagespan.span style="color: #006600;"addChildspanspan style="color: #66cc66;" #40;span_playerspan style="color: #66cc66;" #41;span;
span style="color: #66cc66;" #125;span
span style="color: #808080; font-style: italic;"/**
* EnterFrame Handlers
*/span
span style="color: #0066CC;"privatespan span style="color: #000000; font-weight: bold;"functionspan enterFrameHandlerspan style="color: #66cc66;" #40;spanevent:Eventspan style="color: #66cc66;" #41;span:span style="color: #0066CC;"voidspan
span style="color: #66cc66;" #123;span
updatePositionspan style="color: #66cc66;" #40;spanspan style="color: #66cc66;" #41;span;
updateRotationspan style="color: #66cc66;" #40;spanspan style="color: #66cc66;" #41;span;
span style="color: #66cc66;" #125;span
span style="color: #808080; font-style: italic;"/**
* Calculate Rotation
*/span
span style="color: #0066CC;"privatespan span style="color: #000000; font-weight: bold;"functionspan updateRotationspan style="color: #66cc66;" #40;spanspan style="color: #66cc66;" #41;span:span style="color: #0066CC;"voidspan
span style="color: #66cc66;" #123;span
span style="color: #808080; font-style: italic;"// calculate rotationspan
_dx = _player.span style="color: #006600;"xspan - _destinationX;
_dy = _player.span style="color: #006600;"yspan - _destinationY;
span style="color: #808080; font-style: italic;"// which way to rotatespan
span style="color: #000000; font-weight: bold;"varspan rotateTo:span style="color: #0066CC;"Numberspan = getDegreesspan style="color: #66cc66;" #40;spangetRadiansspan style="color: #66cc66;" #40;span_dx, _dyspan style="color: #66cc66;" #41;spanspan style="color: #66cc66;" #41;span;
span style="color: #808080; font-style: italic;"// keep rotation positive, between 0 and 360 degreesspan
span style="color: #b1b100;"ifspan span style="color: #66cc66;" #40;spanrotateTo span style="color: #66cc66;" gt;span _player.span style="color: #006600;"rotationspan + span style="color: #cc66cc;"180spanspan style="color: #66cc66;" #41;span rotateTo -= span style="color: #cc66cc;"360span;
span style="color: #b1b100;"ifspan span style="color: #66cc66;" #40;spanrotateTo span style="color: #66cc66;" lt;span _player.span style="color: #006600;"rotationspan - span style="color: #cc66cc;"180spanspan style="color: #66cc66;" #41;span rotateTo += span style="color: #cc66cc;"360span;
span style="color: #808080; font-style: italic;"// ease rotationspan
_trueRotation = span style="color: #66cc66;" #40;spanrotateTo - _player.span style="color: #006600;"rotationspanspan style="color: #66cc66;" #41;span span style="color: #66cc66;"/span _rotateSpeedMax;
span style="color: #808080; font-style: italic;"// update rotationspan
_player.span style="color: #006600;"rotationspan += _trueRotation;
span style="color: #66cc66;" #125;span
span style="color: #808080; font-style: italic;"/**
* Calculate Position
*/span
span style="color: #0066CC;"privatespan span style="color: #000000; font-weight: bold;"functionspan updatePositionspan style="color: #66cc66;" #40;spanspan style="color: #66cc66;" #41;span:span style="color: #0066CC;"voidspan
span style="color: #66cc66;" #123;span
span style="color: #808080; font-style: italic;"// check if mouse is downspan
span style="color: #b1b100;"ifspan span style="color: #66cc66;" #40;span_isActivespan style="color: #66cc66;" #41;span
span style="color: #66cc66;" #123;span
span style="color: #808080; font-style: italic;"// update destinationspan
_destinationX = span style="color: #0066CC;"stagespan.span style="color: #006600;"mouseXspan;
_destinationY = span style="color: #0066CC;"stagespan.span style="color: #006600;"mouseYspan;
span style="color: #808080; font-style: italic;"// update velocityspan
_vx += span style="color: #66cc66;" #40;span_destinationX - _player.span style="color: #006600;"xspanspan style="color: #66cc66;" #41;span span style="color: #66cc66;"/span _moveSpeedMax;
_vy += span style="color: #66cc66;" #40;span_destinationY - _player.span style="color: #006600;"yspanspan style="color: #66cc66;" #41;span span style="color: #66cc66;"/span _moveSpeedMax;
span style="color: #66cc66;" #125;span
span style="color: #b1b100;"elsespan
span style="color: #66cc66;" #123;span
span style="color: #808080; font-style: italic;"// when mouse is not down, update velocity half of normal speedspan
_vx += span style="color: #66cc66;" #40;span_destinationX - _player.span style="color: #006600;"xspanspan style="color: #66cc66;" #41;span span style="color: #66cc66;"/span _moveSpeedMax span style="color: #66cc66;"*span .25;
_vy += span style="color: #66cc66;" #40;span_destinationY - _player.span style="color: #006600;"yspanspan style="color: #66cc66;" #41;span span style="color: #66cc66;"/span _moveSpeedMax span style="color: #66cc66;"*span .25;
span style="color: #66cc66;" #125;span
span style="color: #808080; font-style: italic;"// apply decay (drag)span
_vx span style="color: #66cc66;"*span= _decay;
_vy span style="color: #66cc66;"*span= _decay;
span style="color: #808080; font-style: italic;"// if close to target, slow down turn speedspan
span style="color: #b1b100;"ifspan span style="color: #66cc66;" #40;spangetDistancespan style="color: #66cc66;" #40;span_dx, _dyspan style="color: #66cc66;" #41;span span style="color: #66cc66;" lt;span span style="color: #cc66cc;"50spanspan style="color: #66cc66;" #41;span
span style="color: #66cc66;" #123;span
_trueRotation span style="color: #66cc66;"*span= .5;
span style="color: #66cc66;" #125;span
span style="color: #808080; font-style: italic;"// update positionspan
_player.span style="color: #006600;"xspan += _vx;
_player.span style="color: #006600;"yspan += _vy;
span style="color: #66cc66;" #125;span
span style="color: #808080; font-style: italic;"/**
* Mouse DOWN handler
* @param e
*/span
span style="color: #0066CC;"privatespan span style="color: #000000; font-weight: bold;"functionspan onMouseDownHandlerspan style="color: #66cc66;" #40;spanspan style="color: #0066CC;"espan:MouseEventspan style="color: #66cc66;" #41;span:span style="color: #0066CC;"voidspan
span style="color: #66cc66;" #123;span
_isActive = span style="color: #000000; font-weight: bold;"truespan;
span style="color: #66cc66;" #125;span
span style="color: #808080; font-style: italic;"/**
* Mouse UP handler
* @param e
*/span
span style="color: #0066CC;"privatespan span style="color: #000000; font-weight: bold;"functionspan onMouseUpHandlerspan style="color: #66cc66;" #40;spanspan style="color: #0066CC;"espan:MouseEventspan style="color: #66cc66;" #41;span:span style="color: #0066CC;"voidspan
span style="color: #66cc66;" #123;span
_isActive = span style="color: #000000; font-weight: bold;"falsespan;
span style="color: #66cc66;" #125;span
span style="color: #808080; font-style: italic;"/**
* Get distance
* @param delta_x
* @param delta_y
* @return
*/span
span style="color: #0066CC;"publicspan span style="color: #000000; font-weight: bold;"functionspan getDistancespan style="color: #66cc66;" #40;spandelta_x:span style="color: #0066CC;"Numberspan, delta_y:span style="color: #0066CC;"Numberspanspan style="color: #66cc66;" #41;span:span style="color: #0066CC;"Numberspan
span style="color: #66cc66;" #123;span
span style="color: #b1b100;"returnspan span style="color: #0066CC;"Mathspan.span style="color: #0066CC;"sqrtspanspan style="color: #66cc66;" #40;spanspan style="color: #66cc66;" #40;spandelta_xspan style="color: #66cc66;"*spandelta_xspan style="color: #66cc66;" #41;span+span style="color: #66cc66;" #40;spandelta_yspan style="color: #66cc66;"*spandelta_yspan style="color: #66cc66;" #41;spanspan style="color: #66cc66;" #41;span;
span style="color: #66cc66;" #125;span
span style="color: #808080; font-style: italic;"/**
* Get radians
* @param delta_x
* @param delta_y
* @return
*/span
span style="color: #0066CC;"publicspan span style="color: #000000; font-weight: bold;"functionspan getRadiansspan style="color: #66cc66;" #40;spandelta_x:span style="color: #0066CC;"Numberspan, delta_y:span style="color: #0066CC;"Numberspanspan style="color: #66cc66;" #41;span:span style="color: #0066CC;"Numberspan
span style="color: #66cc66;" #123;span
span style="color: #000000; font-weight: bold;"varspan r:span style="color: #0066CC;"Numberspan = span style="color: #0066CC;"Mathspan.span style="color: #0066CC;"atan2spanspan style="color: #66cc66;" #40;spandelta_y, delta_xspan style="color: #66cc66;" #41;span;
span style="color: #b1b100;"ifspan span style="color: #66cc66;" #40;spandelta_y span style="color: #66cc66;" lt;span span style="color: #cc66cc;"0spanspan style="color: #66cc66;" #41;span
span style="color: #66cc66;" #123;span
r += span style="color: #66cc66;" #40;spanspan style="color: #cc66cc;"2span span style="color: #66cc66;"*span span style="color: #0066CC;"Mathspan.span style="color: #0066CC;"PIspanspan style="color: #66cc66;" #41;span;
span style="color: #66cc66;" #125;span
span style="color: #b1b100;"returnspan r;
span style="color: #66cc66;" #125;span
span style="color: #808080; font-style: italic;"/**
* Get degrees
* @param radians
* @return
*/span
span style="color: #0066CC;"publicspan span style="color: #000000; font-weight: bold;"functionspan getDegreesspan style="color: #66cc66;" #40;spanradians:span style="color: #0066CC;"Numberspanspan style="color: #66cc66;" #41;span:span style="color: #0066CC;"Numberspan
span style="color: #66cc66;" #123;span
span style="color: #b1b100;"returnspan span style="color: #0066CC;"Mathspan.span style="color: #0066CC;"floorspanspan style="color: #66cc66;" #40;spanradiansspan style="color: #66cc66;"/spanspan style="color: #66cc66;" #40;spanspan style="color: #0066CC;"Mathspan.span style="color: #0066CC;"PIspanspan style="color: #66cc66;"/spanspan style="color: #cc66cc;"180spanspan style="color: #66cc66;" #41;spanspan style="color: #66cc66;" #41;span;
span style="color: #66cc66;" #125;span
span style="color: #66cc66;" #125;span
span style="color: #66cc66;" #125;span
Download Fla Sample
AS3 player movement, character control, click and hold mouse functionality, Flash follow mouse example, flash player follow mouse, follow mouse with easing, smooth rotate to mouse, smooth rotation example
Read More
Car example bug fixes
January 9th, 2011 Posted in Site Updates
Jan, 09 2011
No Comments #187;
By popular demand I updated my car driving examples. Update included a complete code rewrite which optimizes everything and fixes all bugs. Everything is a lot more simplified too.
AS3 version:
http://www.freeactionscript.com/2010/06/as3-car-movement-acceleration-turning-braking/
AS2 version:
http://www.freeactionscript.com/2009/02/car-movement-acceleration-braking-turning-reverse/
Read More
Get number of days in a month
January 8th, 2011 Posted in AS3 Gadgets
Jan, 08 2011
2 Comments #187;
Simple AS3 function to get the number of days in a month/year.
?[Copy to clipboard]View Code ACTIONSCRIPTspan style="color: #000000; font-weight: bold;"functionspan getNumberOfDaysspan style="color: #66cc66;" #40;span$year:span style="color: #0066CC;"intspan, $month:span style="color: #0066CC;"intspanspan style="color: #66cc66;" #41;span:span style="color: #0066CC;"intspan
span style="color: #66cc66;" #123;span
span style="color: #000000; font-weight: bold;"varspan month:span style="color: #0066CC;"Datespan = span style="color: #000000; font-weight: bold;"newspan span style="color: #0066CC;"Datespanspan style="color: #66cc66;" #40;span$year, $month + span style="color: #cc66cc;"1span, span style="color: #cc66cc;"0spanspan style="color: #66cc66;" #41;span;
span style="color: #b1b100;"returnspan month.span style="color: #0066CC;"datespan;
span style="color: #66cc66;" #125;span
span style="color: #808080; font-style: italic;"//janspan
span style="color: #0066CC;"tracespanspan style="color: #66cc66;" #40;spangetNumberOfDaysspan style="color: #66cc66;" #40;spanspan style="color: #cc66cc;"2010span, span style="color: #cc66cc;"0spanspan style="color: #66cc66;" #41;spanspan style="color: #66cc66;" #41;span; span style="color: #808080; font-style: italic;"// traces 31span
span style="color: #808080; font-style: italic;"//febspan
span style="color: #0066CC;"tracespanspan style="color: #66cc66;" #40;spangetNumberOfDaysspan style="color: #66cc66;" #40;spanspan style="color: #cc66cc;"2010span, span style="color: #cc66cc;"1spanspan style="color: #66cc66;" #41;spanspan style="color: #66cc66;" #41;span; span style="color: #808080; font-style: italic;"// traces 28span
span style="color: #808080; font-style: italic;"//decspan
span style="color: #0066CC;"tracespanspan style="color: #66cc66;" #40;spangetNumberOfDaysspan style="color: #66cc66;" #40;spanspan style="color: #cc66cc;"2010span, span style="color: #cc66cc;"11spanspan style="color: #66cc66;" #41;spanspan style="color: #66cc66;" #41;span; span style="color: #808080; font-style: italic;"// traces 31span
as3 date class, get number of days in a month, how many days are in a month
Read More
Older Entries
Categories
AS3 Effects
AS3 Gadgets
Game Examples AS2
Effects Animated
Effects Dynamic
Enemy AI
Game Engine
Game Weapons
Images
Interface
Math
Security
Game Examples AS3
Basics
Enemy AI
Movement
Physics
Space Shooter
User Interface
Site Updates
Blogroll
8bitrocket
Actionscript.org Forums
Flash Game Blogs
Flash Game License
Flashkit Forums
gotoAndLearn
Kirupa’s Tutorials
MochiAds Resources
Philip Radvan
Template Gal
Tonypa’s Tutorials
Recent Commentspradvan on Realistic Floating Soap Bubbles4ourgs on Realistic Floating Soap Bubblespradvan on Have a Request?robert on Have a Request?pradvan on Flash Game Projectile Weapons My Account
Register Log in
Entries RSS
Comments RSS
WordPress.org
copy; 2011 Free ActionScript

数据更新时间

正在更新   

常用工具

桌面软件: MyIP网站信息状态条  WebShot网页快照  SiteMapMaker网站地图生成 
网站信息: Alexa排名查询  PageRank查询/真假PR鉴别/PR劫持检测  外链检查  搜索引擎收录  搜索引擎反向链接  域名注册查询 
网页编辑: 颜色代码选择器  Html特殊符号 
网站调试: 蜘蛛抓取模拟  网站Header信息  网页源代码查看 
代码转换: 火星文查询  繁体/简体转换  Html/js代码转换  Html/UBB代码转换 
友情连接: CodeForge免费源码 CodeForge.com PCFans IT资讯 Ngnix Lighttpd GPhone中国    更多... (PR<5自动转内页)
网站地图: 1 2 3 4 5 6 7 8 9 10 20 30 40 50 60 70 80 90 100 110 120 130 140 150 160 170 180 190 200 250 300 350 400 450 500
免责声明 | 联系我们 | 交换友情链接 | 广告位招商QQ: 1967659002
© 2009 MyIP.cn Dev by MYIP Elapsed:65.662ms 黑ICP备09072263号