[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

simple message or popup on event

Posted on 2004-11-29
10
Medium Priority
?
231 Views
Last Modified: 2010-04-03
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
0
Comment
Question by:sanctify
  • 5
  • 4
9 Comments
 
LVL 27

Expert Comment

by:negatyve
ID: 12694425
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
 
LVL 1

Author Comment

by:sanctify
ID: 12694674
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
 
LVL 27

Expert Comment

by:negatyve
ID: 12694739
What flash version are you using?
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
LVL 1

Author Comment

by:sanctify
ID: 12695214
MX 2004 v.7.2
0
 
LVL 1

Author Comment

by:sanctify
ID: 12734919
anyone ??

please ???
0
 
LVL 27

Expert Comment

by:negatyve
ID: 12734975
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
 
LVL 1

Author Comment

by:sanctify
ID: 12798668
how do i do that ?

i am totally new to flash development
0
 
LVL 27

Accepted Solution

by:
negatyve earned 500 total points
ID: 12805339
- click on a frame, not on an object
- open the action panel
- paste your code
0
 
LVL 1

Author Comment

by:sanctify
ID: 14264286
SORRY I WAS AWAY AND FORGOT ABOUT THIS .. THANKS FOR THE HELP ... POINTS GO TO NEGATYVE
0

Featured Post

Vote for the Most Valuable Expert

It’s time to recognize experts that go above and beyond with helpful solutions and engagement on site. Choose from the top experts in the Hall of Fame or on the right rail of your favorite topic page. Look for the blue “Nominate” button on their profile to vote.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article describes a solution to a problem of subloading one movie into another when they have different SWF versions. Sometime back, I was working on an ActionScript project while I came across an interesting fact which I would like to share…
I have been doing hardcore actionscripting for some time; and needless to say I have faced a lot of problems in just understanding others' code rather than understanding what the code executes. A programmer's life can become hell when there are a lo…
The goal of the tutorial is to teach the user how to live broadcast using Flash Media Live Encoder and connecting it to YouTube to broadcast. Log into your Youtube account, choose live stream settings, start live stream from Flash Media Live Enc…
The goal of the tutorial is to teach the user what frame rate is, how to control it and what effect it has on the video.
Suggested Courses

834 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question