How to set random math?

Flash game link:http://myglife.org/usa/wv/gehswiki/images/e/e3/Herominigame_10-7-08.swf
Ok I am making a very simple flash game for a class. I have all the coding working but I was wondering if any of you know how to do a certain thing.
Where the powerup(green box) falls out of the sky I have it set to when ever you hit it it will go *2+100 of the current x possition. While playing it is easy to catch the pattern and rack up points. I want to make it so that every time you hit the power up it will drop from the sky next time at a random place on the x axis.
I use action script 2.0.
Here is my code(look at the very bottom I will have a place in bold):
//tells score to start at zero
var score = 0;
//powerup starting position
Powerup1._x = 150
Powerup1._y = 20;
//begining of moving code
onEnterFrame = function() {
    //tells power up to move down the y axis
    //and go to the top of the screen if
    //goes out bottom
    Powerup1._y = Powerup1._y +6;
    if(Powerup1._y > 400) {
        Powerup1._y = 0;
    //commands that make hero re appear
    //on screen if goes off
    if(Hero1._y > 400) {
        Hero1._y = -100;
    if(Hero1._y < -100) {
        Hero1._y = 400;
    if(Hero1._x > 550) {
        Hero1._x = -70;
    if(Hero1._x < -70) {
        Hero1._x = 550;
    //code to make clouds move
    cloud1._y = cloud1._y +2.5;
    cloud2._y = cloud2._y +4;
    cloud3._y = cloud3._y +1.8;
    cloud1._x = cloud1._x +1.2;
    cloud2._x = cloud2._x +1.8;
    cloud3._x = cloud3._x +2;
    //code to make clouds not go off screen
    if(cloud1._y > 400) {
        cloud1._y = 0;
    if(cloud1._y < 0) {
        cloud1._y = 400;
    if(cloud1._x > 550) {
        cloud1._x = 0;
    if(cloud1._x < 0) {
        cloud1._x = 550;
    if(cloud2._y > 400) {
        cloud2._y = 0;
    if(cloud2._y < 0) {
        cloud2._y = 400;
    if(cloud2._x > 550) {
        cloud2._x = 0;
    if(cloud2._x < 0) {
        cloud2._x = 550;
    if(cloud3._y > 400) {
        cloud3._y = 0;
    if(cloud3._y < 0) {
        cloud3._y = 400;
    if(cloud3._x > 550) {
        cloud3._x = 0;
    if(cloud3._x < 0) {
        cloud3._x = 550;
    //controls for up left right and down
    if(Key.isDown(Key.UP)){
        Hero1._y = Hero1._y -6;
    if(Key.isDown(Key.DOWN)){
        Hero1._y = Hero1._y +6;
    if(Key.isDown(Key.RIGHT)){
        Hero1._x = Hero1._x +6;
    if(Key.isDown(Key.LEFT)){
        Hero1._x = Hero1._x -6;
    if (Hero1.hitTest(Powerup1)) {
        Powerup1._x = Powerup1._x *2+100
        Powerup1._y = 400;
        score = score + 1; 
        scoreDisplay.text = score;
        if (Powerup1._x > 400){
        Powerup1._x=10
END CODE
The big code is the script I am using to make the powerup box move each time you score. What I want to do is make it random instead of *2+100, and if possible make it random within a range. The range I want is between x 5 and x 545 on the x axis.
Please tell me what I need to do to make this happen.
Thanks in advance!
Dakota

Hello Dakota LBG, if you want to create a random number between two numbers, the formula is:
Math.round(Math.random() * (Highest - Lowest) + Lowest);
this gives you a random number between your highest and lowest wanted numbers..
in your case, it will be:
Math.round(Math.random() * (545 - 5) + 5);
may be you meant x next to 5 and 545 as an x axis element. but it doesnt matter.
you can just position your power block now by this random, like this:
Powerup1._x = Math.round(Math.random() * (545 - 5) + 5);
Hope this helps!
Cheers.

Similar Messages

  • How to set randomized numbers to appear once

    hello everyone. I'm trying to create a program on java in which i have assigned 26 values to the numbers 1 through 26. the thing is im not sure how to get these values to show up once ive randomized them and to not repeat.
    any help would be greatly appreachiated.

    int[] randomNumbers; //your 26 numbers
    java.util.Random rand = new Random();
    public void shuffle(){
    shuffleAmount = 100; //how much you want to shuffle
    for(int i = 0; i<shuffleAmount; i++){
    int a = rand.nextInt(randomNumbers.length);
    int b = rand.nextInt(randomNumbers.length);
    swap(a,b);
    public void swap(int a, int b){
    int temp  = randomNumbers[a];
    randomNumbers[a] = randomNumbers;
    randomNumbers[b] = temp;

  • How to set timer intervals for object + and a motion for entering stage

    Hi, I am making a simple game but I have a couple problems/queries.
    1) My game is a touch an object and you get a point game, currently the objects appear randomly over the screen, however I am trying to get it to slide into the screen similar to the Fruit Ninja game, but not limited to entering from one side, does anyone know how to set this?
    2) As I mentioned above my objects appear randomly, I have set a timer when I change the timer from 800 to another number, it just makes all the objects on the screen last for 800 milliseconds all at the same time then disappear and appear somewhere else on the screen for another 800 milliseconds and it repeats, what I am trying to do is make them come at different intervals, for example:
    Object 1 - constantly appears, so when the 800 millisecond is over, it comes back on a different part of the stage
    Object 2 - I want it to appear every 5 seconds, so when the 800 millisecond is over it will come back on the stage in 5 seconds, but not instantly like Object 1
    But I have no idea how to do this :/ anyone have the code needed for me to do this?
    Sorry for the long questions, I only asked because I really am stuck, I have been trying to do this for over 2 weeks now.
    Thanks very much.
    My Code
    [Code]
    //importing tween classes
    import fl.transitions.easing.*;
    import fl.transitions.Tween;
    import flash.utils.Timer;
    //hiding the cursor
    Mouse.hide();
    var count:Number = 60;
    var myTimer:Timer = new Timer(1000,count);
    myTimer.addEventListener(TimerEvent.TIMER, countdown);
    myTimer.start();
    function countdown(event:TimerEvent):void {
    myText_txt.text = String((count)-myTimer.currentCount);
    if(myText_txt.text == "0"){
    gotoAndStop(5)
    //creating a new Star instance;
    var star:Star = new Star();
    var box:Box = new Box();
    var bomb:Bomb = new Bomb();
    //creating the timer
    var timer:Timer = new Timer(800);
    var timerbox:Timer = new Timer(850);
    var timerbomb:Timer = new Timer(1000);
    //we create variables for random X and Y positions
    var randomX:Number;
    var randomY:Number;
    //variable for the alpha tween effect
    var tween:Tween;
    //we check if a star instance is already added to the stage
    var starAdded:Boolean = false;
    var boxAdded:Boolean = false;
    var bombAdded:Boolean = false;
    //we count the points
    var points:int = 0;
    //adding event handler to the timer;
    timer.addEventListener(TimerEvent.TIMER, timerHandler);
    //starting the timer;
    timer.start();
    function timerHandler(e:TimerEvent):void
              //first we need to remove the star from the stage if already added
              if (starAdded)
                        removeChild(star);
              if (boxAdded)
                        removeChild(box);
              if (bombAdded)
                        removeChild(bomb);
              //positioning the star on a random position
              randomX = Math.random() * 800;
              randomY = Math.random() * 1280;
              star.x = randomX;
              star.y = randomY;
              star.rotation = Math.random() * 360;
              box.x = Math.random() * stage.stageWidth;
              box.y = Math.random() * stage.stageHeight;
              box.rotation = Math.random() * 360;
              bomb.x = Math.random() * stage.stageWidth;
              bomb.y = Math.random() * stage.stageHeight;
              bomb.rotation = Math.random() * 360;
              //adding the star to the stage
              addChild(star);
              addChild(box);
              addChild(bomb);
              //changing our boolean value to true
              starAdded = true;
              boxAdded = true;
              bombAdded = true;
              //adding a mouse click handler to the star
              star.addEventListener(MouseEvent.CLICK, clickHandler);
              box.addEventListener(MouseEvent.CLICK, clickHandlerr);
              bomb.addEventListener(MouseEvent.CLICK, clickHandlerrr);
    function clickHandlerr(e:Event):void
              //when we click/shoot a star we increment the points
              points +=  5;
              //showing the result in the text field
              points_txt.text = points.toString();
                        if (boxAdded)
                        removeChild(box);
              boxAdded = false;
    function clickHandler(e:Event):void
              //when we click/shoot a star we increment the points
              points++;
              //showing the result in the text field
              points_txt.text = points.toString();
              if (starAdded)
                        removeChild(star);
              starAdded = false;
    function clickHandlerrr(e:Event):void
              gotoAndPlay(5);
    [/Code]

    The only thing that affects TopLink is the increment by, as increasing this is what allows TopLink to reduce the number of times it needs to go to the database to get additional numbers. Ie, an increment value of 1 means TopLink needs to go the database after each insert; an increment value of 50 allows it to insert 50 times before having to get a value from the sequence. The cache on the sequence object in the database affect the database access times. While it may improve the access times when the sequence number is obtained from the database, but I believe the network access to obtain the sequence is the greater concern and slow down for most applications. It all depends on the application usage and design though - an increment (and application cache) of 50 numbers seems to be the best default.
    I cannot say what effect the cache vs nocache settings will have on your application, as it will depend on the database load. Only performance testing and tuning will truly be able to tell you whats best for your application.
    Best Regards,
    Chris

  • Could somebody explain to me how to set up a VPN on my iMac and access it on iPhone and computer?

    I'm mainly using it to bypass an internet block. Could you explain in detail how to set up a vpn that will also work on iPhone? Do you have any recommended applications for me to install? Thank you

    To run a public VPN server behind an NAT gateway, you need to do the following:
    1. Give the gateway either a static external address or a dynamic DNS name. The latter must be a DNS record on a public DNS registrar, not on the server itself. Also in the latter case, you must run a background process to keep the DNS record up to date when your IP address changes.
    2. Give the VPN server a static address on the local network, and a hostname that is not in the top-level domain "local" (which is reserved for Bonjour.)
    3. Forward external UDP ports 500, 1701, and 4500 (for L2TP) and TCP port 1723 (for PPTP) to the corresponding ports on the VPN server.
    If your router is an Apple device, select the Network tab in AirPort Utility and click Network Options. In the sheet that opens, check the box marked
    Allow incoming IPSec authentication
    if it's not already checked, and save the change.
    With a third-party router, there may be a similar setting.
    4. Configure any firewall in use to pass this traffic.
    5. Each client must have an address on a netblock that doesn't overlap the one assigned by the VPN endpoint. For example, if the endpoint assigns addresses in the 10.0.0.0/24 range, and the client has an address on a local network in the 10.0.1.0/24 range, that's OK, but if the local network is 10.0.1.0/16, there will be a conflict. To lessen the chance of such conflicts, it's best to assign addresses in a random sub-block of 10.0.0.0./0 with a 24-bit netmask.
    6. "Back to My Mac" on the server is incompatible with the VPN service.
    If the server is directly connected to the Internet, see this blog post.

  • How to set and save Custom Print Settings in Aperture?

    How to set and save Custom Print Settings in Aperture
    Hi,
    I am printing 12x18" images on 13x19" sheets. I find it difficult to enter the 13x19" dimensions because each value jumps to another random value when I move to enter the second dimension. For instance 13 jumps to, say, 8.5 as I type 19 into the second box. Same with the sheet dimensions.
    Also, when I finally get it all correctly, the margins don't set themselves automatically - which I would I expect.
    Then, even though I save the setting by clicking Save Setting at the gear below, next time I turn Aperture on, it's all gone.
    Any ideas? Thanks.
    Raphael

    For me, it is working with these settings, Raphael.
    Does your image have a 12x18" aspect ratio? You may want to crop it to the desired aspect ratio before printing.
    I can only test with Aperture 3.6 on Yosemite 10.1.

  • How to set/get the initialization vector

    Hi,
    I have an existing database (built by non-java code) containing encrypted data. I know the algorithm, the key and the initialization vector to use in order to decrypt this data. (This is straight-forward DES encryption.)
    My problem is that I can't tell from the java documentation how to set the initialization vector on a Cipher object when I need to perform decryption.
    As an aside, when I try and encrypt data - the results from Cipher.getIV () are always null.
    Any help greatly appreciated,
    Thanks,
    --Jatinder                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

    To set the initialisation vector for a Cipher, you need to use the IvParameterSpec class and specifically create the initialisation vector. This class implements the AlgorithmParameterSpec interface. This is used in one of the init() methods for the Cipher class when you set up the Cipher (ie. it accepts parameters for the mode, key and parameter spec). I also found that this was difficult to work out from the supporting documentation.
    To get the initialisation vector for a Cipher, use the getIV() method after you have performed the init() call. If the vector has not been initialised before the init() call, you mayget a random result. If it has been initialised specifically, it will print out the vector that you initialised it with - I have tried this out.
    Hope this helps.

  • How to set a variable's value from job output

    Can anyone point me at documentation on how to set the value of a variable based on the output of a job? We are running TES v6.0.2.153.
    The Agent/Adapter is a Linux command line, so the Command could be for example:
    echo foo
    and I would like a variable named bar to contain the value foo.  (Obviously in real life the variable value would be dependent on what the command output)
    Thanks in advance,
    Martin

    One more nugget: to parse the response from a command from a UNIX/Linux agent for a specific string and store that in a variable, I followed Rami's advice and then had to find the string in the output.
    The below example puts the first digit of a random number in the variable:
    Job Command:
    bash -c
    Command Parameters:
    "'echo' Random number is $RANDOM | perl -ple 's/.*Random number is (\d{1}).*/\1/'"
    Note that your command itself (in this case "echo") cannot be put in the Command box, otherwise TES does not interpret the Command Parameters correctly.  So you need to set the Command to "bash -c" (run the command in the parameter string), and enter your command and parameters within double quotes in the Command Parameters, with the command being run (in this case "echo") in single quotes at the beginning.
    (I also had to make my .bash_profile run without any output to avoid it being prefixed to the variable value.)
    Hope this helps,
    Martin.

  • Where can I find detailed instruction on how to set up Likert quiz slides in Captivate 7?

    I am learning Captivate 7 and I'm stuck trying to create a series of Likert quiz slides. I can't find detailed instruction on how to set up the selections on the scale.

    I would like to know how to read Likert results. Any help would be appreciated.
    I have 15 comments that I need feedback from. There are three possible responses; Seldom, Sometimes, & Often. I would like to assign a point value (numeric value) to each response.
    Seldom=1
    Sometimes=2
    Often=3
    Once they have been answered , I would like to then take the total point values of only specific questions and display them. (e.g.Questions 2,4,7,9,13). Is it possible to track and assign a point value to each response. I figure once I get them into variables I can create an Advance Action to do the math. Any help would be greatly appreciated.
    Thanks

  • How to display a Math symbol with Subscript(like  "Xad", make the "ad" be Subscript )

    How to display a Math symbol with Subscript(like  "Xad", make the "ad" be Subscript )
    I need to show "Xad"(ad is Subscript )
    I try to find the letter subscript......but ,Unicode set is not have.....
    I try to use  X<sub>ad</sub>   show it  whit Text.htmlText,   but is not used,   I think Flex's HTML is  not support the <sub> mark.
    can you tell me , how to display a Math symbol with Subscript(like  "Xad", make the "ad" be Subscript )
    thank you very much.....

    http://blog.ggshow.com/index.php/how_to_use_subscript_aamp_superscript_in?blog=11
    http://jasonbejot.com/superscript-and-subscript-in-actionscript
    and thank you very very muck

  • How can I randomly assign addition or subtraction in a for loop?

    Does anyone have any ideas for how I can randomly assign a for loop to add or subtract random numbers throughout various itterations?  My current code generates two random numbers and adds them together for a set number of itterations.  I need some random itterations to be subtraction.  Thanks in advance!  
    Solved!
    Go to Solution.
    Attachments:
    Screen Shot 2015-06-11 at 7.56.31 AM.png ‏36 KB

    Add another Random Number generator and compare the result against 0.5. Use a case structure around your addition/subtraction operator.
    Seems like you might also want to output which operation actually got picked.

  • How we set up multiple websites on OSX Server

    BACKGROUND
    After fiddling and futzing around for weeks (actually since last year) I've finally figured out how to set up multiple websites (virtual sites) using one port and one IP address. While there seems to be lots of discussion on this topic, it seems that the basic assumption is that one knows everything about websites, DNS and all that stuff, which I do not.
    When our network was originally established the engineer set up a wiki and also configured webmail, so we had two sites, one secured for mail and the other open for Calendar and the wiki. We were not hosting any websites locally because our school website is hosted by a company in New England.
    This year I wanted to set up websites for teachers and students. As great as the wiki is, there are some things it just can't do as well as a website. So I figured if I set up the sites teachers could link back and forth from one to the other. In addition kids could now start to use a real website instead of the cobbled together file mess I had when we ran a Windows network. Also iWeb is a much more accessible tool than FrontPage.
    SERVER SIDE:
    Snow Leopard Server - 10.6.4
    There are two - actually three pieces if you want your iWeb clients to connect to the server: Server Side Web Services, DNS and, in my case, FTP.
    ================================================ SERVER SIDE - WEB SERVICES
    If you haven't turned on Web services, you'll need to open Server Admin and do that. If you don't know how to set up web services - just reply and I'll step you through that as well.
    Once web services are set up and turned on, you'll see it listed under your server’s name in the Server Admin sidebar. Click on "Web" and then click on the "Sites" tab at the top of page. This is where you list all your sites.
    Click the plus button and enter the fully qualified name of your site, for example: "students.myschool.org". Don't use the defaults here (no name) - that's what got me in trouble before. BE SPECIFIC!
    You'll be looking at the "General" tab (the other tabs, "Options", "Realms", etc. we'll deal with in a second).
    On the "General Tab", the default IP address ("any") and port (80) is just fine. We'll run everything over port 80. (Apache figures all the virtual site stuff out - you don't need your rocket science degree for that.)
    "Web Folder:" is important because this is how you'll "segment" your websites. While I would NEVER do this again, we have a solid state hard drive for the OS and a RAID array for our data files. IF you have that, make sure you do NOT use the default "Web Folder" because it will store all your files on your solid state drive. There may not be enough room, over time, on that drive. I've not experienced it yet, but it's my understanding that if the drive fills up, the server shuts down.
    I store my web sites on a folder on the RAID array.
    Everything else on that tab can be left as the default. (Just make sure that you have an "index.html" or "index.php" file in your web folder root, but iWeb will take care of that for you.)
    I would put in your email address in the "Administrator Email:" field.
    Under "Options" you really don't have to put anything. I've tested making websites with iWeb and it doesn't appear that anything needs to be checked.
    Nothing needs to be entered in "Realms" as well from what I see working w/ iWeb.
    The defaults in "Logging" are fine.
    You can leave "Security" alone, but we do have a (self-issued) certificate listed for our webmail site.
    "Aliases" is important. Under "Web Server Aliases" you enter how you want the site to respond to when users type in a URL in their web browsers.
    When our web server was initially set up the engineer set up "wiki.myschool.org" on port 80 and "mail.myschool.org" on port 443. In the aliases section was nothing but a "*" (the wildcard character). That means, from what I can figure out, that the webserver will respond to these sites regardless of what is typed in the URL. (Well, something like that - point is, if you create OTHER websites, you'll NEVER get to them because the wildcard character in the "Aliases" section, in effect, grabs those web requests and redirects them to the sites that are already there.
    In my case I deleted both of those wild card characters. For my "wiki.myschool.org" site, I entered "mail.myschool.org". That means if you type EITHER "wiki." or "mail.", go to the site that’s stored in the “Web Folder” we set up when those sites were created.
    For "mail.myschool.org" I just DELETED the wildcard character. I wanted that site (since it was secured) only to respond to "mail." - nothing else. (You're not going to that secured site for any other reason than to get your mail.)
    "Proxy" can be left blank. Have no idea what that does. As time permits I'll do some research and figure out what it's used for.
    "Web Services" is if you want to provide any MORE services to this particular site. Most likely you'll want to uncheck all the boxes. For our "wiki." site, we have checked "Wikis", "Blogs", and "Calendar". For our "mail." site we have those checked PLUS "Mail".
    I would create a separate "Web Folder" for each of your sites. I don't know if that's a requirement but for housekeeping purposes, I would keep the sites separated. And I SUSPECT that it's "best practice" to separate your wiki from your other websites.
    SERVER SIDE - DNS
    OK...now you have to make your site reachable and the only way to do that is to set up DNS so that folks don't need to type in the IP address of your web server. You need to set up DNS inside your network and, if you want folks in the outside world to reach your website, you'll need to set up an external DNS as well. I'm going to cover INTERNAL DNS - if you don't know how to set up EXTERNAL DNS - reply or email me and I'll post those instructions.
    Most likely you have already created Zones for you network...all you really need to do is create "Aliases" so that when you type "students.myschool.org" your web browser will know that site resides on IP address XXX.XXX.XXX.XXX.
    If you've set up Zones then you already have a "Machine" setting that translates your server’s name to an IP address and vice versa.
    All you need to do is create an "Alias" (CNAME) record for, in this case, "students". You’ll see the choices for types of records when you click the "Add Record" button.
    There are only two fields to configure for a record: "Alias Name" - in this case "students" and "Destination" - in this case "servername.myschool.org". (You've already entered a machine record that says "servername" = 192.168.1.x.)
    That's it for Internal DNS.
    SERVER SIDE - FTP
    Now you have to get iWeb to communicate with the webserver.
    There are only three ways iWeb will communicate with webservers: MobileMe, Local Folder and FTP Server.
    Local Folder is really only practical if you want to host a website on a laptop (I was blown away initially when I found out that all Macs had a built-in web server - how neat is that?). I think there are some very cool things teachers could do with configuration, and, of course, you wouldn't need to set up any web services on the web server, but that's for another discussion. You need to set up FTP services on the web server.
    Turn on and enable FTP on your webserver.
    You can leave the defaults for "General", "Messages" and "Logging". "Advanced" is the only thing you want to set. I set "Authenticated Users See:" to "Home Folder Only". I set the "FTP Root" to the same root folder in which I plan to store my web sites (/VOLUMES/RAID Array/WebServer/Documents). This setting sets that folder only to be accessible via FTP.
    I would suggest returning to your DNS settings and adding one more "Alias". Set "ftp." to point to your webserver. Why? So folks can edit their sites from home (see below).
    CAVEAT: If you are running FTP on other servers, make sure that the settings here do not conflict with the settings on the other servers. For example, I'm running FTP on my file server so that my scanners can communicate with it. However, I configure my FTP settings by machine name and NOT "ftp.myschool.org".
    ================================================
    CLIENT SIDE - CONFIGURING iWEB
    Now you have to configure iWeb so that it will communicate with your server.
    Click on the "Site" icon so that "Site Publishing Settings" appears.
    Publishing:
    "Publish to:" = "FTP Server"
    You can set the "Site name:" and "Contact email:" to whatever you want. But see below!
    FTP Server Settings:
    "Server address"=ftp.myschool.org (you could also enter in servername.myschool.org or the IP address. However, if you want folks to be able to work on the site from home, you will need to configure external DNS for that. If you use the IP address, you're out of luck for remote access to the site. (You can do it but it's beyond the scope of this discussion.)
    "Username" & "Password" should be your user's network login credentials.
    "Directory/Path" - this is important. Remember, you set your "FTP Root" to be "/VOLUMES/RAID Array/WebServer/Documents". If you leave this field blank then the website will be dumped into this folder. If you are only setting up one site, that may be OK. However I wanted to set up a "students" site folder, a "faculty" site folder and a separate site for our literary magazine.
    THEREFORE: I have, in my ..../Documents folder (on the server), a "students" folder, a "faculty" folder, and a "litmag" folder.
    SO...in my "Directory/Path:" field, I have "/faculty". That means the full path to this website is "ftp root/faculty" or "/VOLUMES/RAID Array/WebServer/Documents/faculty" (You don't need a trailing "/" character. iWeb will automatically append the folder for you user depending on what you entered in "Site Name:" in the "Publishing" area.
    Website URL:
    This is the root website depending on whether it is "students" or "faculty". Since iWeb will append the site name to this root website, I accomplished what I hoped to accomplish in this post (http://discussions.apple.com/message.jspa?messageID=12288561#12288561).
    Faculty sites will be @ http://faculty.myschool.org/username. Students @ http://students.myschool.org/username. PERFECT!
    iWeb is such a GREAT tool - NOW the kids can start using it!
    I want to reiterate that this works for our school but it should work for you as well. There may be better ways to do this but it works for us.
    Hope this has been helpful and you won't have to spend weeks trying to figure this all out by yourself!

    OK...here's how we did it.
    To get access to the website you created from outside your network there are a couple of steps.
    First, you have to have a STATIC IP address from your ISP. If you have a T1 circuit, no problem...you usually get a couple of static IPs you can use. However, if you have a cable modem circuit, most likely you have a dynamic IP address which changes when you connect to the internet. Usually a static IP will cost a bit more because the ISP has to go through a couple of steps to set it up for you. But once you have the address, you now have a way for folks outside your network to connect with you.
    (I’m also assuming that you use a router of some sort through which traffic flows out to the internet and that you aren’t using connection sharing or something like that.)
    The next thing you need to do is have your new static IP address associated with the server on which you are hosting your website. You've probably already done that if your website works inside your network. However, you've associated a private ip (192.168.x.x, etc.) to your web server. That doesn't mean anything to folks on the outside because private IP addresses are just that - private - folks can't access them. (I won't get into VPN because that's a whole other topic.)
    The way you associate your new static IP address to your web server is through some sort of dns application from your ISP. For example, we use TierraNet to manage our external DNS information. They have a web interface control panel that is very similar to the DNS interface for XServer. You can create CNAME records (aliases - other ways that folks can access your servers).
    Basically you create an "A" (CNAME) record with a fully qualified domain name (e.g. webserver.myschool.org) and point it to your public IP address (XXX.XXX.XXX.XXX) which you just got from your ISP. It's going to take a while (24-48 hours) for this change to take effect. BTW, you can create as many “A” records as you want. For example mail.myschool.com and wiki.myschool.com could point to the same place.
    You want to make sure that the fully qualified domain name you enter in the external dns utility matches the name you used when you created your internal dns records on your XServer.
    OK...so now folks can get to your domain - but, remember, you have a private network IP scheme between them and you. You now have to tell your router that when web traffic arrives, allow it inside the network and direct it to your web server.
    Let's say your public IP address is 205.100.112.50 and your web server is 192.168.0.5.
    You have to create, in your router’s "Security Zone" (router companies call them different things) a couple of rules. Usually the first rule is: "Let everything inside the network get out to the web." You've probably already done that if folks inside the network can reach the internet.
    You then have to tell the router to allow web traffic (port 80) into your network AND redirect that traffic to 192.168.0.5.
    We use AdTran routers and they have a web interface which allows you to write "rules" affecting public and private traffic. Public is folks outside the network, private is folks inside.
    AdTran calls them "Security Zones" and you modify those zones with policies.
    So my "Policy" would say, in the above example, redirect traffic from my public IP (205.100.112.50) -> to my web server -> (192.168.0.5).
    THEN you have to modify this policy with what AdTran calls "Traffic Selectors". You've said, OK, you can get in, but WHAT can get in?
    The "Traffic Selector" is written to say: "Permit" "TCP" traffic from 205.100.112.50 only through Port 80. (That's the port that web traffic goes over. If you wanted a secure website, you'd add another traffic selector that opens port 443, for example.)
    I'll tell you I'm no genius when it comes to this. I called AdTran and had them configure my router for me. I told them what I wanted done, they remoted into the router and configured it. But then I could go to the web interface and see what they did and then added rules later on when I wanted, for example, to get access to the network via Apple Remote Desktop or VPN into the network on my iPad.
    I'd bet that your router has a maintenance agreement that includes this service and if it doesn't it should have.
    I did find that I still had issues when I tried to set this up originally and it had to do with the ORDER of the policies. I can’t remember exactly what the issue was, but, effectively one of the policies highjacked traffic before the policy that I wanted got triggered. Simply moving them around in the list fixed that issue. So if you have this set up but still can’t access the site, check the order of your rules.
    I don’t know if that helps or not, but I try to think about this stuff conceptually and then get someone to help me with the details. I work with this stuff so infrequently that I forgot how I did something 6 months or a year ago. I’m in the process of creating a wiki for the school which documents all this stuff, but that’s a major undertaking.
    Cheers,
    John

  • How to set Compatibility Mode for a single site in ie10

    This question was originally posted on the Answers forum -
    http://answers.microsoft.com/en-us/ie/forum/ie10-windows_7/how-to-set-compatibility-mode-for-a-single-site-in/187152e3-142a-4d96-8d1b-af82ef571eec
    I am having problem with getting ie10 to set ie9 compatibility for a single site (sharepoint.contoso.com).
    When I add this website in Compatibility View Settings (Alt > Tools > Compatibility View Settings > 'Add this Website') it adds the domain 'contoso.com' and not the individual website (sharepoint.contoso.com).
    This cause other sites (www.contoso.com) to be configured to use compatibility mode. Because this is a separate site (different web server) to the site sharepoint.contoso.com (sharepoint 2010 server) we need different compatibility settings.
    Using a different example to explain the issue -
    Microsoft has three websites that are different websites created by different developers written in different programming languages and they only work with certain browsers.
    microsoft.com (Website1 created by Developer1) - compatible with ie8/ie9/ie10
    msdn.microsoft.com (Website2 created by Developer2) - compatible with ie8/ie9
    technet.microsoft.com (Website3 website created by Developer3) - compatible only with ie10
    The only thing the three website share is the URL contains 'microsoft.com'.
    Marking 'msdn.microsoft.com' to run in compatibility mode affects the other 2 websites - mainly technet.microsoft.com which will not work now since it only runs in pure ie10 mode. 
    Should you be able to add an individual site to the compatibility list instead of all sites that have  .microsoft.com in the URL? Am I missing a simple setting in the ie10?
    As a workaround I am using the F12 Developer Tools to set the Browser Mode which temporary sets the compatibility mode. However this is not a nice solution to the end users at our organisation. 

    problem is not solved for non corporate environments...
    You could start your own thread.  Then if you got that answer and it was marked Answered you would have the ability to unmark it.  The OP of this one seems satisfied.  Also note that this is TechNet.  Consumers can get help on Answers
    forums.
    Robert Aldwinckle
    Oh! I wrote it wrong: I should have said: This is not solved for NON-AD environments. No demands what so ever to use Window 7/8 professional in a small corporation or on a big corporation with Island of smaller departments for example offshore.
    The problem is that the thread is not "Answered" by the OP, its is marked answered by a moderator (and same moderator that did the answer) so no way of telling if the OP is satisfied.
    But you are right in the fact that I am almost kidnapping the thread. But a complete answer would benefit all in this case I would presume.
    Regards
    /Aldus

  • Once and for all: How to set up and use SSH

    Yes, I know ssh has been discussed on and off, but never in its entirety; and yes, there are step by step instructions on the www, but at one point or another they skip a crucial instruction that would be necessary for unix-dummies (e.g. how to save and close the nano-editor in Terminal). So, please pardon my question:
    There are several points I'd like to ask for ssh-connecting two macs on a local network:
    1) In terminal-file-"connect to server" you can ask for an ssh connection to be set up. For this to work, do I need to create private and public keys first? If so, how? Please point me to a reliable and step-by-step instruction site.
    There are some free ssh-utilities out there, but their documentation is just not helpful enough for a UNIX-dummy.
    2) Apparently I managed to connect via ssh once (from the terminal, see point 1) to a local server (allowing remote connection set to ON at the server). But then, when I connected to that server from the client's finder and tried to get into my user account on that server it told me that no secure connection could be established. What's wrong here? Do I have to continue working from within the terminal to use this connection? That would be difficult for an average MacUser.
    3) What is the security advantage of an SSH connection on a local wireless network (Airport Base Station) over WPA2, if at all?
    4) And how to set up an ssh-connection over the internet cloud to safely build a remote control/desktop sharing connection, e.g., a friend's Mac when she has a problem?
    Thanks for your consideration.

    First I'm not sure what your goals are.
    1) In terminal-file-"connect to server" you can ask for an ssh connection to be set up. For this to work, do I need to create private and public keys first?
    If you have ssh keys, you can do this without passwords. If you have not exchanged keys with the remote system, you will be asked for the password of the user you are attempting to login as.
    If so, how? Please point me to a reliable and step-by-step instruction site. There are some free ssh-utilities out there, but their documentation is just not helpful enough for a UNIX-dummy.
    Log into the remote system. This could be via ssh.
    On the remote system, run the following command to generate an ssh key for that remote system:
    ssh-keygen -t rsa
    Generating public/private rsa key pair.
    Enter file in which to save the key (/Users/username/.ssh/id_rsa): <<take default>>
    Created directory '/Users/username/.ssh'.
    Enter passphrase (empty for no passphrase): <<enter nothing>>
    Enter same passphrase again: <<enter nothing again>>
    Your identification has been saved in /Users/username/.ssh/id_rsa.
    Your public key has been saved in /Users/username/.ssh/id_rsa.pub.
    The key fingerprint is:
    aa:bb:cc:dd:ee:ff:gg:hh:ii:jj:kk:ll:mm:nn:oo:pp [email protected]
    This will generate an ssh key for the remote system. This could be any system that support ssh, such as a Unix system, or another Mac.
    Copy the id_rsa.pub file from the remote system to your Mac. When I say "your Mac" I mean the one that you want to make the ssh connection from. The id_rsa.pub is found in the remote system's ~username/.ssh/ directory.
    Append the copied id_rsa.pub to your Mac's ~himbear/.ssh/authorized_keys2 file
    cat id_rsa.pub >>~himbear/.ssh/authorized_keys2
    Now when you ssh to that specific remote system, it will NOT ask for a password. The first time you ssh to any system, ssh will ask if the system is really the system you thing it is. But once you say "yes", it will not ask that question again.
    Repeat for every remote system you wish to log into using an ssh key.
    2) Apparently I managed to connect via ssh once (from the terminal, see point 1) to a local server (allowing remote connection set to ON at the server). But then, when I connected to that server from the client's finder and tried to get into my user account on that server it told me that no secure connection could be established. What's wrong here? Do I have to continue working from within the terminal to use this connection? That would be difficult for an average MacUser.
    MacUser. A flash from the past, as in the MacUser magazine.
    ssh is not used by default when you make connections. If you want an ssh connection, you have to establish it intentionally.
    ssh can be used to pre-establish a tunnel (or tunnels) that other services can use. Once an ssh tunnel is establish, connections to local host's tunnel port will be connected to the specified remote port. For example:
    ssh -L 5901:localhost:5900 [email protected]
    will establish a tunnel that VNC can use. The VNC client would connect to localhost display 1 or port 5901.
    ssh allows multiple -L tunnels to be specified on the ssh command line.
    3) What is the security advantage of an SSH connection on a local wireless network (Airport Base Station) over WPA2, if at all?
    Inside you home. Not much. Unless of course you do not trust the other members of your family. That is to say, others having your WPA2 password, and are thus on the inside, and can sniff you packets.
    4) And how to set up an ssh-connection over the internet cloud to safely build a remote control/desktop sharing connection, e.g., a friend's Mac when she has a problem?
    If you are using the Mac OS X Leopard built-in *Screen Sharing* and you are connecting to another Mac's built-in Leopard System Preferences -> Sharing -> Remote Management (Tiger's Apple Remote Desktop), then in the *Screen Sharing* preferences, is an "Encrypt all network data" option.
    If you wish to set this option in advance, you can launch *Screen Sharing* by double clicking on System -> Library -> CoreServices -> Screen Sharing.app
    You can *Screen Sharing* connections over the net using iChat. This is one of the easiest ways to take control of their system. Of course they need to cooperate. I use a Free AOL Instant Messager (AIM) account for my iChat connections. And as a side benefit you can text, audio chat and/or video chat with the person at the other end.
    If you are NOT using the build-in Mac OS X *Screen Sharing* and/or you are NOT using the build-in remote Mac OS X remote management server, then this is a situation where an ssh tunnel would be a very good idea.
    However, setting up an ssh tunnel between 2 systems across the internet gets complex.
    In this case you might want to consider using something like LogMeIn.com which will deal with all those nasty home routers without needing to to do nasty router configurations, and it will be a secure connection. LogMeIn.com will not be as fast as a *Screen Sharing* connection or a VNC connection, but it will be secure and easy to establish. Again, this is only if you can not to Mac to Mac *Screen Sharing* using built-in Mac OS X remote desktop.
    Now if you want to roll your own ssh tunnels for VNC, then I'm just going to outline the things you need to do.
    If the remote system is behind a home router, you need to configure that remote home router to "Port Forward" port 22 on the Internet side to port 22 on the target Mac. Bonus points if the internet side using a high number port to discourge net bots from knocking on your door. Use the ssh -p 12345 option to connect to the high numbered port that is forwarded to port 22 of the destination Mac.
    On the remote Mac you need to run a VNC server. If this is a Mac, then Leopard System Preferences -> Sharing -> Remote Management (Tiger's Apple Remote Desktop). If it is not a Mac, then for Windows, TightVNC, UltraVNC, RealVNC are possible options. Linux has a built-in vncserver, or you can install x11vnc which has the advantage of displaying the desktop screen.
    Once you can access the remote system, you use an ssh command like the following:
    ssh -p 12345 -L 5901:localhost:5900 remote.system.address
    You can get the remote system's address by having the remote system surf over to http://whatismyip.com. Then they can tell you the IP address.
    If you are going to be doing this a lot, you can get a free no-ip.com or dyndns.org dynamic DNS name for the remote system, and the remote system can run a dynamic DNS client (available from no-ip.com or dyndns.org) which will keep the dynamic DNS name updated as the remote person's ISP change's their IP address.
    Finally, now that you have an ssh tunnel for VNC traffic, you have your VNC client connect to
    Address: localhost
    Port: 5901
    Depending on your VNC client you may need to specify Display 1 instead of Port 5901. Or if you do not get a Display or Port option you specify localhost:5901

  • TS3899 I can't SEND email from Telus account in Alberta, Canada? Does anyone know how to set up the Outgoing server? Help! And thanks!

    Can't SEND email from Telus account in Alberta, Canada, unless I go to web mail. Does anyone know how to set up the Outgoing server? Incoming is fine. Outgoing used to work. We changed it when we went to another location, and can't get it back. Telus support can't fix it. Neither smtp.telus.net NOR mail.telus.net works for Outgoing server to send mail. Please help! Thanks.

    iOS: Unable to send or receive email
    http://support.apple.com/kb/TS3899
    Can’t Send Emails on iPad – Troubleshooting Steps
    http://ipadhelp.com/ipad-help/ipad-cant-send-emails-troubleshooting-steps/
    Setting up and troubleshooting Mail
    http://www.apple.com/support/ipad/assistant/mail/
    Server does not allow relaying email error, fix
    http://appletoolbox.com/2012/01/server-does-not-allow-relaying-email-error-fix/
    Why Does My iPad Say "Cannot Connect to Server"?
    http://www.ehow.co.uk/info_8693415_ipad-say-cannot-connect-server.html
    iOS: 'Mailbox Locked', account is in use on another device, or prompt to re-enter POP3 password
    http://support.apple.com/kb/ts2621
    iPad Mail
    http://www.apple.com/support/ipad/mail/
    Try this first - Reset the iPad by holding down on the Sleep and Home buttons at the same time for about 10-15 seconds until the Apple Logo appears - ignore the red slider - let go of the buttons. (This is equivalent to rebooting your computer.)
    Or this - Delete the account in Mail and then set it up again. Settings->Mail, Contacts, Calendars -> Accounts   Tap on the Account, then on the red button that says Remove Account.
     Cheers, Tom

  • How to set up roaming profile on Macs using AD like in windows

    I can bind the workstations to the domain fine.. But can someone direct me to instructions of how to set up the roaming profiles ?
    What steps do I need on the server ? This is what I've done so far.
    I already have OU's for the departments and the users have a shared folder inside their department folder.... \\server\shared_folder\user
    I have done the usual things with AD as far as the profile settings on the windows server.
    Am currently running Mac OS 10.5 and above
    My windows AD runs on windows server 2008
    All my windows workstation are able to use roaming profile without a problem.
    So far i have tried the so many avenues including..
    Make sure the Mac systems are joined to the domain controller and an ADS user can log on successfully. Use "Directory Utility" under "Utilities" menu to join the system to the domain.
    Backup all the contents from /Users to the storage or somewhere locally.
    Configure automount - Go to "Utilities" -> "Directory Utility" - Select the domain and click "Show advanced options" - Click "Mounts" tab and add automount as mentioned below. Remote NFS URL: nfs://server_name/share_name/path/to/profile/directory Mount location: /Users Additional mount parameters: -P,-T Apply the settings and this will mount the remote shared folder or we can name it as Roaming Profile Space - under /Users directory
    Enable roaming profile - Go to "Utilities" -> "Directory Utility" - Select the domain and click "Show advanced options" - Click "Services" -> Select "Active Directory" and click "Show advanced option" - Click "User experience" tab and select the option "Create mobile account at login".
    Reboot the system and log in as any ADS user. The Roaming shared folder will be mounted and the user profile will be created on the shared folder
    Can anyone kindly assist me

    Hi Guys, anyone with the Soln...or Tips..Am waiting

Maybe you are looking for

  • Adding a radio button to a popup

    Hi all I have a command button when clicked on it a popup should come and it should display all the Digital certificate names stored in the system in the form of radio button along with certificate names. Presently when clicked on command button, the

  • Book Configuration Data error

    I was playing a game yesterday and it suddenly went into a black screen. Ctrl + Alt + Delete didn't work so I tried Alt + F4 and that didn't work either. I force powered off and when I tried to use it today a blue screen came up saying: [Recovery You

  • Character conversion Unicode - clarification

    Hello, I have a situation where I need to load a material master data from R/3 to BW. In source system for material description, language key used as "EN" and description maintained in Chinese language. Both R/3 and BW systems are unicode compliance.

  • Pocket pc (ipaq)

    hey, does somebody know what i have to do(may instal an particular platform or something like that) in order to run an executable jar file on my ppc thanks for your help tom

  • Cant add specific photo folders to iphone

    Hello, when I plug up my iphone to itunes and select photos, the only option it gives me is to sync with the entire "pictures" folder. It wont allow to select specific folders i have within "my pictures". It says i can sync my iphone with every pictu