ActiveDen

AS3 Alert Window Class

  • Has been a member for 4-5 years
  • Author had a File in an Envato Bundle
  • Exclusive Author
  • Sold between 50 000 and 100 000 dollars
  • Bought between 1 and 9 items
  • Referred between 200 and 499 users
designesia says

useful :)

3 years ago
  • Has been a member for 4-5 years
  • Repeatedly Helped protect Envato Marketplaces against copyright violations
  • Contributed a Tutorial to a Tuts+ Site
  • Interviewed on the Envato Notes blog
  • Exclusive Author
  • Sold between 10 000 and 50 000 dollars
  • Bought between 50 and 99 items
  • United States
  • Referred between 100 and 199 users
rondog says

Nice design and useful class

3 years ago
  • Has been a member for 3-4 years
  • Exclusive Author
  • Sold between 1 000 and 5 000 dollars
  • Bought between 10 and 49 items
  • Egypt
  • Referred between 1 and 9 users
dalemo says

very useful, good job

3 years ago
  • Has been a member for 3-4 years
  • Exclusive Author
  • Sold between 10 000 and 50 000 dollars
  • Bought between 1 and 9 items
  • Referred between 10 and 49 users
baklach says

yep useful!!!!!!!!!!!!!!!

3 years ago
  • Has been a member for 5-6 years
  • Beta Tester
  • Exclusive Author
  • Sold between 10 000 and 50 000 dollars
  • Bought between 10 and 49 items
  • Netherlands
  • Referred between 50 and 99 users
michelsteege says

how does it handle a stage resize? (it might come in use someday :) )

3 years ago
  • Has been a member for 3-4 years
  • Contributed a Tutorial to a Tuts+ Site
  • Exclusive Author
  • Sold between 10 000 and 50 000 dollars
  • Bought between 10 and 49 items
  • Australia
  • Referred between 10 and 49 users
tahadaf says
Author

@michelsteege: The algurithm to resize the boxes is like this: First the script checks and finds out 70% width of the stage and then puts the text into the box, if it’s lower than the initial 70% then it will use the text’s width and if its bigger, it will use the max possible width which is the 70% of the stage, got it? :) Of course you will also be able to change the pecentage to whatever else you want…

@others, Thanks for your nice feedbacks.

3 years ago
  • Has been a member for 5-6 years
  • Beta Tester
  • Exclusive Author
  • Sold between 10 000 and 50 000 dollars
  • Bought between 10 and 49 items
  • Netherlands
  • Referred between 50 and 99 users
michelsteege says

Ok thanks :) i put it in my bookmarks i think it will be a time saving class sometimes!

3 years ago
  • Has been a member for 3-4 years
  • Exclusive Author
  • Sold between 100 and 1 000 dollars
  • Netherlands
  • Referred between 1 and 9 users
spipnl says

Looks very nice! But I got an error on the second link; “url not found”

3 years ago
  • Has been a member for 3-4 years
  • Contributed a Tutorial to a Tuts+ Site
  • Exclusive Author
  • Sold between 10 000 and 50 000 dollars
  • Bought between 10 and 49 items
  • Australia
  • Referred between 10 and 49 users
tahadaf says
Author

That’s because of the problem with FD page! the image in that preview is missing, that’s why you see the error, I put a link to my server for the correct preview… The script is working like charm buddy :)

3 years ago
  • Has been a member for 2-3 years
  • Bought between 1 and 9 items
xdnitro says
Purchased

It appears that if your system doesn’t have Arial MT then the sample application won’t display any test and because of this a very small window.

Fixed by changing the font name in the Main.as

2 years ago
  • Has been a member for 2-3 years
  • Exclusive Author
  • Sold between 100 and 1 000 dollars
  • Bought between 10 and 49 items
  • Australia
helloworlder says
Purchased

Great script and the OO code is a god-send.

I made a popup window similar to this a while ago when trying to make a game but mine has fewer features :-)

Anyway, I discovered a couple of changes needs to be made to the source code. Apparently people compiling with Flash CS4 will not be able to see any text.

Solution:

1. In Main.as you must rename the font “Arial MT” to a font that exists on your system.

2. In the classes AlertButton and AlertWindow you need to find all instances of “theText.embedFonts = true” and change it to “theText.embedFonts = false”.

Just trying to help :-)

2 years ago
Author
tahadaf tahadaf replied

thanks for the input. yes, you’re absolutly right about cs4 thing… either approaches will work but to keep the embedining, users should try to set the correct font name.

2 years ago
  • Has been a member for 3-4 years
  • Bought between 1 and 9 items
dasqrd73 says
Purchased

A quick question…

I’m trying to execute a function when OK button is clicked…

which object should I add EventListener to??

2 years ago
Author
tahadaf tahadaf replied

of course to the alert instance itself,

// add listeners
myAlert.addEventListener(AlertEvents.CONFIRM, onConfirm);
myAlert.addEventListener(AlertEvents.REJECT, onReject);

this is shown in the sample file you have downloaded…

2 years ago
  • Has been a member for 2-3 years
  • Bought between 1 and 9 items
karckash says
Purchased

Good day

i´m try to work and implement, also i get next error

TypeError: Error #1009: Can not access a property or method of a null object reference. at com.myflashlab.classes.tools.infoBox.alert::AlertWindow/show() at Main()

in the sample file!. also i´m follow all steps in readme file and same thing, not work, ... many thanks for ur help

also i´m try debbug the swf and get next information

TypeError: Error #1009: Can not access a property or method of a null object reference. at com.myflashlab.classes.tools.infoBox.alert::AlertWindow/show()[\alert\sample\com\myflashlab\classes\tools\infoBox\alert\AlertWindow.as:99]

_width = stage.stageWidth;
_height = stage.stageHeight;
1 year ago
Author
tahadaf tahadaf replied

Hi, I’m not the author of this class, the author is my brother Hadi and he is a way for 2 month but I try my best to help you on this.

It seems that the class is not initialized yet or flash can’t find all of the classes, make sure flash has recognized the class path and the classes are ready and initialized then you’re using their methods and properties, thanks

Ali

1 year ago
  • Has been a member for 3-4 years
  • Bought between 1 and 9 items
  • United States
aleziz says
Purchased

Just purchased this component and can’t use it, I am using Flash CS5 .5 , I get this error:

TypeError: Error #1009: Cannot access a property or method of a null object reference. at com.myflashlab.classes.tools.infoBox.alert::AlertWindow/show() at test_fla::MainTimeline/showAlert()
6 months ago
Author
tahadaf tahadaf replied

make sure you have installed the project class files correctly.

Thanks for your interest in our files. Hadi

6 months ago
  • Has been a member for 3-4 years
  • Bought between 1 and 9 items
  • Czech Republic
xomax says
Purchased

I experience the problem with undefined show method.

Flash compiler has no problems with accessing properties such as id, message etc.

My code non working code: var myAlert = new AlertWindow(); this.addChild(myAlert); myAlert.id = "btn"; myAlert.message = "Something"; myAlert.confirmBtn = "OK"; myAlert.rejectBtn = ""; myAlert.show(); //Flash triggers error on this line..

Is there any solution? Thank you.

6 months ago
  • Has been a member for 3-4 years
  • Bought between 1 and 9 items
  • Czech Republic
xomax says
Purchased

Reply to my previous entry..

I found the solution: It is always needed to define alertStyle object, I assumed that there is any default preset..

6 months ago

by
by
by
by
by