Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  • Users: peterworth
  • Content: Threads
  • Order by date
  1. peterworth

    .eps files loaded by MovieClipLoader

    when i load a .jpg with a MovieClipLoader object, it displays fine, but the exact same code loading a .eps file doesnt work. it loads the clip without any errors, and calls it's listener's onLoadInit function, suggesting everything is fine, but then nothing is displayed. any ideas? thanks.
  2. peterworth

    scope when using new

    i'm not sure how scope works in actionscript - am i doing something wrong in the code below? the loop runs 3 times, so there should be 3 movieclip loader objects and 3 listeners. but in the output, there is only 1 "loaded" trace. i.e. only one of the listener objects has called the onLoadInit...
  3. peterworth

    resizing a swf movie loaded with loadMovie

    hi, the following gives some funny behaviour: loadMovie("li.swf","rect_mc"); rect_mc._width = 50; rect_mc._height = 50; button_mc.onRelease = function() { rect_mc._width = 50; rect_mc._height = 50; } the first alteration to _width and _height make the movie a particular size, then when...
  4. peterworth

    how low (level) can you go?

    i want to read directly from an address in memory (ie regardless of whether it is part of the assigned program memory). can i do this in a C program?... this: char* pointer = (char*)0; fwrite(pointer,4,1,file); causes a debug assertion error. can i just turn these assertions off or something?
  5. peterworth

    actionscript _currentframe from within a symbol

    hi, i'm trying to use the current frame to determine what to do when an event occurs in a symbol, but _currentframe seems to always be 1 when the event gets triggered, no matter where in the animation we actually are. i guess this is because the script for the event handler is in frame 1 of the...
  6. peterworth

    regex leaving 1 space in a string

    i'm trying to do the following and have got a bit confused: replace a string so that only alpha-numeric characters remain, deleting spaces and all EXCEPT if there is a space in the middle of the string - then keep it. if there are spaces at the end or beginning of the string (before or after...
  7. peterworth

    odbc_connect not working in browser

    odbc_connect returns null when my script is run in a browser (firefox and IE), but the exact same code works perfectly when run with the command line PHP exe. does anyone know why this might happen? thanks.
  8. peterworth

    odd behavior of strings

    The following code: foreach $postcode (<NEEDED>) { chomp $postcode; chop $postcode; print "'$postcode'"; if ($postcode eq "SA460EY") { print "\nequal"; } else { print "\nnot equal"; } } gives output: 'SA460EY' not equal although clearly the value of...
  9. peterworth

    structs defined in wingdi.h

    when i declare a struct which is defined in this header there are no compiler errors, but when i step through the code the variable does not seem to exist after it is declared. for example: BITMAPINFOHEADER bmih; bmih.biSize = sizeof(BITMAPINFOHEADER); at the second line (and beyond), the...
  10. peterworth

    another bitmap question..

    i'm having trouble understanding what to pass to the CBitmap::CreateBitmap function as the const void* lpBits parameter. on the msdn website it says it should be a short int array but in the BITMAP structure, lpBits is a byte array. what should it be, and how are the colours represented by...
  11. peterworth

    alternatives to SetPixel()

    i want to create an array of rgb values and then draw them with a CDC. i assume the best way to do this is with BitBlt, but this requires a CDC to copy from in the first place. how do i create a CDC with the values in my (2D) array?
  12. peterworth

    stdafx.h

    why do i have to include stdafx.h in all my cpp files, even though the code for many of them is potentially platform independant? i get a unexpected end of file while looking for precompiled header error if i dont include it..
  13. peterworth

    memory exceptions

    for what reasons might a CMemoryException be thrown at a line like this? *lpBuffer = new char[dwCurBufSize]; not much memory is being used and i'm sure there are no memory leaks, so surely it can't only mean memory has run out?
  14. peterworth

    arrays in a CMap

    if an instance of CMap<DWORD,DWORD&,char*,char*> has arrays of chars set to it's values, when it is deleted, will the arrays also be deleted? i.e. will the equivelent of delete []charArray; be called for each value in each pair?
  15. peterworth

    why doesnt the debug window tell you

    what line (or even what file) an exception occured at? the way you can see the entire call stack in java is so much better...
  16. peterworth

    how are ints chars and longs etc represented?

    is it 2's compliment when signed and plain binary when unsigned? the problem is that i am reading the first 4 bytes from a buffer like this: DWORD ret = *lpBufComp; and this comes out as 4294967168 which i believe is 0x7FFFFFFF. however, i'm sure it should be (in binary) 100000000..... sure...
  17. peterworth

    rounding

    whats the easiest way to round a float down? (so that a double like 2.8 becomes an int value of 2)
  18. peterworth

    number of bits in a byte (char)

    does the code BYTE m_byte:5 ; set the number of bits in m_byte to 5? if so, would this line: BYTE ret:nCodeSize = *lpBufComp; read nCodeSize number of bits from the buffer lpBufComp? the last question is this: after having done this, how would i move the pointer lpBufComp along to the next...
  19. peterworth

    variable prefixes

    Variables with names like lpzFoo or m_nBar - is there an accepted standard for the prefixes? if so is there somewhere on line with the meaning of each?
  20. peterworth

    component palette completely empty

    why might this be? thanks.

Part and Inventory Search

Back
Top