www.mutationevent.com

Articles taggés avec ‘as3’

as3corelib Library est sur GitHub

Vendredi 30 juillet 2010

Mike chambers vient de déménager la bibliothèque as3corelib vers GitHub.
Cela devrait rendre le projet un peu plus facile à gérer, et en particulier faciliter la contribution pour les développeurs.

https://github.com/mikechambers/as3corelib

Technorati Tags: as3, corelib, git, library

  • Twitter
  • Facebook
  • Digg
  • Delicious
  • Google Reader
  • LinkedIn
  • Technorati Favorites
  • Netvibes Share
  • NewsVine
  • Share/Bookmark

simple flash video player with OSMF

Dimanche 23 mai 2010

simple flash video player with OSMF

  1. import org.osmf.media.MediaPlayer;
  2. import org.osmf.video.VideoElement;
  3. import flash.display.Sprite;
  4. import org.osmf.events.MediaPlayerCapabilityChangeEvent;
  5. import org.osmf.events.DisplayObjectEvent;
  6. import org.osmf.net.NetLoader;
  7. import org.osmf.media.URLResource;
  8. import org.osmf.utils.URL;
  9.  
  10. var mPlayer:MediaPlayer;
  11. var videoElment:VideoElement;
  12. var mc_container:Sprite;
  13.  
  14. init();
  15.  
  16. function init()
  17. {
  18.  
  19. mc_container = new Sprite();
  20. addChild(mc_container);
  21. mPlayer = new MediaPlayer();
  22. mPlayer.addEventListener(MediaPlayerCapabilityChangeEvent.CAN_PLAY_CHANGE, onViewable);
  23. mPlayer.addEventListener(DisplayObjectEvent.MEDIA_SIZE_CHANGE, onDimensionChange);
  24.  
  25. var path:String = "example.f4v";
  26.  
  27. videoElment = new VideoElement(new NetLoader, new URLResource( new URL(path)));
  28.  
  29. mPlayer.media = videoElment;
  30. }
  31.  
  32. function onViewable(event:MediaPlayerCapabilityChangeEvent):void
  33. {
  34. if(event.enabled)
  35. {
  36. if(mPlayer.canPlay)
  37. {
  38. mPlayer.play();
  39. }
  40. }
  41. }
  42.  
  43. function onDimensionChange(event:DisplayObjectEvent):void
  44. {
  45. mPlayer.displayObject.width = event.newWidth;
  46. mPlayer.displayObject.height = event.newHeight;
  47.  
  48. mc_container.addChild(mPlayer.displayObject);
  49. }

Télécharger l'exemple : osmf video player (34)
Télécharger OSMF : http://blogs.adobe.com/osmf/

Technorati Tags: actionscript, as3, OSMF, video player

  • Twitter
  • Facebook
  • Digg
  • Delicious
  • Google Reader
  • LinkedIn
  • Technorati Favorites
  • Netvibes Share
  • NewsVine
  • Share/Bookmark

Flip MovieClip with as3

Lundi 12 avril 2010

inverser un clip sur un axe horizontale.

la première méthode consiste a utiliser la propriétée scaleX d'un movieClip
et la seconde consiste a utiliser Matrix3D.

code1 :

my_mc.scaleX = -1;

code2 :

import flash.geom.Matrix3D;
 
var nRotationY:Number = 180;
my_mc.rotationY = 0;
 
var myMatrix3D:Matrix3D = my_mc.transform.matrix3D;
myMatrix3D.prependRotation(nRotationY, Vector3D.Y_AXIS);

Personnelement je préfére la deuxième méthode "Matrix3D" et qui offre plusieur possibilité de transformation en controlant le degré de rotation chose qui n'est pas disponible pour la propriétée "scaleX"

Download exemple flip_movieclip_matrix3D (19)

Technorati Tags: as3, flip, Matrix3D

  • Twitter
  • Facebook
  • Digg
  • Delicious
  • Google Reader
  • LinkedIn
  • Technorati Favorites
  • Netvibes Share
  • NewsVine
  • Share/Bookmark

datavalidation

Vendredi 19 mars 2010

DataValidation a été aprouvé sur le site riaforge : http://datavalidation.riaforge.org/

datavalidation-riaforge

Technorati Tags: as3, data validation, riaforge

  • Twitter
  • Facebook
  • Digg
  • Delicious
  • Google Reader
  • LinkedIn
  • Technorati Favorites
  • Netvibes Share
  • NewsVine
  • Share/Bookmark

ActionScript Data validation package

Jeudi 18 mars 2010

