Digital Workshop

Welcome to the Digital Workshop Message Boards
It is currently December 22nd, 2024, 5:15 pm

All times are UTC [ DST ]




Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: Adding ActionScript to an Opus Flex pub
PostPosted: March 27th, 2011, 4:32 pm 
Offline
Godlike
Godlike

Joined: November 11th, 2004, 1:18 pm
Posts: 1213
Location: New York
Opus: Opus Pro 9.75
OS: Windows 10 Pro 64 bit
System: Core i7, 16G RAM, Nvidia 640GT (desktop), plus Windows 10 and Android tablets
Hi,

A small piece of ActionScript added to the beginning of a SWF file, can check the referring URL, and if it isn't the URL hard-coded into the SWF, it can go to a "no access" page (or another URL-see another URL example script below), else if correct, it can play the SWF movie. Add obfuscation via a third party ActionScript obfuscation program, and there is a minimum yet useful ability to secure the SWF (of course, expert users can probably get around this).

But how to add this snippet of ActionScript to an Opus Flex pub and publish without script 'parsing' errors? When I've tried to include this script, the pub will not successfully publish: parsing errors.

And, if it can be added, what would be the "else" script?

Here's a sample of this ActionScript script snippet:

Code:
if (this.loaderInfo.url.indexOf("yourwebsite.com") == -1) {
            navigateToURL(new URLRequest ("http://yourwebsite.com/redirectpage.html"), "_self");
        } else
//????????: the rest of the start of the pub


Quite a challenge! (Maybe can't be done currently and needs to be added to the wish list.)

Any help would be appreciated.

Kind Regards,

_________________
Stephen


Top
 Profile  
 
 Post subject: Re: Adding ActionScript to an Opus Flex pub
PostPosted: March 27th, 2011, 6:25 pm 
Offline
Godlike
Godlike
User avatar

Joined: March 21st, 2007, 10:44 am
Posts: 3188
Location: UK
Opus: Evolution
I'm pretty sure you're wasting your time.

loaderInfo is an AS3 command and I believe that Opus uses AS2. Beside which, what exactly would the this keyword be referring? Called from an OpusScript it refers to the page, but I'd image that it would need to be referring to the Movie :-?

It's Sunday, I've lost an hour (damn British Summer Time), but I vaguely recall that this has been posted before. I'm even sure that a working solution was devised that used PHP sessions to lock the publication to a given website.

Better off starting there or buying a copy of ActionScript for MX

Mack

_________________
When you have explored all avenues of possibilities, what ever remains, how ever improbable, must be the answer.

Interactive Solutions for Business & Education
Learn Anywhere. Learn Anytime.

www.interaktiv.co.uk
+44 (0) 1395 548057


Top
 Profile Visit website  
 
 Post subject: Re: Adding ActionScript to an Opus Flex pub
PostPosted: March 27th, 2011, 7:12 pm 
Offline
Godlike
Godlike

Joined: November 11th, 2004, 1:18 pm
Posts: 1213
Location: New York
Opus: Opus Pro 9.75
OS: Windows 10 Pro 64 bit
System: Core i7, 16G RAM, Nvidia 640GT (desktop), plus Windows 10 and Android tablets
Hi Mack,

Thanks for your reply. I haven't yet found a way to accomplish this in Opus Flex. Thanks for reminding me about AS2 in Opus Flex. When I've tested successfully in SWF's authored in Flash, I have been using AS3.

I'll search further for the forum post that may use PHP. Another option is to use the HTML container and script it for checking the referrer URL. Again, not overly secure, but hopefully a "deterrent."

Kind Regards,

_________________
Stephen


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: No registered users and 16 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group