Add URL-check IN the file

Hello

Moved general forum Flash

I am a newbie with Flash Pro CS5 and have skills from beginner in AS3.

I'm working on a lesson in e-Learning and already, with many previous help from other people and have a file of Action Script to use for an animation of white noise in a learning lesson.

I need to make a few additions but am very familiar with the addition of script in a Script of Action file "package". Specifically, I would like to add a URL by checking in the file Script of action so that students do not consider that the animation Flash animation outside the lesson that contains educational resources and instructions for the use of animation.

I would add the following script, but so far, I get error messages:

If ((this.loaderInfo.url) .indexOf ("mywebsite.) ("com") == - 1).
navigateToURL (new URLRequest ("http://mywebsite.com/default.html" "));
on the other
run the animation

The current AS3 in the .as file is:

package
{
Import 12345678910111213import;
import flash.display.BitmapData;
import flash.display.Sprite;
import flash.events.Event;
import flash.events.MouseEvent;
import flash.events.TimerEvent;
to import flash.geom.Matrix;
to import flash.geom.Point;
import flash.utils.getTimer;
import flash.utils.Timer;

SerializableAttribute public class Main extends Sprite
{
private var viewbmd:BitmapData;
private var workbmd:BitmapData;
private var scaleUp:Matrix;
private var px:Vector. < uint >;
private var: timer;
private var itsNoisy:Boolean;

public void Main (): void
{
If init() (stage);
of another addEventListener (Event.ADDED_TO_STAGE, init);
}

private void init(e:Event_=_null):void
{
removeEventListener (Event.ADDED_TO_STAGE, init);
viewbmd = new BitmapData (stage.stageWidth, stage.stageHeight, false);
var view: Bitmap = new Bitmap (viewbmd);
addChild (view);
workbmd = new BitmapData (viewbmd.width/8, viewbmd.height/8, false);
scaleUp new matrix());
scaleUp.scale (8, 8);

itsNoisy = true;

stage.addEventListener (MouseEvent.CLICK, manageNoise);

initNoise();
Timer = new Timer (50);
timer.addEventListener (TimerEvent.TIMER, __ontick__);
Timer.Start ();
}

private function initNoise (): void {}
var array: Array = [];
for (var i: uint = 0; i < 255; i ++) {}
table [i] = 0xffffff * ((i % 2);
}
workbmd. Noise (getTimer (), 0, 255, 7, true);
workbmd.paletteMap (workbmd, workbmd.rect, new Point (0, 0), array, array, array);
PX = workbmd.getVector (workbmd.rect);
}

private void onTick(e:Event):void {}
flipSomePixels (160);
viewbmd. Draw (workbmd, scaleUp);
}

private void flipSomePixels(howMany:int):void {}
for (var i: int = 0; i < howMany; i ++) {}
var pxidx:int = Math.floor (Math.random () * px.length);
PX [pxidx] = ~ px [pxidx]; at the level of the ILO NOT to invert all the bits
}
workbmd.setVector (workbmd.rect, px);
}

private void manageNoise(e:MouseEvent):void {}
itsNoisy? timer.removeEventListener (TimerEvent.TIMER, __ontick__): timer.addEventListener (TimerEvent.TIMER, __ontick__);
itsNoisy =! itsNoisy;
}

}

}

If someone can take a look and please let me know how to do to add extra script to check the URL (be specific since I am a beginner in the script):

I have tried everything I can think and am stuck.

Thanks in advance for your help.

Kind regards

saratogacoach

Again, loaderInfo.url is that swf is hosted and there is no change for her. Thus, in the context of what you're trying to accomplish, it is foolish to check for this will always be the same unless you start hosting swf elsewhere.

Chek out my suggestion with ExternalInterface.

Tags: Adobe Animate

