Posts Tagged ‘ flash ’

Convert int to String

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

New Flex 4, Spark Classes to be known

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

Access Client Machine from AIR on Ease

This is a dream come true.
To run an EXE from AIR, do the following steps:
Step 1:
Install the exe from this Link
Step 2:
Import Flex Project samples, from install dir ex: C:\Program Files\FluorineFx Aperture\Samples
Step 3:
Copy *.dll files (apimaging.dll,apoutlook.dll,apSystem.dll,fluorinepp.dll and msi.dll) to your Flex src directory
Step 4:
Copy your ‘-app.xml’ to ‘C:\Program Files\FluorineFx Aperture\Debug’ location of install dir for debugging or just pack the AIR

Elearning using Flex

I am glad to announce the first Step for basic requirements of E-Learning using Flex has been achieved.
Basic Requirements met:

  • All Flash player versions starting from Flash Player version 6 to 10, should be loaded. (For support of old elearning courses).
  • Without any memory leak due to loading multiple swf files.
  • Ability to navigate to any particular lesson (SWF).
  • XML Support for loading swf files into a lesson.
  • PreLoader for showing the loading status of individual SWF files
  • Ability to detect events of SWF files (eg: totalframes, swf playing etc.,) 

See the demo of loading a number of animations. The source files include floader.mxmlForcibleLoader.as and XML

Power of FP10

Get your own mp3 from local system played from web. more

AVM1Movie Controller in Flex

Overcome restrictions on an AVM1 SWF file loaded by an AVM2 SWF file:

While trying to control AVM1Movie (Flash Player 8, 9, 10 or older) from flex, we will get the below error message: “Property stop not found on flash.display.AVM1Movie and there is no default value. ”

To overcome this problem, ForcibleLoader class converts them into latest player versions on runtime. The below is an working example for how to control AVM1Movie from Flex.

<?xml version=”1.0″ encoding=”utf-8″?>
<mx:Application xmlns:mx=”http://www.adobe.com/2006/mxml&#8221; layout=”absolute” initialize=”init()”>
<mx:Script>
<![CDATA[
private var swfURL:String = “AVM1Movie.swf”;
private var libMC:MovieClip = new MovieClip();
private function init():void{
var loader:Loader = new Loader();
loader.contentLoaderInfo.addEventListener(Event.COMPLETE, swfComplete);
var fLoader:ForcibleLoader = new ForcibleLoader(loader);
fLoader.load(new URLRequest(swfURL));
swfContainer.addChild(loader);
}
private function swfComplete(event:Event):void{
libMC = event.currentTarget.content as MovieClip;
libMC.gotoAndStop(1);
}
]]>
</mx:Script>
<mx:UIComponent id=”swfContainer”/>
<mx:NumericStepper id=”slide” change=”{libMC.gotoAndStop(slide.value)}”/>
</mx:Application>

Loading flash library asset in Flex

The below is the code to load flash library asset (using linkage name) on Flex.

<?xml version=”1.0″ encoding=”utf-8″?>
<mx:Application xmlns:mx=”http://www.adobe.com/2006/mxml&#8221; creationComplete=”onCreationComplete()” >
<mx:Script>
<![CDATA[
import mx.core.UIComponent;
private function onCreationComplete():void{
var swfLoader:Loader = new Loader();
swfLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, onSWFLoadComplete);
swfLoader.load(new URLRequest(“flash.swf”));
}
private function onSWFLoadComplete(event:Event):void{
var tempClass:Class = event.target.applicationDomain.getDefinition(“libraryAsset”) as Class;
var movieClip:MovieClip = new tempClass() as MovieClip;
var uiComp:UIComponent = new UIComponent();
uiComp.addChild(movieClip);
addChild(uiComp);
}
]]>
</mx:Script>
</mx:Application>