Archive for 2008


20
Dec
2008

debug flash and silverlight messeges with firefox

my little extension to connect firefox error console to flash / silverlight application .

download add on:

Install Extension!

after installing this add on, you can simply call a trace function from flash, and send the message to the firefox error console.
it come up really handy in debugging live sites, when you must not use an output box on the screen.

flash as3 code :

View Code ACTIONSCRIPT3
import flash.external.ExternalInterface;
function tracer(msg:String){
ExternalInterface.call('fsTrace',msg);
}

that’s it, you will see your message in the error console.

after installing the add on you can use this simple flash demo to see how it works:

http://www.adylevy.com/wp-content/plugins/sociofluid/images/digg_32.png http://www.adylevy.com/wp-content/plugins/sociofluid/images/stumbleupon_32.png http://www.adylevy.com/wp-content/plugins/sociofluid/images/delicious_32.png http://www.adylevy.com/wp-content/plugins/sociofluid/images/furl_32.png http://www.adylevy.com/wp-content/plugins/sociofluid/images/technorati_32.png http://www.adylevy.com/wp-content/plugins/sociofluid/images/google_32.png http://www.adylevy.com/wp-content/plugins/sociofluid/images/myspace_32.png http://www.adylevy.com/wp-content/plugins/sociofluid/images/facebook_32.png http://www.adylevy.com/wp-content/plugins/sociofluid/images/yahoobuzz_32.png http://www.adylevy.com/wp-content/plugins/sociofluid/images/twitter_32.png http://www.adylevy.com/wp-content/plugins/sociofluid/images/meneame_32.png

08
Dec
2008

sql joke

A SQL query goes into a bar, walks up to two tables and says, “Can I join you?

http://www.adylevy.com/wp-content/plugins/sociofluid/images/digg_32.png http://www.adylevy.com/wp-content/plugins/sociofluid/images/stumbleupon_32.png http://www.adylevy.com/wp-content/plugins/sociofluid/images/delicious_32.png http://www.adylevy.com/wp-content/plugins/sociofluid/images/furl_32.png http://www.adylevy.com/wp-content/plugins/sociofluid/images/technorati_32.png http://www.adylevy.com/wp-content/plugins/sociofluid/images/google_32.png http://www.adylevy.com/wp-content/plugins/sociofluid/images/myspace_32.png http://www.adylevy.com/wp-content/plugins/sociofluid/images/facebook_32.png http://www.adylevy.com/wp-content/plugins/sociofluid/images/yahoobuzz_32.png http://www.adylevy.com/wp-content/plugins/sociofluid/images/twitter_32.png http://www.adylevy.com/wp-content/plugins/sociofluid/images/meneame_32.png

04
Nov
2008

reading a div from dom in actionscript 3 (as3) – flash

in order to read a div from your html document,
first you to add the ‘allowScriptAccess’ in the flash injection (like swfobject) to sameDomain
some thing like : so.addParam(’allowScriptAccess’,’sameDomain’);

(will try to write more about using swfobject soon..)

then in the flash you include the ExternalInterface class:
include flash.external.ExternalInterface;

then you can use something like :
var myDivContent = ExternalInterface.call(’function(){ return document.GetElementById(’flashDiv’);}’);

and in the html file :

bla bla bla

you can add style=’display:none’ in you want this div to be hidden.

it’s good for the page seo as the text will be html text, but you show it thru the flash …

http://www.adylevy.com/wp-content/plugins/sociofluid/images/digg_32.png http://www.adylevy.com/wp-content/plugins/sociofluid/images/stumbleupon_32.png http://www.adylevy.com/wp-content/plugins/sociofluid/images/delicious_32.png http://www.adylevy.com/wp-content/plugins/sociofluid/images/furl_32.png http://www.adylevy.com/wp-content/plugins/sociofluid/images/technorati_32.png http://www.adylevy.com/wp-content/plugins/sociofluid/images/google_32.png http://www.adylevy.com/wp-content/plugins/sociofluid/images/myspace_32.png http://www.adylevy.com/wp-content/plugins/sociofluid/images/facebook_32.png http://www.adylevy.com/wp-content/plugins/sociofluid/images/yahoobuzz_32.png http://www.adylevy.com/wp-content/plugins/sociofluid/images/twitter_32.png http://www.adylevy.com/wp-content/plugins/sociofluid/images/meneame_32.png
Comments (3)
Posted in as3

