[flexcoders] website help
Does anyone have a website especially a gallery like website that they can send me the code in? Looking to see how websites get BUILT. Thank you to anyone in avance. -e
[flexcoders] importing packages
here is my package inside of my src directory named preloaderOverride.as: /* Custom Preloader */ package preloaderOverride { import flash.events.Event; import flash.events.ProgressEvent; import flash.geom.Rectangle; import mx.preloaders.DownloadProgressBar; public class DPBSubclass extends DownloadProgressBar { public function DPBSubclass() { super(); // Minimum display time after download MINIMUM_DISPLAY_TIME = 3000; // Set the default text during initialization // Progress initializingLabel = Download Complete!\nInitializing...; } // Override label area to display custom text override protected function get labelRect():Rectangle { return new Rectangle(14, 5, 150, 30); } // Override download progress handler to display // Custom Text override protected function progressHandler(event:ProgressEvent):void { super.progressHandler(event); label = Math.round(event.bytesLoaded / 1000).toString() + k of + Math.round(event.bytesTotal / 1000).toString() + k; } // Override to ensure display of progress bar during init and download override protected function showDisplayForDownloading(elapsedTime:int, event:ProgressEvent):Boolean { return true; } } } /// using import preloaderOverride.*; produces an error that it cannot be found. what am i doing wrong?
Re: [flexcoders] HTTPService question
Yes, you will need a crossdomain.xml file though there are hacks for this (such as setting up a local httpservice with a backend (php? asp?) - e On May 28, 2008, at 8:49 PM, Abu Hamdan wrote: If i can get to a URL which shows XML data, does that mean that i wont need a crossdomain.xml file on the server hosting the xml file to get to it using a httpservice. i have spent some time trying to get to some xml data which i can see without problems in the browser but get a security error accessing URL rubeel -- Rubeel Muhammad Iqbal
[flexcoders] weird behavior with preloader
This preloader is creating overlapping vertical not horizontal bars, any ideas? /* Custom Progress Bar */ package com.preloader { // Imports import flash.display.Shape; import flash.display.Sprite; import flash.events.Event; import flash.events.ProgressEvent; import flash.events.TimerEvent; import flash.text.TextField; import flash.text.TextFormat import mx.events.FlexEvent; import flash.utils.Timer; import mx.preloaders.IPreloaderDisplay; import mx.preloaders.Preloader; public class CustomProgress extends Sprite implements IPreloaderDisplay { private var _bgAlpha:Number; private var _bgColor:uint; private var _bgImage:Object; private var _bgSize:String; private var _stageHeight:Number; private var _stageWidth:Number; private var _downloadBar:Shape; private var _initBar:Shape; private var _initField:TextField; private var _preloader:Preloader; public function CustomProgress() { _initField = new TextField(); _initField.defaultTextFormat = new TextFormat(Arial, 12, 0xFF, true); _downloadBar = new Shape(); addChild(_downloadBar); _initBar = new Shape(); addChild(_initBar); } // Initialize any properties upon display public function initialize():void { _downloadBar.x = (_stageWidth/2) - 20; _initBar.x = _downloadBar.x -2; _downloadBar.y = (_stageHeight/2) - 50; _initBar.y = _downloadBar.y; _initField.x = _initBar.x + 2; _initField.y = _initBar.y + 100 -15; } // Define event handlers of the Preloader instance public function set preloader(obj:Sprite):void { _preloader = obj as Preloader; _preloader.addEventListener(ProgressEvent.PROGRESS, downloadProgressHandler); _preloader.addEventListener(FlexEvent.INIT_PROGRESS, initProgressHandler); _preloader.addEventListener(FlexEvent.INIT_COMPLETE, initCompleteHandler); } // Getters and Setters public function get backgroundAlpha():Number { return _bgAlpha; } public function set backgroundAlpha(value:Number):void { _bgAlpha = value; } public function get backgroundColor():uint { return _bgColor; } public function set backgroundColor(value:uint):void { _bgColor = value; } public function get backgroundImage():Object { return _bgImage; } public function set backgroundImage(value:Object):void { _bgImage = value; } public function get backgroundSize():String { return _bgSize; } public function set backgroundSize(value:String):void { _bgSize = value; } public function get stageHeight():Number { return _stageHeight; } public function set stageHeight(value:Number):void { _stageHeight = value; } public function get stageWidth():Number { return _stageWidth; } public function set stageWidth(value:Number):void { _stageWidth = value; } // Handle swf file download progress private function downloadProgressHandler(evt:ProgressEvent):void { // Percent Loaded var perc:Number = ((evt.bytesLoaded/evt.bytesTotal) * 100); var top:Number = 100 - perc; // Progress Bar _downloadBar.graphics.clear(); _downloadBar.graphics.beginFill(0xFF, 1); _downloadBar.graphics.moveTo(0, 0); _downloadBar.graphics.lineTo(10, 0); _downloadBar.graphics.lineTo(10, perc * 0.9); _downloadBar.graphics.lineTo(0, perc * 0.9); _downloadBar.graphics.lineTo(0, 0); _downloadBar.graphics.endFill(); // Initializer Bar _initBar.graphics.clear(); _initBar.graphics.beginFill(0xFF, 1); _initBar.graphics.moveTo(0, 100); _initBar.graphics.lineTo(2, 100); _initBar.graphics.lineTo(2, top); _initBar.graphics.lineTo(0, top); _initBar.graphics.lineTo(0, 100); _initBar.graphics.endFill(); _initBar.graphics
[flexcoders] text input length
is there any way to expand the size of the text input field? width does not seem to work ... -e
[flexcoders] line height
How can i set line height and margin for a mx:Text htmlText - or even without the html text. I cant find docs on this anywhere. thanks in advance. -e
[flexcoders] Text Question
Ok, this will probably sound stupid but ... How can I write a paragraph of text inside of an accordion? My example accordion that I am using uses mxForm for each accordion element. How can I write a paragraph of wrapped text inside of the accordion? Thanks in advance. -e
[flexcoders] bitmap fonts
I tried to get bitmap fonts with external swfs working on my application but no go. would someone send me an swf with a bitmap font in it and some code/css that uses it? This would really help me out with my school project. -e
[flexcoders] combo box width
i have the following code in a series of form items. im trying to set the width of the comboboxes so that they match the input boxes. width=100 etc does not work, any ideas? mx:FormItem id=sProjectTypeItem label=Project Type: mx:ComboBox mx:ArrayCollection mx:StringFLEX Application/mx:String mx:StringFLEX Coder/mx:String mx:StringWebsite/mx:String mx:StringCMS/mx:String /mx:ArrayCollection /mx:ComboBox /mx:FormItem
[flexcoders] FLEX Book / Embedding Pixel Fonts
1. What is the easiest way to be able to embed pixel fonts in a flex app? 2. As far as GUI versus backend programming (HTTPService), what is the best FLEX book out there that covers lots of practical GUI/Skinning Data? Thanks everyone! -e
[flexcoders] website
can anyone send me a website which has no backend and uses easing, just so that i can get an idea of how to structure my mxml file. that would be very helpful, especially a site that is one single file. -e