On a recourt maintenant dans de nombreux project flash/flex a créer des formulaires (formulaire de contact, d'inscription, .etc..) et on a toujours besoin de valider les données saisies pas les utilisateurs, après quelques recherche sur internet je n'ai pas trouvé de class actionscript 3 qui permet de valider les données de façons simple, du coup je me suis mis a créer une, ou plutôt convertire la class que j'utilise dans mes projets et en me basant aussi sur la class javascript (validate.js).

voici le site dédier a ce package : http://www.mutationevent.com/projects/dataValidation

Technorati Tags: actionscript, as3, class, package, validate data

  • Twitter
  • Facebook
  • Digg
  • Delicious
  • Google Reader
  • LinkedIn
  • Technorati Favorites
  • Netvibes Share
  • NewsVine
  • Share/Bookmark

The flash.globalization package in Flash Player | Adobe Developer Connection

Mardi 26 janvier 2010

The flash.globalization package in Flash Player | Adobe Developer Connection.

Great applications are able to reach users around the world. However, developing truly global applications requires presenting information in the way that your users around the globe expect to see it: not only in their own language but according to their own cultural conventions. This article shows you how the newly available flash.globalization package in the Flash Player 10.1 public prerelease makes it easy to display numbers, dates, and times; sort words or sentences; and even capitalize letters in a manner consistent with the expectations of every user...

Technorati Tags: as3, flash, flex

  • Twitter
  • Facebook
  • Digg
  • Delicious
  • Google Reader
  • LinkedIn
  • Technorati Favorites
  • Netvibes Share
  • NewsVine
  • Share/Bookmark

Opticon nouveau runtime debugging console pour Flash/Flex

Vendredi 8 janvier 2010

Opticon est une nouvelle console de débugage pour les applications Flash et Flex.

opticon_icon

Cette fonctionne comme MonsterDebugger de demonsterdebugger.com , il suffit d'attacher le .SWC à votre projet et remplacer vos fonctions trace par Opticon.log, Opticon.warning, Opticon.error.

Technorati Tags: Adobe Air, as3, debugger, flash, flex

  • Twitter
  • Facebook
  • Digg
  • Delicious
  • Google Reader
  • LinkedIn
  • Technorati Favorites
  • Netvibes Share
  • NewsVine
  • Share/Bookmark

update Adobe Air NativeProcess & YUI compressor

Vendredi 1 janvier 2010

Voici une mise à jour mineur sur AIR_YUI_compressor, j'ai ajouté le lien vers le site de YUI et aussi la possibilite de changer le chemin de yuicompressor et java.

Télécharger la nouvelle version ici air_np_yuicompressor_v1.1 (26)

Technorati Tags: adobe, air, as3, native process

  • Twitter
  • Facebook
  • Digg
  • Delicious
  • Google Reader
  • LinkedIn
  • Technorati Favorites
  • Netvibes Share
  • NewsVine
  • Share/Bookmark

La Differences entre api de FP 10 et cell de FP 10.1

Samedi 21 novembre 2009

fp10

Les Nouvelles Classes dans Flash Player 10.1

Les nouvelles Interfaces dans Flash Player 10.1

Les classes implementées dans FP 10.1 mais pas dans FP 10.0

Les propiétées des classes dans FP 10.1 mais pas dans FP 10.0

Class methods in FP 10.1 but not in FP 10.0

Class method parameters in FP 10.1 but not in FP 10.0

voici l'article original : API differences between FP 10.1 and FP 10.0

Technorati Tags: adobe, api, as3, class, code, flash player, flash player 10

  • Twitter
  • Facebook
  • Digg
  • Delicious
  • Google Reader
  • LinkedIn
  • Technorati Favorites
  • Netvibes Share
  • NewsVine
  • Share/Bookmark

as3 TypeWriter Effect

Lundi 10 août 2009

code source :

  1. import com.mutationevent.TypeWriter;
  2. var tw:TypeWriter = new TypeWriter(theText, 1, 10);
  3. tw.addEventListener(TypeWriter.COMPLETE, onComplete);
  4. function onComplete(event:Event)
  5. {
  6. trace("complete", event);
  7. }

class :

  1. /*
  2. * Copyright 2009 Achraf bouyakhsass [http://www.mutationevent.com]
  3. *
  4. * Licensed under the Apache License, Version 2.0 (the "License");
  5. * you may not use this file except in compliance with the License.
  6. * You may obtain a copy of the License at
  7. *
  8. * http://www.apache.org/licenses/LICENSE-2.0
  9. *
  10. * Unless required by applicable law or agreed to in writing, software
  11. * distributed under the License is distributed on an "AS IS" BASIS,
  12. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13. * See the License for the specific language governing permissions and
  14. * limitations under the License.
  15. */
  16. package com.mutationevent
  17. {
  18. import flash.events.*;
  19. import flash.utils.Timer;
  20. import flash.text.TextField;
  21.  
  22. public class TypeWriter extends EventDispatcher
  23. {
  24. private var timer:Timer;
  25. private var count:Number = 0;
  26. private var str:String;
  27. private var target:TextField;
  28. private var charJump:Number = 1;
  29. private var speed:Number = 50;
  30. public static var COMPLETE:String = "complete";
  31.  
  32. public function TypeWriter(tf:TextField, cj:Number, sp:Number)
  33. {
  34. charJump = cj;
  35. speed = sp;
  36. target = tf;
  37. str = target.text;
  38. target.text = "";
  39.  
  40. timer = new Timer(speed);
  41. timer.addEventListener(TimerEvent.TIMER, write);
  42. timer.start();
  43. }
  44. private function write(event:TimerEvent):void
  45. {
  46. target.text = str.substring(0, count);
  47. count += charJump;
  48. if(count > str.length)
  49. {
  50. timer.removeEventListener(TimerEvent.TIMER, write);
  51. dispatchEvent(new Event(TypeWriter.COMPLETE));
  52. }
  53. }
  54. }
  55. }

Télécharger le fichier ici : as3 TypeWriter (63)

Technorati Tags: as3, typewriter

  • Twitter
  • Facebook
  • Digg
  • Delicious
  • Google Reader
  • LinkedIn
  • Technorati Favorites
  • Netvibes Share
  • NewsVine
  • Share/Bookmark

  • Archives

  • Catégories