15
Jul
2008

as3 scrollbar – free as3 scroller class written in actionscript 3 (flash)

this is a simple scroller class i wrote that helps me in attaching a scroller to every movie clip i want very easily.

the usage is very simple :

var myScroller = new Scroller(source Movie Clip ,  Width ,  Height , Scroller Face MovieClip , Align );

the scroller uses the tweenlite tweening class that can be found at : http://www.TweenLite.com

at the moment it only support left side positioning and no horizontal scrolling, but it’s really easy to fix the code so it can fit anyones needs. i might do it one day…

anyways you can download the scrollbar component here 

 

http://www.adylevy.com/wp-content/plugins/sociofluid/images/digg_32.png http://www.adylevy.com/wp-content/plugins/sociofluid/images/stumbleupon_32.png http://www.adylevy.com/wp-content/plugins/sociofluid/images/delicious_32.png http://www.adylevy.com/wp-content/plugins/sociofluid/images/furl_32.png http://www.adylevy.com/wp-content/plugins/sociofluid/images/technorati_32.png http://www.adylevy.com/wp-content/plugins/sociofluid/images/google_32.png http://www.adylevy.com/wp-content/plugins/sociofluid/images/myspace_32.png http://www.adylevy.com/wp-content/plugins/sociofluid/images/facebook_32.png http://www.adylevy.com/wp-content/plugins/sociofluid/images/yahoobuzz_32.png http://www.adylevy.com/wp-content/plugins/sociofluid/images/twitter_32.png http://www.adylevy.com/wp-content/plugins/sociofluid/images/meneame_32.png

09
Jun
2008

accordion class – flash actionscript3 (as3)

in flash as3 you don’t have any accordion component, not that i like using those components,i’d prefer use a nicely written code instead :)

so there i was looking for a vertical accordion for one of my works, i came accross this nice class, that does everything in a very simple code. the only problem i found it that it had only a horizontal version…

looking at the comments i saw there is a need for a vertical one,

so i fixed the code in a way that it can work both ways.

the new accordion constructor has an extra of 2 parameters :

public function accordion($width:Number, $height:Number, panelNumber:Number=0, navWidth:Number=0,navHeight:Number=0,allignment:Boolean=false)

the navHeight – represent the height of the navigation panel for Vertical mode,

and the alignment flag – false is for horizontal, and true … welp you’ll figure that out yourself.

the only thing left open in working with 2 accordions one inside the other :), i’ve managed to get that one going, but there is a problem with something not allowing the inner accordions btns to work as supposed. i’ll try to give it my time soon.

anyway great thanks to the one who wrote it, feel free to give the original page a visit.

download the sourcecode for my version : vertical and horizontal accordion source code

 

http://www.adylevy.com/wp-content/plugins/sociofluid/images/digg_32.png http://www.adylevy.com/wp-content/plugins/sociofluid/images/stumbleupon_32.png http://www.adylevy.com/wp-content/plugins/sociofluid/images/delicious_32.png http://www.adylevy.com/wp-content/plugins/sociofluid/images/furl_32.png http://www.adylevy.com/wp-content/plugins/sociofluid/images/technorati_32.png http://www.adylevy.com/wp-content/plugins/sociofluid/images/google_32.png http://www.adylevy.com/wp-content/plugins/sociofluid/images/myspace_32.png http://www.adylevy.com/wp-content/plugins/sociofluid/images/facebook_32.png http://www.adylevy.com/wp-content/plugins/sociofluid/images/yahoobuzz_32.png http://www.adylevy.com/wp-content/plugins/sociofluid/images/twitter_32.png http://www.adylevy.com/wp-content/plugins/sociofluid/images/meneame_32.png

07
Jun
2008

Combo Box in child swf doesn’t work (flash as2)

Well after struggling for hours on this bug i thought it would be nice to document it here …

maybe i can save some time from other coders.

welp, the problem is that the combo box , in the child swf (loaded dynamicly thru loadMovie or any other method)

is visible and pressed, but it won’t open, and won’t work.

if you run the child swf individually it will work perfectly  , but when you combine them both — > NADA!

