Here is a link to my first website I did with the GAIA framework: DPD BG
For now it is only in Bulgarian, but hope soon to find time to make it in English too.
Author ArchiveHere is a link to my first website I did with the GAIA framework: DPD BG For now it is only in Bulgarian, but hope soon to find time to make it in English too. 50% Take the quiz at SEO mozI knew I’ll have 50%. I have so much to learn yet. Have you ever tried in ActionScript 3 this: this.addEventListener(Event.ENTER_FRAME, cpF1); this.addEventListener(Event.ENTER_FRAME, cpF2); function cpF1(e:Event):void{ trace("cpF1") } function cpF2(e:Event):void{ trace("cpF2") } Don’t expect to have traces like “cpF2″ only. You’ll have “cpF1 cpF2″ traced on every frame. This is a very hard to find mistake, if you expect an object to have only one onEnterFrame listener but you add another.
Jul
06
2009
Moving from ActionScript 2 to ActionScript 3 troublesPosted by SikoTiko in Problems, tags: actionscript 3, linkage identifier, syntax error1086: Syntax error: expecting semicolon before lineHave you ever seen this error, when trying to move your fla from AS2 to AS3: “Location: tempInit, Line 2 Description: 1086: Syntax error: expecting semicolon before line.” In my case the problem was that I had a movieclip with a Linkage identifier in my AS2 file that contained space in the name. When I moved to AS3 all my Linkage identifiers were converted to class names and when I tried to compile my AS3 flash file I got this error above. So be careful when you name your linkage identifiers. Better use “camel case” instead of using spaces. This will help you move your AS2 fla file to AS3 fla file without seeing this error. Happy coding!
Jul
03
2009
[AS3] Be careful with Shape tweens above buttonsPosted by SikoTiko in Problems, tags: actionscript 3, button, shape tweenIf you use a standart timeline animation with a shape tween above a button and you want to call a function that sets the events for the button from a frame – put the call to the function after the shape tween is over. If the shape tween is over the button, the shape receives the Mouse events and the button won’t work.
May
05
2009
[AS3] Skinning Flash Components – Part IIPosted by SikoTiko in Problems, tags: actionscript 3, component, skinning, SliderSkinning Slider ComponentIn a comment on my previous post [AS3] Skinning Flash Components I was asked to show how to change the size of the thumb of the Slider component. After some experiments with the component here is the way it can be done: import fl.controls.Slider; var s:Slider = new Slider(); s.move(10,10); s.setSize(500,300); /*s.setStyle("thumbUpSkin", SliderThumbCustomSkin); s.setStyle("thumbDownSkin", SliderThumbCustomSkin); s.setStyle("thumbOverSkin", SliderThumbCustomSkin);*/ s.maximum = 100; s.minimum = 0; s.tickInterval = 5; addChild(s); s.getChildAt(1).width = 50; s.getChildAt(1).height = 100; With the code above I found that Read the rest of this entry »
May
02
2009
Flash Player 10: Strange ArtifactsPosted by SikoTiko in Problems, tags: artifacts, blend mode overlay, flash player 10Using PNG in a MovieClip with Blend mode set to Overlay causes strange artifacts in Flash player 10As you can see in the flash demo below, in Flash player 10 the left image has strange artifacts while in the right image there are no artifacts. I used Alpha: 99% for the Movie clip with the PNG and the artifacts were gone. I’m not sure what causes the artifacts in FP10 and if this solution is the right one, but it worked for me. Here is the demo flash: Read the rest of this entry »
Apr
23
2009
[AS3] Code snippets: Useful number methodsPosted by SikoTiko in Code snippets, tags: actionscript 3, number, toFixedRecently I was asked if I know how to show a number with a fixed number of digits after the decimal point. Here is how it can be done: var num:Number = 12.3456; trace(num.toFixed(2));// => 12.34 ATTENTION: This method toFixed returns String. If you want to have a Number after using this method you should use casting or: var num:Number = 12.3456; var num2:Number = Number(num.toFixed(2)); // => returns Number not String
Feb
04
2009
[AS3] Scaling Sprite Containing TextField – ProblemPosted by SikoTiko in Problems, tags: actionscript 3, problem, scaling textfieldToday I run into this strange problem while trying to scale a Sprite containing dynamic TextField. As you can see in the flash demo below, when you scale the Sprite the TextField retains its position in the Sprite container. This is the code that I use for scaling: Read the rest of this entry »
Jan
21
2009
[AS3] Skinning Flash ComponentsPosted by SikoTiko in Problems, tags: actionscript 3, flash component, skinningYou can easily skin a Flash component using only ActionScript using component’s method setStyle() providing as parameters:
Here is the list of the styles that can be used for skinning a component: |