Similar Questions

  • I have about 14 000 songs in my library, about 4 copies of each of them. Try to remove duplicates, but can only do one at a time. I spent many hours, check all the files I want to delete only to find out that I can't delete them both?

    I have about 14 000 songs in my iTunes library, but really there are only about a quarter as much because there are so many duplicates. I don't know how they got there in the first place, and try to remove them is infuriating! I have already spent several hours going by checking all the files I want to remove (thinking that I would delete then all files at once) - only to find out that I still have to delete them one at a time. There must be a better way! Help, please.

    If you don't know that you want to delete all checked the songs in your library:

    • Create a new smart playlist with the following rules:

      This will show then checked all the songs in your library.
    • Select all the items in this playlist (Ctrl-A)
    • Hold the SHIFT key and press DELETE - follow the prompts to remove songs from your library and (if necessary) your PC media files

    In case of problem, you must back up your library before you do just in case the results are not what you expect - see tips to the user of turingtest2 on your iTunes for Windows with SyncToy to backup library for a suitable and recommended method.

    There is no 'simple' way to reliably remove duplicates from a library, but see the intelligence in this threadon the use of a scripted for removal of duplicates (for example).

    Long-term, try and avoid adding anything in your iTunes library that already exists in it - that's how arise the duplicates (unlike an opinion apparently dispersed, iTunes not of is duplicate anything in normal operation).  I've seen several comments suggesting here a few users to correctly copy their library from an old computer to a new one and then add the content of its media files - guaranteed way to finish with a copy of database entries or media files.

  • How can I manually add an entry to the file passwords and username registered

    If possible, I would like to manually add an entry in the file of saved passwords. I suspect that's not possible, but I thought I'd ask just in case.

    Use this extension:
    https://addons.Mozilla.org/en-us/Firefox/addon/saved-password-Editor/

  • Add, change and delete the file "iTunes" on a NAS

    I have just said "Apple Support Community" by Apple Support.

    The title probably sums up what I'm trying to do. I'm looking for a way to add, change, and delete files on a NAS.

    Hardware: MacBook Pro 15, 1 TB of storage, 16 GB memory, OSX El Capitan.

    NAS: Qnap TS - 453 has: storage nominally 16 TB, up to about 5 TB.  4 WD 4TB disks in a RAID 5 configuration.

    a Vaio WIN10 as well as a smaller MacBook (my wife)

    The purpose of the NAS is to provide a backup system for computers and act a server "iTunes."

    I acquired the NAS after the death of my WD MyBook live in December 2015 after five years of reading backup and "iTunes" to my computer and the Sonos system.

    After two months of 'getting to know you' with the NAS, I finally managed to configure the server "iTunes" and Mirabile Indo-European it works!  I'm just doing the SIN to a back-up for computers.

    Now for the question: I am looking for an app (for lack of a better term) that will allow me to add and remove files to and from the NAS "iTunes" folder

    My search for a solution so far has indicated that:

    (1) NAS' iTunes folder is not really true Apple iTunes and

    (2) I need something that is DAAP (Digital Audio Access Protocol) friendly, that would allow me to add, change and delete the files.that would allow me to add, edit and delete files.

    I'm not looking for something that would synchronize the files iTunes NAS to one of my computers, I am all prepared to do myself if necessary.

    If I can't find an application so I use the app 'Brute Force' change my Mac iTunes required records and download again to my NAS.

    Why do you need an app to put the files in a folder on the NAS Server?  Make them just above in the Finder.  Maybe I'm missing just your problematic here.  Do you mean add your PEMA files to iTunes? I've never used this file format, but kind of, I would be very surprised if iTunes supported it.

    the NAS iTunes folder is not really true Apple iTunes

    I don't understand what you're trying to say here.  "Apple iTunes" is an application. Yes, a folder is not an application.

    Be warned, we see not few messages from people that use iTunes with a NAS. Often the problems cannot be explained. sometimes just iTunes and NAS disagree togther.

  • Under Xp, under the paper painted office, where are the pictures actually stored... I want to add a picture to the file in order to make my wallpaper... It seems that some are stored on the c: Windows and some in C:Window/Web/Wallpaper...which is right

    Under Xp, under the paper painted office, where are the pictures actually stored... I want to add a picture to the file in order to make my wallpaper... It seems that some are stored on the c: Windows and some in C:Window/Web/Wallpaper...which is right

    Under Xp, under the paper painted office, where are the pictures actually stored... I want to add a picture to the file in order to make my wallpaper... It seems that some are stored on the c: Windows and some in C:Window/Web/Wallpaper...which is right

    ===================================
    Simply open the photo that you want to use as wallpaper and
    choose... Set as wallpaper... from the menu.

    If you want to physically add the photo in the folder then
    It can be seen in the background list... Add to the
    following folder: C:Window/Web/wallpaper

    FWIW... If there are fewer than 100 pictures in your my
    Folder of photos... you can see in the background list. John Inzer - MS - MVP - Digital Media Experience - Notice_This is not tech support_I'm volunteer - Solutions that work for me may not work for you - * proceed at your own risk *.

  • How to add URL links in the XML file?

    Hello

    I have a problem with adding the URL links to the power of lightning. I use the XML file to call images, then the corrsponding links. Images are called correctly but when I try to add a link I do not receive the links, but rather to get the anchor HTML text tags. I use escape XML characters to escape HTML tags, but the results are not what I need.

    I use the following code:

    < preview = "miniature large.jpg" thumb = "thumb.jpg" > "
    < title > <! [CDATA [Financial Services]] > < / title >
    < discription > <! [CDATA [& lt; a href = & quot; ]] http://www.google.ca "> Google < / a > " [[ ]] > < / discription >
    < / thumbnails >

    ---------------------------

    Output:

    Images are displayed correctly, but instead get the links, I get following message:

    " < a href =" http://www.Google.ca "> < /a > Google .

    I need to know what I'm doing wrong. I use the proper way to add links or not?

    Thanks for your time.

    Use tags html directly inside CDATA - after all, what CDATA is for.

  • Check if the file exists returns the value false. File is located in system32

    I'm having a problem to detect if there is a file that has been simply copied to the system32 directory.  I tried to move the file to various other directories and simply using a vi with action "check if a file or folder exists.  I narrowed down it to not be able to find the file if I copy into c:\windows or c:\windows\system32.

    I thought it could be a permissions problem, but not my best to assign the user full name control folders.

    Another interesting thing is that if I do file an input control and click on the "folder" icon to open a list of files, I see either the files newly copied to the system32 directory.  Very strange.

    It is on a PC, Dell, Windows 7 Professional/Labview 2010 SP1 (note that I use the vi. as an executable on this machine).  Would it be a setting in the generation of my project?

    If you are using Windows 7 64 bit, it may be related to problems that the user has been seen here:

    http://forums.NI.com/T5/LabVIEW/problem-using-quot-MSG-quot-command-with-quot-system-exec-VI/m-p/153...

    It may be that LabVIEW functions are 32-bit and are diverted.

  • Find the URL from which the files were downloaded

    I'm trying to locate the url where some of my files have been downloaded. Is there a way to know? I use google chrome but had allowed the download history, then the url can not find more. Can someone tell me where to find them?

    Hi Gnod5,

    There is no option to find the URL by using the downloaded file. As you use Google chrome, please ask your question on the support of Google Chrome Forums, they might help you if there an option to find the URL.

    http://www.Google.com/chrome/

    Hope the helps of information. Let us know if you need help with Windows related issues. We will be happy to help you.

  • How to run a job that will check if the files exist?

    I have a file in real time ' ' which has about 15 files (test1.txt, other.txt etc.) txt, theres is other jobs that nothing related to coldfusion that if something fails then the file no longer exists.

    So I want to create a job if there is no such thing as a txt file so he sent me an email.

    What would be the best way to do something like that?

    I have to check for every individual txt, something like file?

    <cfset Pathtest = "\\folder1\dept\Alerts\other.txt">
    
    <cfif !fileExists(Pathtest)>
      <cfmail ...>
      sent me a email
      </cfmail>
        
    </cfif>
    

    If all the files are in the same directory, you can create a list separated by commas (or even a table) file names, and that loop.

    
    
    
        
            ... email me ...
        
    
    

    HTH,

    ^_^

  • Add url link in the 'lightbox' js style gallery

    Hello

    Can someone help me add a url link in the image description? I am using a gallery of "collecting" (prettyphoto) and viewers to be able to visit a site instead of going to the next image when you click on the images that are Web sites.

    Code CSS that I use:

    "< li > < a href="images/work/work-full1.jpg "rel =" prettyPhoto [1] "title =" Trade Show panels - 2011 "" > < img src="images/work/work-thumb1.jpg" > < /a > < /li > ".

    "< li > < a href="images/work/work-full2.jpg "rel =" prettyPhoto [1] "title ="Local Resource site - Lake Wylie, SC"> < img src="images/work/work-thumb2.jpg "> < /a > < /li >"

    and so on...

    See the gallery in action here:

    Click on the work tab.

    http://doubleulabs.com/

    Thanks for any help on this.

    No problem! Well okay, let's try this for the link in the caption box:

    In order to connect the text in the caption box, you need to convert the upper and double quotes or less than signs in your link to their HTML entities (it is because you are currently using the href link would get confused by the regular'<"s being="" used,="" so="" in="" order="" to="" keep="" them="" separated="" for="" the="" code="" to="" be="" read="" correctly,="" we="" convert="" them="" to="" their="">

    For example, if your first link will look like:

  • <a href="yourLink.html">Trade Show Panels - 2011</a>">/>

  • Where > = > and < =

    Où " " = "

    Let me know if that helps!

  • Can I add date to name the file using burst

    Hi all

    I know that we can add the date to the file using %y and %m %d for

    E-mail
    AT·
    WEBDAV

    But is it possible to add the date to the file name if I'm bursting my file to a shared location.

    I tried this %y and %m %d but it does not work for explosion.

    Please answer

    Thank you
    Ronny

    Raise an SR to support this for the file option
    and
    To work around this problem, change your query bursting enrollment, to_char (sysdate, 'DDMMYYY') for the day, month and year, inorder to add to the file name component.

  • After the download items, I am unable to check in the file.

    After the download items, how can I archive it? @@

    you mean that you are missing the file archive?  If so, download both sides 1, 2 (archive) and 2 of 2 (exe/extractor).

    Available downloadable Setup files:

    Download and installation help links Adobe

    Help download and installation to Prodesigntools links can be found on the most linked pages.  They are essential; especially steps 1, 2 and 3.  If you click on a link that does not have these listed steps, open a second window by using the link to Lightroom 3 to see these "important Instructions".

    window using the Lightroom 3 link to see these "important Instructions".

  • Check if the file is writable

    Hi all

    I have an air application that works very well. My only concern is with a folder that I ask the user to choose.

    Some issues that seem to lead my request protected system to fail.

    For example, any subfolder of the folder opt on my mac.

    So I'm looking for without luck how to check if the selected folder is writable or not? Any idea?

    Thanks in advance,

    Loïc

    Hello

    There is no api to test attributes (like canRead canWrite/isHidden/etc.). You can vote here:

    http://ideas.Adobe.com/CT/ct_a_view_idea.Bix?c=9D564F43-979A-4e35-AA21-85A61B6AB8DE&idea_i d = 852B26FE-E642-428 b-A8F8-1A6E7284FDC5

    Existing solutions:

    #1

    make runtime error checking with try/catch or listening to the appropriate error events that can be broadcast by taking into account the operation (move/copy or write etc.). If I'm not mistaken there are runtime error specific to media that are read-only.

    Check for errors of execution as 'read/write' of the directory is not exactly the same if the application has the appropriate privileges to make the operation of e/s with a given directory.

    #2

    When you try to "open" FileStream to 'WRITE' on in synchronous mode (so don't not openAsync), he will raise immediate runtime error during application cannot open filestream to 'WRITE' mode:

    http://livedocs.Adobe.com/Flash/9.0/ActionScriptLangRefV3/Flash/filesystem/FileStream.html #open ()

    I don't think that's recommended for test-of-action if the directory is writable - but when would work even if you are writing feature implemented in the selected directory

    #3

    You can use NativeProcess asynchronously to execute the system shell functions:

    [code]

    LS - lo

    to see what are the attributes of the path selected by the user. These data had to happen asynchronously and you will need to analyze what happens to the format as:

    rwxr-xr-x @ 3 personal $USER 102 5 Jun 12:38 / opt

    (api related to Windows is ATTRIB)

    HTH,

    Kind regards

    Peter

  • Check if the file loaded ok with loadMovieNum? AS2

    Hi all

    is it possible to capture the load as a boolean type error message when loading an external file (AS2)?

    I wanted to make a decision based on the success to loadMovieNum.

    The scenario is that I have a file that I'm loading with loadMovieNum and everything works fine.

    The fact that I want to cover is that if the file is missing for some reason, I want to upload a film to the placeholder.

    I watched onLoad and onClipEvent (load), but these seem to be only for movieclips and files not external.

    Any guidance would be appreciated.  Thank you.

    Best regards

    Chris

    You can load in a level or a movieclip using the class of LFA.  but you must have a 2nd parameter to loadClip() indicate at this level or movieclip and you need an instance of mcl and you must bind the instance listener and mcl:

    var mcl:MovieClipLoader = new MovieClipLoader();

    var loadListener:Object = new Object();

    loadListener.onLoadError = function (mc:MovieClip, {errorCode:String,[httpStatus:Number])}
    trace ("Could not find the file"};)
    }

    mcl.addListener (loadListener);
    mcl.loadClip(folder+this.fileName,2);

  • Incorrect Bitmap while doing a check of the file

    * Original title: bitmap

    the bitmap is wrong when he does a file check. How to fix?

    Open cmd, type: Sfc/scannow once thru type: CHKDSK C: /F agree to restart, type: EXIT

    restart the pc

Maybe you are looking for

  • My computer does not recognize my I - Phone 5s, why?

    My personal I-phone 5s went crazy about 3 weeks. wouldn t blue tooth with my truck-telephone calls connection of the cable with truck, 2 songs, radio and telephone game crashes try to use SoundHound and it changes the mode on my XM radio my computer

  • HP Pavilion dv7-3131ez: drivers

    I'm looking for the latest drivers for my pc. where can I download them?

  • How can I get the area of a balloon with video analysis

    HalloIf I have a video analysis for a ball, how can I get the box?

  • G4-2149se HP: HP g4-2149se need drivers

    reimagee drive D lost my ethernet driver, has managed to find this driver and got on the internet with cable connection. need a controller network controller, sm bus controller, unknown device, 2 USB controllers and pci device. portable recorded for

  • How to remove firefox don't forget user ID?

    How to remove firefox don't forget user ID? whenever I have connection to gmail to its shows the information.how user can remove that. Actually problem is by mistake that I gave my password in place and place the username... so after every time I log