well, any guesses ? ……

the thing is that for some reason, you need to have a copy of the combo box component in your parent swf in order for it to work in the child swf , strange solution, but it works~!

so in case someone is looking for the answer for this annoying bug — > thats a simple solution for it,

i’d prefer adobe to do some bug fixing to them components …

(i havn’t checked for the bug in as3 compiled clips, maybe they did fix it in avm1 engine ..)

thats all for now .

http://www.adylevy.com/wp-content/plugins/sociofluid/images/digg_32.png http://www.adylevy.com/wp-content/plugins/sociofluid/images/stumbleupon_32.png http://www.adylevy.com/wp-content/plugins/sociofluid/images/delicious_32.png http://www.adylevy.com/wp-content/plugins/sociofluid/images/furl_32.png http://www.adylevy.com/wp-content/plugins/sociofluid/images/technorati_32.png http://www.adylevy.com/wp-content/plugins/sociofluid/images/google_32.png http://www.adylevy.com/wp-content/plugins/sociofluid/images/myspace_32.png http://www.adylevy.com/wp-content/plugins/sociofluid/images/facebook_32.png http://www.adylevy.com/wp-content/plugins/sociofluid/images/yahoobuzz_32.png http://www.adylevy.com/wp-content/plugins/sociofluid/images/twitter_32.png http://www.adylevy.com/wp-content/plugins/sociofluid/images/meneame_32.png

03
Jun
2008

XAML Browser Application

XAML Browser Application (XBAP) is a new Microsoft technology used for creating Rich Internet Applications.

i recently came across some kewl things made with xaml, so i tried to run some xbap files on my browser (’s if i’ll count both of them explorer and firefox …) but with no luck.

it ask to download the file, and don’t know how to show it.

after looking abit around i found a fix on microsoft site, it is a registry fix that will allow (hopefully :) ) all of your browsers to run wpf files.

go on and download wpf regtool

then you can search goooogle for “filetype:xbap”,

you will get 300+ xbap applications, some of them are really neat!

looking forward for them to release the new silverlight 2 beta 2 sdk….

http://www.adylevy.com/wp-content/plugins/sociofluid/images/digg_32.png http://www.adylevy.com/wp-content/plugins/sociofluid/images/stumbleupon_32.png http://www.adylevy.com/wp-content/plugins/sociofluid/images/delicious_32.png http://www.adylevy.com/wp-content/plugins/sociofluid/images/furl_32.png http://www.adylevy.com/wp-content/plugins/sociofluid/images/technorati_32.png http://www.adylevy.com/wp-content/plugins/sociofluid/images/google_32.png http://www.adylevy.com/wp-content/plugins/sociofluid/images/myspace_32.png http://www.adylevy.com/wp-content/plugins/sociofluid/images/facebook_32.png http://www.adylevy.com/wp-content/plugins/sociofluid/images/yahoobuzz_32.png http://www.adylevy.com/wp-content/plugins/sociofluid/images/twitter_32.png http://www.adylevy.com/wp-content/plugins/sociofluid/images/meneame_32.png

18
May
2008

Starting with as3

as2 programmers usually use #include “filename.as”

for their codeing file reference.

when you immigrate to as3 it’s a bit different. now you have 2 options on importing a code for your project:

1. the first option is to use the same method, but without the “#” infront of the include prefix. this is a less preferable way of doing it, as ActionScript 3 is more OOP language.

2. you can use a documentbase class, choose your document class from the main stage properties bar,

write your filename there, for example “code”

then, your code.as file should be in the same folder of your fla file,

a sample code.as file :

package {
import flash.display.MovieClip;

/**
* …
* @author ady
*/
public class code extends MovieClip
{
public function code()
{// your code here
}
}

}

in this file , you have a constructor for your document ( a main function that runs when the file is loaded)

now write your code, good luck!

