Firefox 3. Eliminando el borde punteado.
Para eliminar el borde punteado que aparece al clickar en enlaces y objetos flash utilizaremos el siguiente CSS:
Para los links:
1 | a{ outline: none; } |
Para los objetos Flash:
1 | object { outline: none; } |
Archive for the ‘ Actionscript ’ Category
Para eliminar el borde punteado que aparece al clickar en enlaces y objetos flash utilizaremos el siguiente CSS:
Para los links:
1 | a{ outline: none; } |
Para los objetos Flash:
1 | object { outline: none; } |
Does ActionScript 3 have static initializers like Java?
You bet it does!
First of all, what is a static initializer? Simply put, it’s a block of executable code used to initialise a class. They’re also called “static constructors” in C#.
Here’s a class that detects and stores Flash Player version information:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | public class FlashPlayerVersion { /* Inicializador de Bloque estático */ { trace("Initialising class FlashPlayerVersion"); var a:Array = Capabilities.version.split(" "); platform = a[0]; // "WIN", "MAC", "UNIX", etc. a = a[1].split(","); majorVersion = int(a[0]); minorVersion = int(a[1]); buildNumber = int(a[2]); internalBuildNumber = int(a[3]); } public static var platform:String; public static var majorVersion:int; public static var minorVersion:int; public static var buildNumber:int; public static var internalBuildNumber:int; } |
The version information provided by the Capabilities class is in string format, so we need to parse it once. Since the variables holding these values are static, they must be initialised in a static block.
The code in the static block is run when the class is first loaded. You can have multiple static blocks, and they’ll all be executed in the order in which they appear textually within the source.
Here’s a small bit of MXML to test out the FlashPlayerVersion class:
1 2 3 4 5 | <?xml version="1.0"?> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"> <mx:Button label="Click Me!" click="trace('Build number:', FlashPlayerVersion.buildNumber)" /> </mx:Application> |
When you click the button for the first time, the program will trace “Initialising class FlashPlayerVersion” followed by the Flash Player build number. The static initializer is run only once, when the class is first loaded in the virtual machine, which happens when it is first referenced in the application (in our case the click handler).
Original post:manishjethani.com
Some months ago I has make this little class to manage subscriptions from flash to poMMo Newsletter Manager.
I need to update it to AS3. While I am updating it, you can use the as2 version or update by yourself!!.
To install copy the files from:
1 2 3 4 5 | /user/processFlash.php ==> poomo directory /user/ /user/subscribeFLash.fla ==> poomo directory /user/ /themes/default/inc/messagesFlash.tpl ==> poomo directory /themes/default/inc/ /themes/default/inc/messagesFlash.tpl ==> poomo directory /themes/default/inc/ /inc/helpers/validateFlash.php ==> poomo directory /inc/helpers/ |
As2 example code
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 | import com.xperiments.pommo.Pommo; import com.xperiments.pommo.PommoUserDefinedField; import com.xperiments.pommo.PommoEvent; // get Singleton Pommo Instance var pommo:Pommo = Pommo.getInstance( ); // set url to processFlash.php pommo.setSubscribeAction('http://www.yoursite.com/pommo/user/processFlash.php' ); // addListener for: "Invalid Email Address" pommo.addEventListener( PommoEvent.ERROR_INVALID_EMAIL, this ); //addListener for: "Email address already exists. Duplicates are not allowed." pommo.addEventListener( PommoEvent.ERROR_EMAIL_ALREADY_EXIST, this ); //addListener for: "Error adding subscriber! Please contact the administrator." pommo.addEventListener( PommoEvent.ERROR_SERVER_ERROR, this ); //addListener for: "Subscription request received." pommo.addEventListener( PommoEvent.ERROR_REQUEST_RECEIVED, this ); //addListener for: "Welcome Message." pommo.addEventListener( PommoEvent.ERROR_WELCOME_MESSAGE, this ); //addListener for: "Send mail Failed" pommo.addEventListener( PommoEvent.ERROR_SENDING_MAIL, this ); // addListener for: "User Field Error" pommo.addEventListener( PommoEvent.ERROR_USER_FIELD, this ); function onPommoInvalidEmail( evnt:PommoEvent ){ trace( "[ ERROR ] Invalid Email" ) }; function onPommoEmailExist( evnt:PommoEvent ){ trace( "[ ERROR ] Email address already exists. Duplicates are not allowed." ) }; function onPommoServerError( evnt:PommoEvent ){ trace("[ ERROR ] Error adding subscriber! Please contact the administrator." ) }; function onPommoRequestReceived( evnt:PommoEvent ){ trace("[ REQUEST RECEIVED ] "+evnt.message ) }; function onPommoWelcomeMessage( evnt:PommoEvent ){ trace("[ WELCOME ] "+evnt.message ) }; function onPommoSendMailFailed( evnt:PommoEvent ){ trace("[ SEND MAIL FAILED ]") }; function onUserFieldError( evnt:PommoEvent ){ trace("[ USER FIELD ERROR ]"+evnt.errorDesc) }; // to add EXTRA USER FIELDS uncomment this // var userDefinedField:PommoUserDefinedField = new PommoUserDefinedField( ); // userDefinedField.addField( 'd[2]' , 'English' ); // pommo.subscribe( "test@test.com", userDefinedField ); // add subscriber whitout EXTRA USER FIELDS pommo.subscribe( "test@test.com"); |
Download: xpommo
| M | T | W | T | F | S | S |
|---|---|---|---|---|---|---|
| « Jan | ||||||
| 1 | 2 | 3 | 4 | 5 | ||
| 6 | 7 | 8 | 9 | 10 | 11 | 12 |
| 13 | 14 | 15 | 16 | 17 | 18 | 19 |
| 20 | 21 | 22 | 23 | 24 | 25 | 26 |
| 27 | 28 | 29 | ||||