Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jisaacks/flexalertqueue
A small package to allow you to render multiple `Alert` messages without newer ones overlapping previous ones.
https://github.com/jisaacks/flexalertqueue
Last synced: 22 days ago
JSON representation
A small package to allow you to render multiple `Alert` messages without newer ones overlapping previous ones.
- Host: GitHub
- URL: https://github.com/jisaacks/flexalertqueue
- Owner: jisaacks
- Created: 2012-11-22T16:07:51.000Z (almost 12 years ago)
- Default Branch: master
- Last Pushed: 2012-12-03T04:26:58.000Z (almost 12 years ago)
- Last Synced: 2024-04-14T16:11:50.001Z (7 months ago)
- Language: ActionScript
- Size: 109 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# FlexAlertQueue
This is a small package to allow you to render multiple `Alert` messages without newer ones overlapping previous ones.
## Installation
Just clone this repo into your Flex Project *src* directory:
- `cd path/2/flex/project/src`
- `git clone [email protected]:jisaacks/FlexAlertQueue.git`## Usage
import FlexAlertQueue.AlertQueue;
AlertQueue.push("It's that easy!");## Why use it?
Normally when you have multiple `Alert.show` calls in Flex, each succeeding call will overlap the last. If you alert **"A"** then alert **"B"** the user will see the ***B*** alert first, with a modal overlay that is twice as opaque as normal because the ***A*** alert is sitting underneath it.
AlertQueue puts them in a queue and does not call succeeding Alerts until the ones before it on the queue are closed. AlertQueue uses an `Alert.show` call internally and **AlertQueue.push** has the same method siqnature as **Alert.show** so you can use it just like you would a regular alert. This just makes them behave more similar to alerts in Javascript.
Obviously its never a good idea to be bombarding your users with alerts, but if different parts of your application can send alerts, this is a good way to ensure they are always displayed in the order they are called and prevents the ugly opaque background when multiple alerts are stacked.
[![endorse](http://api.coderwall.com/jisaacks/endorsecount.png)](http://coderwall.com/jisaacks)