Archive for the ‘ Flex ’ Category
Step 1:
Install VS Premium
Step 2:
Execute Simulator
“C:\Program Files (x86)\Common Files\Microsoft Shared\Windows Simulator\11.0\Microsoft.Windows.Simulator.exe”
Suddenly Windows 8, WiFi off was the status and wasn’t able to use Wifi Networks!!
http://img694.imageshack.us/img694/2959/62721723.png
Tried many fixes but nothing worked out.. the below is what helped me solve the issue..
Find “Window Power Shell” using Windows + F key.. run.. the command below
get-Wmiobject -class win32_networkadapter -namespace root\CIMV2 | where-object {$_.Name -match “Wifi” -or $_.Name -match “wireless” -and $_.name -notmatch “Microsoft Virtual WiFi Miniport Adapter” -and $_.netenabled -eq $false} | % {$_.enable() }
Now right click wifi network and diagnoze and fix to make wifi on
http://code.google.com/p/codegenas3/
The project uses MD5 Encryption to generate the serial key, specific to Machine. The Unique key on system basis is generated and respective serial key is verified with the MD5 Checksum. Can be used on Flex / AIR products selling.
Also, uses SharedObject to store the unique System Key
Usage:
import adams.dev.MD5;
var reg:MD5 = new MD5();
reg.registereduser – > status of user registration
reg.skey – > serial key of the end user
reg.setRegKey(reg.skey); – > to enable the product
Note: The project is 3 years older work done by me.
Code Available here https://gist.github.com/3180501
Util for Finding Average RGB colors seperately
Did a stint on Flex after a long gap, got this..
Spark based Color Picker Component : Check the code base
https://gist.github.com/1527354 – Usage
https://gist.github.com/1527366
https://gist.github.com/1527361
https://gist.github.com/1527358
To use maintainAspectRatio true in your Spark Image, use the fillMode=”scale” and scaleMode=”letterbox”
<s:Image id=”img” smooth=”true” fillMode=”scale” scaleMode=”letterbox” />
due to : spark.primitives.BitmapImage
private function get maintainAspectRatio():Boolean{
return (_scaleMode == BitmapScaleMode.LETTERBOX && _fillMode == BitmapFillMode.SCALE);}
Code Snippet for SVG Editor tool using AS3 https://gist.github.com/1506440
Code Snippet to Color Transform the Image https://gist.github.com/1505064
To Solve the problem : Error #2044: Unhandled ErrorEvent:. text=Error #3702: Context3D not available.
Keep the AIR xml rendermode property into gpu
gpu
Inspired by iTailor.com, the site which helps to design shirts online.
Made a mask with shirt shape to overlay on the shirt, for dynamically changing color of the shirt.
Code:
Lately working in FaceDetection, did shared code of my first steps on Face Detection
https://github.com/nsdevaraj/FaceDetect
Hope it helps for beginners
The Application is based on our experience of getting ACE Certification.
The application free for download on these links:
Source Link, Android App Link, BlackBerry App Link, Amazon App Link, Desktop AIR Link
Looking forward to your feedback to improve the application Experience.
Best wishes on getting ACE Certification.
ByteArray to Encode and Decode Objects as String
https://gist.github.com/1051042 based on http://goo.gl/8WdQu
Code for picking up random XML entries from XMLList : code
Source for Android/ iOS/ Blackberry Mobile App Universal-Currency.
Developed with Flex 4.5.1 SDK and AIR 2.7 SDK
The project does currency conversion, using HTTPService via SwizDAO Framework
Check the code base:
Did used Cairngorm after long time with Flex 4.5 SDK, it’s fun working with Cairngorm after more than 2 years.
Did a sample code base for RSS viewer.
Check the code:
I struggled a lot, but fixed it with easy tweak.
s:List Property -> layoutDirection=”rtl”
Note, in case you were using itemRenderer , make the reverse there to avoid arabic right to left effect by :
s:ItemRenderer Property -> layoutDirection=”ltr”
A Small Util Function to create random Password Generation https://gist.github.com/988479
Managed to create a Master – Slave architecture between a group of SWF Files.
This group will have a Master SWF which will command other slave swf’s to do certain processing.
This architecture might be helpful in distributing the processing to many files thus reducing the Memory being occupied in a Single SWF.
With IoC in proper form in future, will be successful editing the Slave SWF’s Dynamically.
Code for Master : https://gist.github.com/9bd094ac172d336004c6
Code for Slaves : https://gist.github.com/a840cea1258e019176d8
This Architecture avails running multiple threads with different SWF files at same time
launch firefox -> about:config
Modify the value of dom.ipc.plugins.timeoutSecs to -1
This helps hanging of firefox after default 45 seconds while debugging with break points in Flex
Did prepared Presentation of AS3 Design Patterns : http://goo.gl/gk4eP
First of All, we need JSP / ASP for getting the IP Address, Example code: Link
After getting the IP, using the below IP Web Service we can find the End- User’s Country.
Was unable to download the “DAO4J” best Open Source DAO generator of Java (Plugin for Squirrel Client).
At last found it from my Backups, will be useful tool for those looking for Pojo or DAO generation from any DB.
Get the Plugin from the link : dao4j.zip
The Project i have created converts the XML into required object in simple steps. Have a look on it : XSLT
XML to Object function can be found here :Gist
This will be useful for converting XML to ArrayCollection
Was searching for emulator_runtime.apk all over the web for download, at last found it on my sdk runtime path.
C:\… \sdks\4.5.0\runtimes\air\android\emulator
Try Yours
The AS3 Util Function is posted on the below link
Utility to convert number or integer to String. The util function is useful in many applications.
https://gist.github.com/703108
Flex4 Framework
spark.effects.AddAction
spark.effects.Animate
spark.effects.AnimateColor
spark.effects.AnimateFilter
spark.effects.AnimateTransitionShader
spark.effects.AnimateTransform
spark.effects.AnimateTransform3D
spark.effects.animation.Animation
mx.collections.ArrayList
spark.filters.BevelFilter
spark.primitives.BitmapImage
spark.layouts.supportclasses.Block
spark.filters.BlurFilter
spark.components.BorderContainer
spark.effects.easing.Bounce
spark.components.supportclasses.ButtonBarHorizontalLayout
spark.components.supportclasses.ButtonBase
spark.effects.CallAction
spark.components.CheckBox
spark.filters.ColorMatrixFilter
flash.geom.ColorTransform
spark.layouts.ColumnAlign
spark.components.ComboBox
spark.filters.ConvolutionFilter
spark.effects.CrossFade
spark.components.DataRenderer
spark.filters.DisplacementMapFilter
spark.layouts.supportclasses.DropLocation
spark.filters.DropShadowFilter
spark.components.mediaclasses.DynamicStreamingVideoSource
spark.components.mediaclasses.DynamicStreamingVideoItem
spark.effects.easing.Elastic
spark.primitives.Ellipse
spark.effects.Fade
spark.primitives.supportclasses.FilledElement
spark.filters.GlowFilter
spark.filters.GradientBevelFilter
spark.filters.GradientFilter
spark.filters.GradientGlowFilter
spark.primitives.Graphic
spark.primitives.supportclasses.GraphicElement
spark.components.supportclasses.GroupBase
spark.effects.interpolation.HSBInterpolator
spark.components.HScrollBar
spark.components.supportclasses.ItemRenderer
spark.effects.animation.Keyframe
spark.layouts.supportclasses.LayoutBase
spark.primitives.Line
spark.effects.easing.Linear
spark.components.supportclasses.ListBase
spark.core.MaskType
flash.geom.Matrix
flash.geom.Matrix3D
spark.effects.animation.MotionPath
spark.effects.Move
spark.effects.Move3D
spark.effects.interpolation.MultiValueInterpolator
spark.components.mediaclasses.MuteButton
spark.components.NavigatorContent
spark.effects.interpolation.NumberInterpolator
spark.primitives.Path
spark.components.PopUpAnchor
spark.components.PopUpPosition
spark.effects.easing.Power
spark.components.supportclasses.Range
spark.primitives.Rect
spark.primitives.RectangularDropShadow
mx.collections.AsyncListView
spark.effects.RemoveAction
spark.effects.Resize
spark.effects.interpolation.RGBInterpolator
spark.components.RichEditableText
spark.components.RichText
spark.effects.Rotate
spark.effects.Rotate3D
spark.layouts.RowAlign
spark.effects.Scale
spark.effects.Scale3D
spark.components.supportclasses.ScrollBarBase
spark.components.Scroller
spark.components.supportclasses.ScrollerLayout
spark.components.mediaclasses.ScrubBar
spark.effects.SetAction
spark.filters.ShaderFilter
spark.effects.animation.SimpleMotionPath
spark.effects.easing.Sine
spark.components.supportclasses.Skin
spark.components.supportclasses.SkinnableComponent
spark.components.SkinnableContainer
spark.components.supportclasses.SkinnableContainerBase
spark.components.SkinnableDataContainer
spark.components.supportclasses.SkinnableTextBase
spark.components.supportclasses.SliderBase
spark.skins.SparkSkin
spark.components.Spinner
spark.core.SpriteVisualElement
spark.primitives.supportclasses.StrokedElement
spark.components.TabBar
spark.components.supportclasses.TextBase
spark.components.TextSelectionHighlighting
spark.utils.TextUtil
spark.components.TileGroup
spark.layouts.TileLayout
spark.layouts.TileOrientation
spark.effects.animation.Timeline
spark.components.TitleWindow
spark.components.ToggleButton
spark.components.supportclasses.ToggleButtonBase
spark.components.supportclasses.TrackBase
mx.geom.Transform
mx.geom.TransformOffsets
spark.components.VideoDisplay
spark.components.VideoPlayer
spark.components.mediaclasses.VolumeBar
spark.effects.Wipe
mx.collections.XMLListCollection
Special Components
mx.states.AddItems
airframework
spark.components.windowclasses.TitleBar
FTE text for MX components
mx.controls.dataGridclasses.FTEDataGridItemRenderer
mx.controls.MXFTETextInput
mx.controls.advancedDataGridclasses.FTEAdvancedDataGridItemRenderer
Text Layout Framework (TLF)
flashx.textLayout.elements.LinkElement
flashx.textLayout.elements.BreakElement
flashx.textLayout.elements.DivElement
flashx.textLayout.elements.InlineGraphicElement
flashx.textLayout.elements.ParagraphElement
flashx.textLayout.elements.SpanElement
flashx.textLayout.elements.TabElement
flashx.textLayout.elements.TCYElement
flashx.textLayout.elements.TextFlow
flashx.textLayout.formats.TextLayoutFormat
mx.rpc.CallResponder
mx.messaging.channels.HTTPChannel
mx.rpc.remoting.mxml.Operation
mx.messaging.channels.SecureHTTPChannel
mx.messaging.channels.SecureStreamingHTTPChannel
mx.messaging.channels.SecureRTMPChannel
mx.messaging.channels.StreamingHTTPChannel
Flex 3 Graphics
mx.geom.CompoundTransform
mx.graphics.GradientEntry
mx.graphics.LinearGradient
mx.graphics.LinearGradientStroke
mx.graphics.RadialGradient
mx.graphics.RadialGradientStroke
mx.graphics.SolidColor
mx.graphics.SolidColorStroke
mx.graphics.Stroke
mx.geom.Transform
Flex 3 Miscellaneous
mx.logging.targets.MiniDebugTarget
mx.logging.targets.TraceTarget
MXItemRenderer
mx.controls.listclasses.MXItemRenderer
mx.controls.treeclasses.MXTreeItemRenderer
mx.controls.dataGridclasses.MXDataGridItemRenderer
mx.controls.advancedDataGridclasses.MXAdvancedDataGridItemRenderer
ACE exam was a good learning experience for me, I came to learn about these new things yesterday.
Passed ACE Certification with Flex4.
The differences of Flex3 and Flex 4 certifications
1/ more questions – 59 questions (previously 50)
2/ more time – 90 minutes (previously 60 min) Don’t bother about time factor you will have at least 30 minutes spare time for review.
3/ UI have more share among questions 35 %
4/ In Flex_Exam_Guide – They didn’t mentioned about LCDS, but we got Questions from LCDS too.
Tips:
1/ Do use attest, as it is the only resource we have for mockup
2/ Unlike Attest the questions will be in shuffled order
3/ While you attend ACE, don’t forget to use “Flag for review”, whenever you have doubt on your answer.
4/ The Questionnaire will be different for everyone
The below are some important topics, these areas required to be refreshed before attempting ACE.
LCDS
RemoteObject vs. Webservice vs. HTTPService
Flex3
[RemoteClass],[Bindable] Metadatas,E4X xml query, Labelfunction and Labelfield usage,Custom Event, Producer, consumer, validator,TabNavigator ,viewstack, setStyle, BlendMode, Modules vs. Sub Applications and formatter
OOPS
Interface, Encapsulation, Design patterns, access modifiers, Constructor and getter setters
AIR:
native platform in AIR Application,File management in AIR, Preloader, Drag and Drop in AIR, Security Sandbox in AIR, SQL Lite in AIR, create a Native AIR Application, Badge Installer in AIR
Spark :
working with state, ArrayList vs. Arraycollection, Animate, constraint layout in Spark Components, orientation of Child components,effects, create a custom component, Two-Way Binding, IVisualElement, ItemRenderer, LayoutBase, SkinnableComponent, TextInput, CSS namespace declaration, Descendant ID Type Class CSS types and Group
Met with requirement to inject object dynamically at runtime based on Push Message received.
Had a bit hard time finding solution, unusual with Swiz Framework.
Thought of sharing my experience here..
Step 1: In swiz Context assign the bean factory to your Bean Class
messenger.beanFactory = this.beanFactory;
Step 2:
In your bean class, Implement Interface IBeanFactoryAware
public class NativeMessenger implements IBeanFactoryAware
Step 3:
To Satisfy the implementation add the below code:
private var _beanFactory:IBeanFactory;
public function set beanFactory( beanFactory:IBeanFactory ):void{
_beanFactory = beanFactory;
}
Step 4:
Got access to Beanfactory
public var dynamicDAO:AbstractDAO;
protected function consumeHandler(event:MessageEvent =null) : void
{
var daoName:String = event.message.headers["dynamicdao"];
dynamicDAO = _beanFactory.getBeanByName(daoName).source as AbstractDAO;
}
Now the dynamicDAO is assigned with the bean dynamically based on the consumer Message.
When a sequence of service calls made to server using, Blaze DS.
I got the below error, where as i used to get the result handler and fault handler responses for the same request.
There was nothing wrong in server side,
[FaultEvent fault=[RPC Fault faultString="Error #2006: The supplied index is out of bounds." faultCode="InvokeFailed" faultDetail="null"] messageId=”" type=”fault” bubbles=false cancelable=true eventPhase=2]
At last, i got it by disabling the Network Monitor of Flash builder things were back in shape..
Tried out module loading in Flex 4 with Swiz, posted the code in Github link.
Hope, this is useful while using modules with Flex4.
Usage:
On change of moduleIndex the new module will be loaded on stage, the example is an alternative for viewStack elements loading.
“unable to detect webcam / video source”
The above is the message i got continuously after trying a lot, so fixed it with Flex by creating a AIR to show the Webcam Video.
Source:
<?xml version="1.0" encoding="utf-8"?> <s:WindowedApplication xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark" xmlns:mx="library://ns.adobe.com/flex/mx" maxHeight="150" maxWidth="200" showStatusBar="false" skinClass="assets.DTApplicationSkin" alwaysInFront="true"> <fx:Script> <![CDATA[ private function videoDisplay_creationComplete():void { var camera:Camera = Camera.getCamera(); if (camera) { videoDisplay.attachCamera(camera); } } ]]> </fx:Script> <mx:VideoDisplay id="videoDisplay" creationComplete="videoDisplay_creationComplete();" width="100%" height="100%" horizontalCenter="0" verticalCenter="0"/> </s:WindowedApplication>
The link have the AIR file required. Download

Usage : java -jar SWFCompress.jar c 'YourSWF.swf'


Usage : java -jar SWFCompress.jar d 'YourSWF.swf'
Now the re compressed SWF is ready to go. Have Fun Cracking, Hacking SWF’s
Built an AS3 Project to Work with GenericDAO using Swiz and AS3Signals
The project was inspired by Java Spring Framework:
IBM Generic Dao
The project uses the benefits of DI provided by Swiz 1.0.
The Deferred Instantiation of Swiz builds DAO Object only when [Inject] keyword is used.
Also, uses the latest Spark SkinnableComponent Framework for the View Part with Passive View.
The Source can be downloaded from SwizDAO Git
The below is the code from Swiz Context for a DAO Object:
<swiz:Prototype name=”taskDAO” constructorArguments=”{['task',taskProcessor]}” type=”{AbstractDAO}” singleton=”true”/>
Update Info : http://nsdevaraj.wordpress.com/2010/05/12/project-swiz-dao/
The Flex Frameworks Explained in “YouTube”
Parsley
http://bit.ly/ParsleyVideo
Mate
http://bit.ly/MateVideo10
http://bit.ly/MateVideo09
RobotLegs
http://bit.ly/RobotLegsVideo
Cairngorm with UM
http://bit.ly/CairngormUMVideo
The PDF Presentations and Links available from :
http://adamstudio.in/
http://groups.google.com/group/flexatbeach/web/resources-2009
“VerifyError: Error #1014: Class flash.text.engine::TextLine could not be found.” – The Error I got when trying to compile MXML with below configurations:
AIR Beta 2 Runtime, Flex 4 SDK, AIR Beta 2 SDK
Solution :
Open the project folder and edit the “.actionScriptProperties” file
Change the compiled flash swf target runtime from htmlPlayerVersion=”9.0.28″ to htmlPlayerVersion=”10.0.0″.
Also make sure your app.xml namespace to be “http://ns.adobe.com/air/application/2.0beta2″
Flex@Beach is being hosted again at Chennai on Feb 28th.
Check the below links:
Agenda ’10 Venue ’10http://www.esthell.com/@flexatbeach
The Group link to share files and discussions.
The Videos of Flex@Beach’09 link live on YouTube.
Viewers, the files were lost due to migration and abortion of sites geocities and pages.google.. the files were re uploaded in the below link : http://sites.google.com/site/nsdevaraj/
| M | T | W | T | F | S | S |
|---|---|---|---|---|---|---|
| « Mar | ||||||
| 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 | ||