actionscript-2

on(release) {…} or myButton.onRelease = function() {…} - action script 2 issues

北城余情 提交于 2019-12-07 22:28:10
问题 I am having real confusion with some flash banners I'm creating and making the button into a clickable object which opens a web page. I have been using this code for a while below, which works... on(release){ getURL("http://www.the-dude.co.uk", "_blank"); } And I placed this code on actual button within the actions panel However I have been told the code above is very old and that I should use action script like below... buttonInstance.onRelease = function() { getURL("http://www.the-dude.co

on(release) {…} or myButton.onRelease = function() {…} - action script 2 issues

家住魔仙堡 提交于 2019-12-06 14:09:17
I am having real confusion with some flash banners I'm creating and making the button into a clickable object which opens a web page. I have been using this code for a while below, which works... on(release){ getURL("http://www.the-dude.co.uk", "_blank"); } And I placed this code on actual button within the actions panel However I have been told the code above is very old and that I should use action script like below... buttonInstance.onRelease = function() { getURL("http://www.the-dude.co.uk", "_blank"); } So I've tried to get this method below to work but nothing happens when I click the

How can I call an Actionscript function when the .swf is referenced by jQuery?

百般思念 提交于 2019-12-06 09:51:48
I have an .swf that I am embedding into HTML using the jQuery SWF Object plugin ( http://jquery.thewikies.com/swfobject ). I have a number of functions within the .swf that I need to call from within javascript functions. I've made these actionscript functions accessible to javascript by calling flash.external.ExternalInterface.addCallback(). Yet nothing happens when I make the call. I've had this happen before and it seems to be that when you reference the .swf from jQuery, you can't call flash functions. Is there anyway around this (aside from not using jQuery)? Thanks. I had the same

Mix multiple sounds in flash

谁说胖子不能爱 提交于 2019-12-06 08:13:10
I have several sound objects in flash, I would like to mix different points in these sound files to create a single masterpiece and save it as an mp3. I've seen various "mixer" applications online and would like to know what area(s) to look at to be able to do this myself. To create the music or whatever you're trying to create, you'll have to Import your wav and mp3 files into your library and drag them onto the movie area to add them to your timeline. Use multiple layers to help organize them. To test your song out you can hit Enter to run from whatever frame your on forward to the end. Don

Zipping and Unzipping tool for Flash ActionScript 2

怎甘沉沦 提交于 2019-12-06 05:33:03
问题 Are you aware of any zip/unzip component or script for flash / actionscript 2 ? I'm aware of this library for flex / AS3, but is there one for AS2 that will save me a long conversion attempt? Is there such a library that supports creating/parsing password protected zip files? 回答1: basically it can be done ... but will be slow ... http://code.google.com/p/hxformat/ actually you would load the string and then it'll be decoded into an Array of bytes (using Bytes.ofString) ... this will take a

MouseWheel not working when published movie has wmode=“transparent”?

怎甘沉沦 提交于 2019-12-04 22:57:12
问题 I'm experiencing a bug with a published flash movie. When I embed the movie in an HTML page (with SWFObject 2.1), and assing it the wmode param value of 'transparent', all my functions based on the MouseWheel event stop working. The movie is based on AS2. Anyone familiar with this bug? 回答1: There is a workaround at Adobe Developer Connection: Workaround to support mouse wheel for FireFox with wmode 回答2: Mousewheel doesn't work for me either in AS3 when I set wmode=transparent. Furthermore, my

Zipping and Unzipping tool for Flash ActionScript 2

a 夏天 提交于 2019-12-04 10:06:54
Are you aware of any zip/unzip component or script for flash / actionscript 2 ? I'm aware of this library for flex / AS3, but is there one for AS2 that will save me a long conversion attempt? Is there such a library that supports creating/parsing password protected zip files? back2dos basically it can be done ... but will be slow ... http://code.google.com/p/hxformat/ actually you would load the string and then it'll be decoded into an Array of bytes (using Bytes.ofString) ... this will take a lot of time ... and you will not be able to do a lot with the results, i guess, since AS2 api is very

Placing AS3 code on stage/MC timelines a la AS2 instead of in classes

自闭症网瘾萝莉.ら 提交于 2019-12-04 07:13:42
问题 I'm aware that ActionScript 3.0 is designed from the ground up to be a largely object-oriented language and using it means less or even no timeline code in Flash documents. I'm quite experienced with OOP and am comfortable writing classes. However, since I mostly use Flash for animations, I hardly ever need to write ActionScript code other than for preloaders, subtitles, quality controls, website links and so on. In fact, I still set my Flash movies to use AS2 to this day because I'm used to

How can I wait for a button press in a loop?

风流意气都作罢 提交于 2019-12-04 06:15:49
问题 Say I have simple program that emulates a board game with a number of players who take turns rolling dice to move across a board. The players can be human or computer. If this was a command-line style game, I could simply make a loop to iterate over the players which would call the diceRoll function for that player. If the player is a computer player, diceRoll simply tells the computer to roll the dice. If the player is a human, the diceRoll will wait until a user inputs the roll command and

Test if an object is defined in ActionScript

旧时模样 提交于 2019-12-03 04:24:29
In ActionScript, how can you test if an object is defined, that is, not null? Matthew Crumley test if an object is defined This works in AS2 and AS3, and is the most reliable way to test if an object has a value. if (obj != null) { doSomethingWith(obj); } Its also the most reliable way to test an object's property and read it in the same expression: if (arr[0] != null && arr[0]>5) { doSomethingWith(arr[0]); } test if an object is null There's a difference between null and undefined, but if you don't care you can just do a normal comparison between either one because they compare equal: if (obj