Mx.controls.Alert;
Hi there,I am trying to use mx.controls.Alert and am getting the following error:"Failed to create a new alert, probably because there is no Alert in the Library"But i clearly have the component in my library!!I have it working in another file but when I copy the code into that it doesnt work either... any ideas ? Thanks in advance!I am just using an example from the help file to get it working.....Attach Codeimport mx.controls.Alert;// Define action after alert confirmation.var myClickHandler:Function = function (evt_obj:Object) { if (evt_obj.detail == Alert.OK) { trace("start stock app"); }};// Show alert dialog box.Alert.show("Launch Stock Application?", "Stock Price Alert", Alert.OK | Alert.CANCEL, this, myClickHandler, "stockIcon", Alert.OK);
Adobe > ActionScript 1 and 2
Posted on: 04/10/2007 11:58:04 PM
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Import Mx.controls.Alert; Not Working In Cs3
1172: Definition mx.controls:Alert could not be found.
Hey there is there any particular reason why I can not access the mx classes from flash cs3.
or more so where can I get them to install into my class path directory???
many thanks
brndn
Using [alert ("alert Message");] Aka Javascript In Flash
I want an alert to pop up in my movie, but I cant figure out how to use javascript inside actionscript.
I cant insert the code:
<script language="JavaScript">
alert('Alert Message")
</script>
Like i would in an html.
and I tried just putting
alert('Alert Message")
But that didnt work either.
Thanks for your time.
KillStickGuy
2 Player Game. Moving Cars Controls Help With Controls
hi i have the controls for car number 1 that would be the arrow keys if
(Key.isDown(Key.RIGHT)) {
this._rotation += manuverSpeed;
} else if (Key.isDown(Key.LEFT)) {
this._rotation -= manuverSpeed;
}
if (Key.isDown(Key.UP)) {
if (speed<speedMax) {
speed += accel;
}
} else if (Key.isDown(Key.DOWN)) {
if (speed>-speedMax) {
speed -= accel;
but how can i make controls for car 2 ... i wann use wasd but i cant figure out how the key.a doesnt work.
Drag Controls Override All Other Controls On Movie?
I have a movie that loads into the main timeline and can be dragged around using:
on (press) {
startDrag("");
}
on (release) {
stopDrag();
}
That works great except that to close that movie again I've added a little button to say on press, unload movie.
Problem is none of the buttons or links on that page will work while it is being dragged around. How can I make the links and buttons work but still make the movie draggable?
Player Controls For Swf Similar To The Flv Player Controls Component?
Is there a component that is similar to the flv component that will control playback of a swf? or can this component also be used for a swf? I tried to create a player that uses loadmovie to load a swf, which works, but when i tried to create play, pause, forward (next scene), rewind (previous scene) etc it doesnt work and the audio and playback of the animation doesnt follow the controls when i click on the buttons. t hanks
Msn Like Alert
well here is my question is it possible to hvae a msn alert type notification in flash say i have a standalone app running say a blog reader on my local machine when i update the blog i will recieve an alert of the new story is this possible at all need some help to achieve this i have the blog working but stumped at the alert part any help would be greatly appreciated thanks in advance
Alert Box Help... Please
When I press on the button the alert box component appears.. however it appears right directly above the button... i need to center it... however everything i have tried... does not work... please help...
I have attached the file in zip format so that everyone could see what i am talking about...
Thanks,
Carlos
Alert
How do you use flash to make an alert pop up in your broswer? By that I mean, it will pop up and say a message, and then you can click ok. In HTML format you would put:
Code:
alert ("Whatever");
And that would be javascript. An example of this can be found at http://www.lukeflash.com/affiliate/affiliate_info.html
Need An Alert Help..
hiii
i need a help im making a program soo i need a big help
soo all i need is to make a kind of allert
let say is a shop program ... soo im adding lets say a product and i have a 100 of it soo everytime that i sall.. lets say i write in xt place i saled 3 2day so whe ill click teh button than i want it to delete 3 amount of that product and save the amount in database..
if annyone can help me on these ill pay 50 dolar with pay pall..
Alert
I am making a custom alert. Like the Alert component I need all the other buttons (besides the buttons on the Alert) to have their rollOver, rollOut, press, etc.. functions to be disabled until the user is done with the alert. Then everything comes back to normal (try the alert component if you don't know what I mean). How can I do this?
Alert
How can I make an alert with Flash like an alert with javascript? Is it possible to use javascriptalerts in flash?
Alert Box
Anyone know how to use the alert box? I just want it to display a message and have a button to say 'ok'. When clicked on 'ok' the alert box then disappears
any ideas?
Alert
hi experts
how to create in alert message in flash
ok bye
Alert Box...
Nice day webmates, I have been creating a code, where I need to show an Alert, so I wrote:
import mx. controls.Alert;
Alert.show("Number must be made of 2 digits");
But whe I run it, there is an error that says "Failed to create a new alert, probably because there is no Alert in the Library"
What am I supposed to do ? thanks in advance !
Alert Help
Hey guys, and thanks for looking at my problem ;)
What i cant understand is this:
I have this code for popping up an alert box:
Alert.show(alertString,"text text", Alert.OK,this,null,iconSymbol,Alert.OK );
iconSymbol is declared like this:
[Embed(source="images/errorIcon.png")]
[Bindable]
public var iconSymbol:Class;
If i use my Alert line outside any function it works great, but when i try to put that same alert line inside a loadComplete function that comes up after a urlloader finish loading (Event.Complete) it refuses to run my alert with an error of:
TypeError: Error #1034: Type Coercion failed: cannot convert to flash.display.Sprite...
Any ideas why?
Thanks!
Alert
In my application when user doing any wrong interaction then alert box appear with proper error message with OK button only, and if he press <ENTER> key the message box does not close but programm run to next frame.
So how can i solve this. If he press <ENTER> then only message box should close.
Thanks in advance
AS For Alert : Help
I seem to be having problems with my Alert popping up even after I have a successful login. If I don't have a successful login, it will popup as expected and close when I click the "OK" button. The problem is that when I key in a successful login and move to frame1-2-3 (either) the Alert will still show. Any suggestions? Is there a statement I can use to keep the Alert hidden? Here's my code:
ActionScript Code:
btn_submit.onRelease = function() {
if (username add password eq "user1" add "pass*") {
gotoAndStop("frame1");
} else
if (username add password eq "user2" add "pass") {
gotoAndStop("frame2");
} else
if (username add password eq "user3" add "pass") {
gotoAndStop("frame3");
} else
Alert.okLabel = "OK";
// set the default button dimensions
Alert.buttonWidth = 80;
Alert.buttonHeight = 30;
// Display an alert
// where the message is "Oh no, you did..."
// and the title of the dialog is "Very Bad Error".
// Show a NO and CANCEL button and make the
// NO button the default button.
Alert.show
(
"Your username or password is incorrect. Please try again.",
"Login Error",
Alert.OK,
_root, alertHandler,
Alert.OK
);
// create the alert handler callback
alertHandler = function ( theEvent ){
// check which button the user pressed
if (theEvent.detail == Alert.OK){
trace ("No? What do you mean, "no?"");
}
}
};
Javascript Alert
Hi all, I have been trying to get a property value show up in a javascript alert() so I can see it. What I would like to do is the _x position or value of the _xscale so I can see why the objects are always a few pixels off target. Is there an easy way to have the value printed somewhere when I click the object ?
BUG ALERT Stttuuttter On Cd-rom
liquidlen@sympatico.ca
Hello,
I've created a large flash presentation on cd-rom and have experienced the stutter problem that has been mentioned on a few threads.(the client did some tests and the results were, well...TERRIBLE). The swf's are approx 10-20 megs each and load into the main navigation using the loadmovie,target...
My question is...have you been able or have any info at all on how to fix this problem? I'll be e-mailing everyone that I thinkcan help, and post and e-mail any info I get.Please help if you can!
thx,
Len
Flash Alert
how do i make flash to pop out Alert window? I am using a few buttons on the main stage of my movie. if the subscription (of any button) is limited for a user, I need a pop up to say "u have not subscribed to this part of the info. Please click OK to subscribe now" & the OK button (if any) shud shoot a mail back to me.
Please Help
Thanx in Advance
Bhaskee
Javascript:alert
I've got a javascript:alert action in my flash movie. The standalone .swf calls the function but when it's placed inside an HTML document it isn't. I pressume I have to add some <Script> thing in my <head> but am unsure what.
Any help would be appreciated.
Regards
Deborah
Chat Alert
just trying to see if anyone can help me with a litte problem.
I just created a chatroom on my website but trying to figure out a way to alert the user that a new message has arrived or new user signed in... kind of like IM. With mysite I have to keep on min/maximizing, checking to see it if anyone has responed or signed in. If anyone can offer a suggestion I would appreciate it...
Alert Box Properties
Hello,
I am importing the alert box component using Flash MX 2004 using the following script;
import mx.controls.Alert;
myClickHandler = function (evt) {
if (evt.detail == Alert.OK) {
}
};
Alert.show("Message.", "Title", Alert.OK | Alert.CANCEL, this, myClickHandler, "stockIcon", Alert.OK);
}
Currently the box appears with 'ok' and 'cancel' butttons. How do I change the code to appear with just the OK button?
Regards
Robert
Alert Box Component
I am having trouble setting the style for the title bar text for an alert box.
The following works fine for a window, but the how do I apply this type of style to an alert box's title style?
var windowTitleStyleObj = new mx.styles.CSSStyleDeclaration;
windowTitleStyleObj.styleName = "windowTitleStyle";
_global.styles.windowTitleStyle = windowTitleStyleObj;
windowTitleStyleObj.fontFamily = "HelveticaNeue BoldCond";
windowTitleStyleObj.fontSize = 12;
windowTitleStyleObj.color = 0xffffff;
windowTitleStyleObj.marginLeft = 8;
How To Use The Alert Component
hello, i'm trying to use the Alert component - without much luck. The Flash help makes it sound simple:
1. place the Alert component in your library.
2. put Alert.show("Hello World!") in the frame.
what am i not getting? Suggestions anyone?
(i'm using flashmx2004 professional)
Possible With Alert Component?
Hi
I made this thing where Im using alot of the MX 2004 components...but..
I cant seem to find out if the alert component only works as an alert or if it is possible to use it as a log in screen..
so when on "alert" the alert box has an input text field for typing in a password..
So if someone got some experience in using the alert this way any help is very appriciated...thanks
Alert Box Component
I'm having problems with my alert box, it pops up, and does all that I want it to, only it isn't at the right depth, is it possible to change the depth of an alert box?
Message Box Alert
I searched through some of the threads and didn't find anything about messages boxes. I am wondering if there is a way to have one pop-up, but without access to the HTML. This is designed to be an ad, but I cannot modify their HTML, so something like this won't work:
code:
fscommand("messagebox", "This is a message box called from within Flash.")
I know that that basically looks for a Javascript function to run and displays the message box via JS. Is there any way to do it directly from Flash?
I am using ActionScript 1 (Flash MX), so if anyone has a solution, please keep that in mind. I'm grateful for ANY help.
Alert Boxs
hey can someon help me on this.
I want to add an alert to my flash site. it will be a pop up window (it can be a MC), and it will popup on the loading of the movie. I dont know what AS to use. would i use something like:
Code:
onClipEvent(load){
attachMovie("MCname", "MCname", this.getNextHighestDepth(), {_x:200, _y:200});
}
help would greatly be appreciated!
thanks,
alex
Alert Component
Trying to use this alert box and it comes up well enough but not where i want it to ...
Is there a way to set the position on stage?
Code:
import mx.controls.Alert;
// Define action after alert confirmation.
var myClickHandler:Function = function (evt_obj:Object) {
if (evt_obj.detail == Alert.OK) {
trace("Design Form");
}
};
// Show alert dialog box.
Alert.show("Would you like a special Quote on a project?", "Thank you", Alert.OK | Alert.CANCEL, this, myClickHandler, "bigIcon", Alert.OK);
// how do you make this thing pop up in a specific area?
Alert.move(Alert.x + 10, Alert.y); // does not work:)
Alert Boxes
Anyone know how to use it? All I want is to have a button in this alert button, so when it is clicked, it will do something else. I also want some text to be in the alert box
any ideas?
[F8] [AS2] Customizing Alert
Hi,
how can I customize the alert-component? For example I want to change the way the buttons look like (not rounded) or the look of the title-area. How can I achieve this?
Thanks,
Tobler
Alert.addEventListener Help
Hi All,
I am using the Alert Component but having a bit of difficulty.
The help files say that I can add a click event to the Alert to capture when it have been clicked. To do this they add an eventListener to the Alert. When I do this, exactly as they have in the help files it returns an error "The property being referenced does not have the static attribute."
How do you listen for an Alert box to be clicked and take action when it is?
Thanks.
_t
Alert Problem
well the thing is that when i am calling alert.show() and it shows the alert i can still move aorund some stuff behind the pop-up....any ideas how to disable everything before user clicks "ok"?
Simple Alert
Okay, this seems like a stupid question so here we go...
I just want to pop up an alert.
Layer 1: a graphic
Layer 2: actionscript - alert("hello");
I run the movie, nothing happens. Is this the right way to call an alert? Or do I have to do something special?
Javascript Alert
I have a swf with the action script
getURL("javascript:alert('hi');" , "frame");
its supposed to open that alert 'hi' in the frame 'frame'. I did that but it doesn't work. does anyone now what i did wrong or is there any other way to do this?
Alert Dialog?
So I'm working on a project in Actionscript 3.0 using Flash CS3. I've come to a point where I'd really like to just quickly and easily give the user a confirmation box. In actionscript 2.0 I could do this using the Alert class in mx.controls. However it seems no similar control exists in actionscript 3.0, and any amount of googling just leads me to actionscript 2.0 references or flex references.
Problem With Alert Box
Hey guys, and thanks for looking at my problem
What i cant understand is this:
I have this code for popping up an alert box:
Alert.show("text text","text text", Alert.OK,this,null,iconSymbol,Alert.OK );
iconSymbol is declared like this:
[Embed(source="images/errorIcon.png")]
[Bindable]
public var iconSymbol:Class;
If i use my Alert line outside any function it works great, but when i try to put that same alert line inside a loadComplete function that comes up after a urlloader finish loading (Event.Complete) it refuses to run my alert with an error of:
TypeError: Error #1034: Type Coercion failed: cannot convert to flash.display.Sprite...
Any ideas why?
Thanks!
Pop Up Window Alert
hey guys,
would you know how to simply have an alert box pop-up upon a specified action, such has "sorry that is not the correct answer!" & then the user would click the OK button to close it.
i think in Director, it's as simple as writting "alert:..." but i have no idea on how to do it with flash.
thanks,
m.
Customizing Alert Box Look?
Can I customize the look of the box that comes up to Allow or Deny Flashh Comm. access to devices such as a microphone or webcam?
Alert Message
I am using a Flash .swf file as part of a web-based piece built in Toolbook. I publish the piece and then click on the index.html page. When the .swf plays locally, I receive this message:
The following local application on your computer or network:
C:(and path to file)
is trying to communicate with this Internet-enabled location:
C:(and path to file)
To let this application communicate with the Internet, click Settings. You must restart the application after changing your settings.
The there is an OK and Settings...buttons.
First off, when I click the Settings... button, nothing happens...but the real question is how to avoid this message from appearing at all. I ask this because I want to have a downloadable version in HTML form and do not want the user to see this message.
Is it possible to get rid of this message and if so, how?
DropShadow On Alert Box
Hi
Anyone know the correct method/syntax to use to apply a dropShadow filter to an Alert box created with ActionScrript?
I've tried applying it to Alert as follows:
import flash.filters.DropShadowFilter;
var dropShadow : DropShadowFilter = new DropShadowFilter(5, 90, 0x000000, 0.7, 10, 10, 3, 3);
_global.styles.Alert.filters = [dropShadow];
...but with no luck. Don't get the dropShadow when Alert.show() is called.
Thanks in advance.
P.S. the space around the colon in the variable definition is deliberate to stop an emoticon appearing in this message!
ActionScript 3 / Alert Box?
Hi --
I am trying to create a simple error message pop up for my user to see,
however, I can't figure out how to access the Alert class in ActionScript 3.
Has this been removed? Or placed into a new package?
Thanks
Rich
Unseen Alert Box
Hello helpers,
I need to know the possible reasons about the Alert box problem.
Actually, I just use a normal Alert code as follows:
---------------------------------------------------------------------------------
import mx.controls.Alert;
function callAlert(msg):Void {
Alert.buttonHeight = 22;
Alert.buttonWidth = 50;
var alertbox:Alert = Alert.show(msg,"Message");
alertbox.setSize(250, 100);
}
nextButton.onRelease = function() {
if(reviewBox.selectedIndex == 0) {
var msg98:String = "Please choose experiment";
callAlert(msg98);
}
else {
....
}
---------------------------------------------------------------------------------
The current problem is that it doen't seem to work. I can not see the alert box on the window.
Thank you for your help.
New Line In Alert Box
I have an alert when a new version of software is available for download. The alert receives the text from an XML file for different languages. The problem I run into is when it shows the alert it displays the
characters in the alert text. Does this have to be stored in the HTML Code format within the XML? i.e.: \ for If not how can I correct this? When I just enter the alert in plain text without loading it from an XML source it works great.
Here is some code:
Alert.show(Locale.loadString("IDS_NEW_VERSION")
IDS_NEW_VERSION = A new version is available.
Please upgrade by selecting
information
downloads
from 'Select Info'
Follow instructions on that page
Alert Component
Someone please tell me how to place the Alert(By using Alert Component in Flash MX Pro 2004) at our desired x and y position?
I'm currently getting it at top-left corner which looks odd.
Thanks in advance..
Alert Component Help
There's gotta be something I'm missing. It seems as if all I ever do is ask for help. Sorry about that.
Okay. I'm trying to use an alert component to thank a user for sumbitting their information in a form. I don't get any errors when I hit ctrl+enter, but when I actually press the Submit button in the preview window, I get a message that says
"Submit clicked
Failed to create a new alert, probably because there is no Alert in the Library
"
I have a perfectly good Alert component all stored in my library waiting to be used. Btw, the form works without the alert button. I just thought it'd be nice to give the user some confirmation that his/her information has been submitted.
[edit] Actually, the form doesn't work anymore, even without the component. I can't figure out what I'm doing wrong.
Thanks in advance!
Here's the code I'm using:
Code:
import mx.controls.Alert;
thanks = new Object();
thanks.click = function (evt)
{
trace(evt.target.label + " clicked");
Alert.show("Thank you for submitting your informaiton",Alert.OK, _root, alertHandler,Alert.OK);
}
namebox.tabIndex = 1;
emailbox.tabIndex = 2;
submit.onPress = function() {
var myLoadVars = new LoadVars();
myLoadVars.name = name.text;
myLoadVars.email = email.text;
myLoadVars.send("form.php");
submit.addEventListener("click",thanks );
alertHandler = function(theEvent)
{
if (theEvent.detail == Alert.NO)
{
// no button
trace ("Ok? What do you mean, "ok?"");
}
}
namebox.text=" "
emailbox.text=" "
}
Alert Message
is there a way in AS to create an alert similar to javascript? just something that I can use to see if a function is getting called.
|