http://www.adylevy.com/wp-content/plugins/sociofluid/images/digg_32.png http://www.adylevy.com/wp-content/plugins/sociofluid/images/stumbleupon_32.png http://www.adylevy.com/wp-content/plugins/sociofluid/images/delicious_32.png http://www.adylevy.com/wp-content/plugins/sociofluid/images/furl_32.png http://www.adylevy.com/wp-content/plugins/sociofluid/images/technorati_32.png http://www.adylevy.com/wp-content/plugins/sociofluid/images/google_32.png http://www.adylevy.com/wp-content/plugins/sociofluid/images/myspace_32.png http://www.adylevy.com/wp-content/plugins/sociofluid/images/facebook_32.png http://www.adylevy.com/wp-content/plugins/sociofluid/images/yahoobuzz_32.png http://www.adylevy.com/wp-content/plugins/sociofluid/images/twitter_32.png http://www.adylevy.com/wp-content/plugins/sociofluid/images/meneame_32.png
Comments
Posted in as3

30
Mar
2008

Flex Solutions: Essential Techniques for Flex 2 and 3 Developers

another book i found regarding flex,

you might find this book usefull, it covers these areas:

  • Tips on using Flex components
  • How to validate and format data
  • How to manage complex data
  • Filtering, sorting and using cursors on data with collection classes
  • How to consume Web Services using RPC components
  • How to display data using list-based controls
  • How to effectively compile and deploy Flex applications
  • How to customize the look and feel of your applications
  • How to make your applications more secure
  • How to become more efficient in using the Flex Builder IDE
  • Unique tricks such as calculating memory usage, making your Flex application into an active desktop, and customizing states
  • How to use the ColdFusion Extensions for Flex Builder
  • How to interface your Flex applications with server-side code written in PHP, Java, Rails, and ColdFusion
  • Working with Flex in enterprise enviroment using the Flex Data Services, Java Remote Object and AMFPHP

Essential Techniques for Flex 2 and 3 Developers

http://www.adylevy.com/wp-content/plugins/sociofluid/images/digg_32.png http://www.adylevy.com/wp-content/plugins/sociofluid/images/stumbleupon_32.png http://www.adylevy.com/wp-content/plugins/sociofluid/images/delicious_32.png http://www.adylevy.com/wp-content/plugins/sociofluid/images/furl_32.png http://www.adylevy.com/wp-content/plugins/sociofluid/images/technorati_32.png http://www.adylevy.com/wp-content/plugins/sociofluid/images/google_32.png http://www.adylevy.com/wp-content/plugins/sociofluid/images/myspace_32.png http://www.adylevy.com/wp-content/plugins/sociofluid/images/facebook_32.png http://www.adylevy.com/wp-content/plugins/sociofluid/images/yahoobuzz_32.png http://www.adylevy.com/wp-content/plugins/sociofluid/images/twitter_32.png http://www.adylevy.com/wp-content/plugins/sociofluid/images/meneame_32.png
Comments
Posted in flex

30
Mar
2008

Flex for designers

recently i started to get more into flash,
as a flash / actionscript 2 programmer it interest me to get deeper into the flex / action script 3

here you can find a link for a downloadable pdf which can make your life easier understanding flex concepts.

Things you might learn from the book:

  • The basics of doing design work using Flex Builder
  • How to customize style and layout using CSS
  • How to create and customize themes/skins for your applications
  • How to bring design assets into Flex from Fireworks, Illustrator, and Photoshop
  • How to effectively bring assets created in Flash into Flex
  • How to spice up your design work with useful ActionScript 3.0 techniques
  • Several invaluable Flex design techniques from multiple case studies

Flex for Designers

http://www.adylevy.com/wp-content/plugins/sociofluid/images/digg_32.png http://www.adylevy.com/wp-content/plugins/sociofluid/images/stumbleupon_32.png http://www.adylevy.com/wp-content/plugins/sociofluid/images/delicious_32.png http://www.adylevy.com/wp-content/plugins/sociofluid/images/furl_32.png http://www.adylevy.com/wp-content/plugins/sociofluid/images/technorati_32.png http://www.adylevy.com/wp-content/plugins/sociofluid/images/google_32.png http://www.adylevy.com/wp-content/plugins/sociofluid/images/myspace_32.png http://www.adylevy.com/wp-content/plugins/sociofluid/images/facebook_32.png http://www.adylevy.com/wp-content/plugins/sociofluid/images/yahoobuzz_32.png http://www.adylevy.com/wp-content/plugins/sociofluid/images/twitter_32.png http://www.adylevy.com/wp-content/plugins/sociofluid/images/meneame_32.png
Comments
Posted in flex