simple message or popup on event

i am adding a some security to my flash movies

i have the actionscript almost comleted but need a popup on event message

the event handlers are completed, however, i need a method of posting the message i want to create

basically a small script that will show the user a simple message i can insery in the handler routine, and it doesnt have to be showy or flashy, just a nuts and bolts text message that wil lshow in the movie

thanks
LVL 1
sanctifyAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

negatyveCommented:
If you are using flash mx 2004

- drag on the stage of your movie, from the component panel, an "Alert" component instance, then delete it
- when needed, to show the alert:

import mx.controls.Alert;
Alert.show("Your message", "Alert title", Alert.OK);
0
sanctifyAuthor Commented:
thanks for the quick responce ...

i tried that and got an error ...

**Error** Scene=Scene 1, layer=Layer 1, frame=1:Line 1: Syntax error.
     import mx.controls.Alert;

**Error** Scene=Scene 1, layer=Layer 1, frame=1:Line 2: Statement must appear within on/onClipEvent handler
     Alert.show("Your message", "Alert title", Alert.OK);

Total ActionScript Errors: 2        Reported Errors: 2


I am trying to impliment it within the following code and use this to protect pur flash movies from being run off any domain other than the one i have it hosted on ... here is the code i currently have and just want to add a popup-on-event to it ...


/*********************************************************************
THIS CODE HAS BEEN USED ON WWW.ANDYFOULDS.CO.UK FOR YEARS WITHOUT
PROBLEM BUT THE CODE IS GIVEN 'AS IS' AND IS USED AT YOUR OWN RISK.
FEEL TO FREE TO USE IT AS YOU LIKE. IF YOU IMPROVE IT SHARE THE JOY
AND LET ME KNOW.

ANDYFOULDS.
*********************************************************************
THIS CODE DETECTS WHERE THE FILE IS COMING FROM AND IF ITS NOT FROM
THE URL IN 'targetUrl' STOPS THE MOVIE AND REDIRECTS THE WEBPAGE TO
'targetUrl'.
CHANGE THE 'targetUrl' TO YOUR OWN URL. USE AS AN INCLUDE IF YOU PREFER.
*********************************************************************/
targetUrl = "http://MyDomain.net";
if (_url.slice(0, targetUrl.length) != targetUrl) {
      //REDIRECT IF STOLEN.
      getURL(targetUrl, "_parent");
      //STOP THE FILE IF ITS STOLEN.
      stop();
}


i am pretty new to flash productions myself, but we have many contributors and have a large problem with people stealing out content and bandwidth, which is the reason for this post

then we will offer this for open source download for our contributors/developers to add to their projects, and if not present we wil lrequire the source code to add it ourselves, else we wont be able to host their projects

could you please help with this and how to impliment/integrate the above in flash projects

hope this makes it a little more clear as to our needs and intent

thank you so very much for your time
0
negatyveCommented:
What flash version are you using?
0
The Ultimate Tool Kit for Technolgy Solution Provi

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy for valuable how-to assets including sample agreements, checklists, flowcharts, and more!

sanctifyAuthor Commented:
MX 2004 v.7.2
0
sanctifyAuthor Commented:
anyone ??

please ???
0
negatyveCommented:
Sorry for not answering the previous time..
That error means that you have attached your script to a movieclip, and not to a frame as it should be..
0
sanctifyAuthor Commented:
how do i do that ?

i am totally new to flash development
0
negatyveCommented:
- click on a frame, not on an object
- open the action panel
- paste your code
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
sanctifyAuthor Commented:
SORRY I WAS AWAY AND FORGOT ABOUT THIS .. THANKS FOR THE HELP ... POINTS GO TO NEGATYVE
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Adobe Flash

From novice to tech pro — start learning today.