How can I make a wall in a game AS2

Earlier I've declarded my speed_var as 5 and allocated it a button so it moves at 5 pixles so in theory it should stop, have I written it wrong?
player1_mc.onEnterFrame = function(){
if (this.hitTest(wall1_mc)){
  trace(this.hitTest(wall1_mc));
  speed_var -5;

ahh no my IT teacher very briefly explained it, but i don't want to change the speed to -5 i want it so when it hits the wall the speed becomes 0 so the moviclip stops moving, so if i went left the speed would go back to 5

Similar Messages

  • How can i make a list like Razer Game Booster in wpf C#

    Hello every one
    I asked this question in stackoverflow, and they just gave me negative points! I don't know why,
    but at least
    I expected to get answer in here.
    I trying to make a software with WPF in C# that the theme is
    similar to Razer Game Booster.
    I made many effect similar to
    Razer Game Booster in my software but I don't Know how can i make a list like that software!
    You can download Razer Game Booster in this link: http://www.razerzone.com/cortex/download
    Now, What exactly i want?! I'll show you with following pics:
    After adding a few items, a scroll bar will appear and if you do nothing, it will be hidden after a few seconds:
    Image link: http://imgur.com/XIl3Bk9
    After placing the mouse on the items (on hover status):
    Image link: http://imgur.com/8NbUrIx
    Which one of objects in visual C# and WPF Application can do this?!
    if you interested to see what I've done, unfortunately I tried it and
    failed! Now I asking you to help me and show me how can i do that?
    any advice can help me. I'm waiting for your answer.
    thank you guys so much.
    I'm sorry
    if I bothering you.

    There are probably 1000's of tutorial about layout in WPF but I have found that the people on this forum have the best handle on how to use WPF.  I am now near a workstation and have the following code example which should get you started. (the example
    is in VB but it is the XAML which is important).
    <Window x:Class="MainWindow"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    Title="MainWindow" Height="350" Width="525" Loaded="Window_Loaded">
    <Window.Resources>
    <Style TargetType="ListBox" x:Key="myListbox" >
    <Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Hidden"></Setter>
    <Style.Triggers>
    <Trigger Property="IsMouseOver" Value="True">
    <Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Visible" ></Setter>
    </Trigger>
    </Style.Triggers>
    </Style>
    </Window.Resources>
    <Grid Background="#FF040404">
    <ListBox Style="{StaticResource myListbox }"
    HorizontalAlignment="Left" Height="237" Margin="23,46,0,0"
    VerticalAlignment="Top" Width="470"
    ItemsSource="{Binding theList}" Background="Transparent" >
    <ListBox.ItemsPanel>
    <ItemsPanelTemplate>
    <UniformGrid Rows="2"></UniformGrid>
    </ItemsPanelTemplate>
    </ListBox.ItemsPanel>
    <ListBox.ItemTemplate>
    <DataTemplate>
    <Grid Background="#FF574A4A" Width="150" Height="75" Margin="0,0,10,0" >
    <TextBlock Text="{Binding theCaption}" VerticalAlignment="Bottom" Foreground="#FFF5EFEF"></TextBlock>
    </Grid>
    </DataTemplate>
    </ListBox.ItemTemplate>
    </ListBox>
    </Grid>
    </Window>
    Class MainWindow
    Public Property theList As New List(Of theItem)
    Private Sub Window_Loaded(sender As Object, e As RoutedEventArgs)
    For i As Integer = 0 To 5
    Dim ti As New theItem With {.theCaption = "Caption " + i.ToString}
    theList.Add(ti)
    Next
    DataContext = Me
    End Sub
    End Class
    Public Class theItem
    Public Property theCaption As String
    End Class
    The above XAML define a listbox with the properties I mentioned in my previous post.  There is a listbox with an ItemTemplate (define how each item should be displayed) and a definition of how the layout
    should be done (ItemsPanel).  The is also a style which uses datatriggers to show/hide your scrollbar.  If you have questions about what I presented please ask but I would ask that you try it first so that you can see how it looks .
    And I'm sorry for the small font above but this forum editor constantly give me problems.
    Lloyd Sheen

  • My Iphone 3gs wont charge, turn on, or restore itself in Itunes, but the apple logo still appears when I hold the sleep botton.  How can I make my Iphone work????

    My Iphone 3gs wont charge, turn on, or restore itself in Itunes, but the apple logo still appears when I hold the sleep botton.  How can I make my Iphone work????  I know it is not dead because I can see the apple logo on, and every time I connect it to a USB port to charge, or a wall charger, the battery appears with a bit of red. Still, it wont turn on.  It's been like this for three days now and I haven't stopped charging it.  IT just WONT charge?  Any tips I can use to solve the issue?
    -Esteban

    Hello estebie67,
    Thanks for the question, and welcome to Apple Support Communities.
    It sounds like the iPhone is experiencing issues upon startup, and may not be loading the firmware or operating system correctly. If you have not already done so, try resetting the iPhone while connected to power:
    iPhone, iPad, iPod touch: Turning off and on (restarting) and resetting
    http://support.apple.com/kb/HT1430
    If the above does not resolve your issue, it will be best to restore the iPhone in recovery mode:
    iOS: Unable to update or restore
    http://support.apple.com/kb/HT1808
    Thanks,
    Matt M.

  • How to make a wall for a game

    hello developers
    I’m sharing a long time to find out how to make a wall for my game but now where is it.
    Can someone help me?
    its a wall for an iphone/ipod game.
    It must be a wall that a sprite will stop walking it’s not a killer object but a stop object.
    oh and are there differants in programing in ipad/iphone?
    Thanks for help
    Grtz Jimmy

    I don't know what's you point on the wall and the player but you should do something as that:
    -(IBAction)goLeft
         if (player.x > wall.xo && player.x < wall.xI)
                  // you are in the wall go right
              if(player.y > wall.yo && player.y < wall.yI)
                 // you are in the wall go right
                 player.x ++;
              else ; // you are up or down of wall
    -(IBAction)goRight
        if (player.x > wall.xo && player.x < wall.xI)
              if(player.y > wall.yo && player.y < wall.yI)
                 // you are in the wall go left
                 player.x --;
               else ; // you are up or down of wall

  • I've been trying to make an account with iTunes n everytime I get to the part of the credit card that's as far as I get because I dnt have one, how can I make an iTunes account without a credit card??

    I've been trying to make an account with iTunes n everytime I get to the part of the credit card that's as far as I get because I dnt have one, how can I make an iTunes account without a credit card??

    Where are you located?
    Just go and buy an iTunes gift card at any store in your country.
    Then follow all the steps you did, but when it asks you for the credit card number, there shoujld be a GIFT CARD option which will let you load your account witht eh funds form the gift card without providing a credit/debit card #.

  • How can i make an iTunes store acount without a credit card?

    how can i make an iTunes store acount without a credit card?
    im israeli and the israel store is only the app store.
    i want to get stuff for free without a credit card.
    help?!?

    Just go get a prepaid Visa or something. Put a small amount of money on it and then use that to open an account. If that doesnt work just call them. Contacting Apple for Support and Service 1 800 275-2273

  • HT1918 how can i make an apple id account without a credit card?

    how can i make an apple id account ? it says i need a credit card but i dont have one how can i get passed this?

    Download a free app, create a new apple id account and click none when it says to fill in credit card information.

  • How can I make mac except capture from my canon xlh1?

    How can I make my imac recognize my canon XL1 Camcorder in Final Cut Express

    Assume you are connected by Firewire, and that FCE has Import in some menu? Also check FCE Forum https://discussions.apple.com/community/professional_applications/final_cut_expr ess_hd?view=discussions.

  • TS3988 When I try and log into the icloud, I get a message that my Apple ID is valid but not an icloud account. How can i make it one?

    Whin I try and long into the icloud, I get a message that my Apple ID is valid, but the it is not an icloud account, how can I make it one?

    To use iCloud on a PC, you must first set it up using a device with iOS5 or a Mac with OS X Lion.

  • I synced two of my email accounts via gmail's POP3 thing. But now my iphone's gmail inbox shows a random selection of emails (not most recent ones that are in my inbox). How can I make my iphone inbox match what I see when I log on using a PC?

    I synced two of my email accounts via gmail's POP3 capabilities. But now my iphone's gmail inbox only shows a random selection of emails (i.e. right now it is May 31, 2013 but the emails in my inbox are a couple from Nov 12, a few from Oct 12, and then some way older than that and so on.When I log into my gmail from a computer, I see all my emails in the logical, standard order. How can I make my iphone inbox match what I see when I log on using a PC?

    If you're trying to decide between using POP and IMAP, we encourage you to use IMAP.
    Unlike POP, IMAP offers two-way communication between your web Gmail and your email client. This means when you log in to Gmail using a web browser, actions you perform on email clients and mobile devices (ex: putting mail in a 'work' folder) will instantly and automatically appear in Gmail (ex: it will already have a 'work' label on that email the next time you sign in).
    IMAP also provides a better method to access your mail from multiple devices. If you check your email at work, on your mobile phone, and again at home, IMAP ensures that new mail is accessible from any device at any given time.
    Finally, IMAP offers a more stable experience overall. Whereas POP is prone to losing messages or downloading the same messages multiple times, IMAP avoids this through two-way syncing capabilities between your mail clients and your web Gmail.
    That is from the page that you linked- does highlighted part of message ring a bell?

  • I down loaded sygic on my iPhone 3s but the icon is missing even in the search but when I want to download it again ,it say this application is present, how can I make the icon to show up

    I down loaded sygic on my iPhone 3s but the icon is missing even in the search but when I want to download it again ,it say this application is present, how can I make the icon to show up

    - Have you tried a reset. Nothing is lost
    Reset iPod touch: Hold down the On/Off button and the Home button at the same time for at
    least ten seconds, until the Apple logo appears.
    - Try syncing  the iPod to your computer. Then delete from iTunes and sync. that should delete it from the iPod. Then redownload it.

  • I have a new MAC MINI and I want to install a second monitor.  I have one connected to the HDMI and it works.  I can't get a signal to the other one.  It is connected from the thunderbolt to its HDMI port.  How can I make it work?

    I have a new MAC MINI and I want to install a second monitor.  I have one connected to the HDMI and it works.  I can't get a signal to the other one.  It is connected from the thunderbolt to its HDMI port.  How can I make it work?

    Could be a bad cable or bad Thunderbolt port.
    You have 90 days of free telephone support on a new device. You can call them at 1-800-MY-APPLE. Have your Mini's serial number handy
    You can also make an appointment at the Genius Bar of an Apple store.
      Apple Retail Store - Genius Bar

  • I am frustrated with how my cursor jumps around while typing.  How can I make the arrow follow the cursor so this doesn't happen?

    Macbook Pro with OSX Yosemite:  I am frustrated that when using Word for Mac, the cursor keeps jumping around all over the page.  How can I make the pointer follow the cursor so this stops?

    Start Firefox in [[Safe Mode]] to check if one of the add-ons is causing the problem (switch to the DEFAULT theme: Tools > Add-ons > Themes).
    * Don't make any changes on the Safe mode start window.
    See:
    * [[Troubleshooting extensions and themes]]

  • My Zoom in Gesture Doesn't Work on Safari How can i make it work?

    I just bought a mac book pro 2011 and i know that the zoom in gesture used to work on safari at first but it doesnt anymore how can i make it work again?

    So it does not work at all in Safari?  Do you have any other web browsers installed that you could test it out on to see if it is just acting up with Safari?

  • Nokia C3 How can I make sure it only connects thro...

    Ive just got this phone for my daughter on Vodaphone contract, I am really worried however that it is going to randomly connect itself to the internet like my old Nokia 5800 used to! How can I make sure it doesn't, I don't want it to end up costing me a fortune. Many thanks

    Only the website (server or domain) that sets a cookie can read that cookie, but there can be an iframe embedded with a different domain that sets so called third-party cookies.
    You can disable third-party cookies.
    *https://support.mozilla.org/kb/Disabling+third+party+cookies

Maybe you are looking for

  • Manual bank statement upload error FB727

    Hi Experts When we are uploading the manual bank statements using transaction FF67, we are getting the error message FB727 "There are no transactions that have this amount's plus or minus sign" We are using SAP version 4.7, I am not sure how this mes

  • Duplicate Records in Transactional Load

    Dear All, I have an issue where data is getting loaded from a Write Optimized DSO to another Write Optimized DSO and the DTP is getting failed because of Duplicate Records. It is for a Transactional Load. I would be grateful if you could please help

  • Acrobat Print Progress Bar

    Anyone know where the print progress bar went in Acrobat? Is there a preference to turn it back on? Seems that Acrobat 8 does not have it anymore...Please shed some light! Thanks in advance! -Rich

  • A few minutes ago, I snet in question but misstyped em address?

    In my 1st ?, I typed in my em address incorrectly. Sorry. Anyway, How, should and can I access the internet through my wifi? I am getting the famous "not going to happen page". on this page is a suggestion about telling the firewall proxy to let me i

  • After Installation Thunderbird cannot create any e-mailaccount in Windows 8.1

    Dear friends, I have installed Thunderbird on my recently installed Win 8.1 system. TB installes, opens, but then I cannot create anything else but a Newsgroupaccount. The wizard for creating a new, or importing existing e-mailaccounts does not appea