Tuesday, February 1, 2011

How To access vpn

How to Access VPN

Before you can access VPN, you must obtain a CWL account. CWL accounts are available to registered UBC students, staff and faculty. If none of these affiliations reflect your status with the university and you need VPN access, you can obtain a CWL guest account if you are sponsored by a staff member or faculty.

Once you have your CWL account, you can configure your computer for VPN service. For help, check the VPN set up and configuration guides.

How To add onEnterframe in flash as3


Flash AS3 onEnterFrame event changed

Actionscript 3.0 onEnterFrame has changed a bit from the old classic AS2 onEnterFrame event function. I’ll illustrart the old and new way of preforming animations using the Enter Frame event. The classic way of attaching an onEnterFrame event to a stage or movie clip was done this way:

myMovieClip.onEnterFrame = function(){
trace("do something repetitive");
}

In AS3, you’ll have to use an event listener method to preform a frame event like so:

myMovieClip.addEventListener(Event.ENTER_FRAME,enterFrameFunction);
function enterFrameFunction(event:Event) {
trace("do something repetitive");
}

Like most functions in AS3, it’s a little more involved than AS2, however when your done, your flash should load and run faster.

How To view online movies

s
Watch Movies Online

Why break the bank to see a blockbuster when you can view films from the comfort of your computer? The Internet has revolutionized Hollywood, providing independent filmmakers with access to an audience of millions.

"Marketing has definitely become Web site-oriented and has shifted the possibilities for small producers to market at almost no cost," said Bert Deivert, author of "Film and Video on the Internet: Top 500 Sites."

Of course, you can pay to download television episodes and studio movies from Apple's iTunes store. Amazon Fishbowl with Bill Maher is an online show of interviews with actors, authors and musicians. Watch Maher chat with Stephen King, the Dixie Chicks and Mitch Albom. The point of putting the episodes on Amazon is to get you to buy their cds/books/music there, but enjoy the interviews, become informed and -- hey -- if you like it, click and buy the book.

Today Internet video is less about full-length feature films and more about video shorts and clips created by individuals. Why not scan through some of the more outlandish creations on the Web?

Many sites having streaming video that you can watch through your browser window, but other sites still require multimedia software such as Real Media Player, Windows Media Player or QuickTime. These programs allow you to appreciate the full effects of digital movies, including video and audio.They are also necessary for watching video on some news sites.

Film directories serve as a virtual multiplex, letting you search through before deciding on a video. A few of the best film directories are YouTube, Google Video and Ifilm. Recently purchased by Google,YouTube has everything from homemade music videos to clips from top TV shows. Ifilm boasts links to more than 10,000 films, and has organized them into categories like animation, commercials and music videos. It also has movie trailers and clips.

If you are looking for some laughs, Jibjab.com and eBaum's World have jokes and hilarious videos uploaded by members. Watch the movies and view photos and jokes without registering. To upload homemade movies on Jibjab.com, though, you'll have to become a member.

The following distributors and producers also allow visitors to view films:

  • AtomFilms
    "I think AtomFilms is one of the coolest," said Dievert. You'll find an exclusive collection of more than 1,000 films, which Atom has been syndicating to channels like HBO and Sci-Fi. One such picture is Talk to Taka, starring Pat Morita. The 12-minute film profiles a sushi chef who becomes a love advisor. The producer pitched the idea to Atom's online community before going ahead with the project.

  • New Venue
    Launched in part by a grant from Stanford University, New Venue screens films that have overcome the technical boundaries of the Internet.

   --- A. Crawford

How to Take a Screenshot in Microsoft Windows

Take a screen shot


Ever see something on your screen that you’d like to e-mail or save for later? With Microsoft Windows XP, you can take a screen shot and capture an exact image of what’s on the screen.
Screen shots are useful in many ways. For example, if you receive an error message, you can take a screen shot and send your support person an exact replica of the error window, which makes communicating about the error simple. You can also use a screen shot to show someone a Web page without sending them a link. Microsoft uses screen shots to demonstrate how to do tasks within Windows. If you’re helping someone with a computer task or problem, and you can’t be right there with that person, you can use screen shots to illustrate your points through e-mail, instant messaging, or Microsoft Word.
Note: The only times you can’t take a screen shot are before you log on to your computer and when you are playing a video in Microsoft Windows Media Player.
To take a screen shot and save it as a picture
1.Click the window you want to capture. Press ALT+PRINT SCREEN by holding down the ALT key and then pressing the PRINT SCREEN key. The PRINT SCREEN key is near the upper right corner of your keyboard. (Depending on the type of keyboard you have, the exact key names on your keyboard may vary slightly.)
Note: You can take a screen shot of your entire desktop rather than just a single window by pressing the PRINT SCREEN key without holding down the ALT key.
2.Click Start, click Accessories, and then click Paint.
Start, All Programs menu expanded to access Paint on Accessories menu
3.In the Paint window, click Edit, and then click Paste.
Paint window with Paste selected on the Edit menu
4.When the image appears in the Paint window, click File, and then click Save As.
Paint window with Save As selected on the File menu
5.In the Save As dialog box, in the File name box, type a name for the screen shot, and then click Save.
Save As dialog box with a screen shot name typed in the File name box
You can now print or e-mail the saved screen shot just like you would any other picture.

Saturday, January 15, 2011

How a dll using in vc++

I was trying to learn DLLs and nothing was really explaining anything; it was just code for you to look at and wonder what was going on. For this article, I assume you know how to use the features of your compiler, such as setting directory paths and such.
To set up the project, select Win32 Console Application, and on the advanced tab, select DLL and empty project options. DLLs are not as hard as you might think they are. First, make your header file; call this DLLTutorial.h. This file is like any other header file in that it has function prototypes.

#ifndef _DLL_TUTORIAL_H_
#define _DLL_TUTORIAL_H_
#include <iostream>

#if defined DLL_EXPORT
#define DECLDIR __declspec(dllexport)
#else
#define DECLDIR __declspec(dllimport)
#endif

extern "C"
{
   DECLDIR int Add( int a, int b );
   DECLDIR void Function( void );
}
The first two lines instruct the compiler to include this file only once. The extern "C" tells the compiler that it is okay to use this in C or C++.
There are two ways of exporting functions in VC++:
  1. Use __declspec, a Microsoft-specific keyword.
  2. Create a Module-Definition File (.DEF). The first way is a tad bit easier to do than the second, but both work just fine.
__declspec(dllexport) exports the function symbols to a storage class in your DLL. I defined DECLDIR to do this function when the line
#endif
#define DLL_EXPORT
is not present in the source file(s). In this case, you will export the functions Add(int a, int b) and Function().
Now, you need to make a source file that you'll call DLLTutorial.cpp.

#include <iostream>
#include "DLL_Tutorial.h"
#define DLL_EXPORT
extern "C" { DECLDIR int Add( int a, int b )
{ return( a + b ); }
DECLDIR void Function( void )
{ std::cout << "DLL Called!" << std::endl; } }

This is where you define all of your functions. Int Add(int a, int b) simply adds two numbers and void Function(void) just informs you that your DLL was called.
Before I show you how to use the DLL, I want to tell you about the Module-Definition File (.def).

Module-Definition File (.def)

A module definition file is a text file with a .def extension. It is used to export the functions of a DLL, much like __declspec(dllexport), but the .def file is not Microsoft specific. There are only two required sections in a .def file: LIBRARY and EXPORTS. Take a look at a basic .def file and then I'll explain.

The first line, 'LIBRARY', is one of the required sections. This tells the linker what to name your DLL. The next section labeled 'DESCRIPTION' is not required, but I like to put it in. It writes the string into the .rdata [from MSDN] and it tells people who might use the DLL what it does or what it's for. The next section labeled 'EXPORTS' is the other required section; this section makes the functions available to other applications and it creates an import library. When you build the project, not only is a .dll file produced, but an export library is produced with the extension .lib. In addition to the previous sections, there also are four other sections labeled NAME, STACKSIZE, SECTIONS, and VERSION. I will not cover these in this tutorial. but if you search the Internet, I think you'll find something. One more thing: A semicolon (;) starts a comment, as '//' does in C++.
Now that you have created your DLL, you need to learn how to use it in an application. When the DLL was built, it created a .dll file and a .lib file; you will need both.

Implicit Linking

There are two ways to load a DLL; one way is the easy route and the other is more complicated. The easy route is just linking to your .lib file and putting the .dll file in your new projects path. So, create a new Empty Win32 Console project and add a source file. Put the DLL you made in the same directory as your new project.

#include <iostream>
#include <DLLTutorial.h>

int main()
{
   Function();
   std::cout << Add(32, 58) << "\n";
   return(1);
}
You must link to the DLLTutorial.lib file. I did it in Project Settings, but you could use
#pragma comment(lib, "DLLTutorial.lib")

instead. Please note that I set the compiler to look into my DLL folder for the .lib file and set it to look in the directory for the DLL header. If you don't want to do this, you can always put them in the directory with your new project and use "" (quotes) instead of <>. That's how you load a DLL the easy way.

Explicit Linking

The harder way to load a DLL is a little bit more complicated. You will need function pointers and some Windows functions. But, by loading DLLs this way, you do not need the .lib or the header file for the DLL, only the DLL. I'll list some code and then explain it.

#include <iostream>
#include <windows.h>

typedef int (*AddFunc)(int,int);
typedef void (*FunctionFunc)();

int main()
{
   AddFunc _AddFunc;
   FunctionFunc _FunctionFunc;
   HINSTANCE hInstLibrary = LoadLibrary("DLL_Tutorial.dll");

   if (hInstLibrary)
   {
      _AddFunc = (AddFunc)GetProcAddress(hInstLibrary, "Add");
      _FunctionFunc = (FunctionFunc)GetProcAddress(hInstLibrary,
         "Function");

      if (_AddFunc)
      {
         std::cout << "23 = 43 = " << _AddFunc(23, 43) << std::endl;
      }
      if (_FunctionFunc)
      {
         _FunctionFunc();
      }

      FreeLibrary(hInstLibrary);
   }
   else
   {
      std::cout << "DLL Failed To Load!" << std::endl;
   }

   std::cin.get();

   return 0;
}





Monday, January 10, 2011

How To create textfiled and set font in flash as2

Paste this code in to the first frame of your flash movie


this.createTextField("mytext",1,100,100,100,100);
mytext.multiline = true;
mytext.wordWrap = true;
mytext.border = true;

var myformat:TextFormat = new TextFormat();
myformat.font = "Courier";

mytext.text = "this is my first test field object text";
mytext.setTextFormat(myformat);

Saturday, May 1, 2010

The fastest way to over come the storage problems is a second hard drive, in addition, its great method to protect critical data. It’s not only an easy and quick way as well as it’s a cost effective, approximately 1$ per gigabyte. So if you need additional storage on your machine, this article will tell you the simplest way to push you forward towards living this experience and obtain your desired results.
Instructions to follow:
As long as you reached this part, this means that you are about to begin this exciting process, shall we delve?
  • Hard DriveFirst check if you want the Serial ATA or IDE (parallel-ATA). Although older machines have the IDE (Parallel ATA), modern ones might support only (Serial-ATA). To make sure of that, you can open up the case and try to distinguish the used drives type. Usually the IDE drives have a flat and wide ribbon cable. The SATA ones have thinner cables and no jumpers.
  • Free a room for an extra hard drive:
  • Restart your machine then log into the BIOS-Menu.
  • Hit the Standard CMOS Settings.
  • Restart your machine
  • See a trusted manufacturer to get the external hard drive you want to add , make sure that its compatible with your master hard drive
  • Turn off your machine, unplug all cords attached to it from the back and unscrew all the screws of your case.
  • Place the screws in a well know place then remove the side panel and drag it out of the case.
  • Look for the region where all flat ribbon cables (or even the SATA cables) attach to the mother board.
  • Pose the jumpers to change the drive status to a slave or a master. Follow the instructions printed on your hard drive to do so. Meanwhile you won’t have to do so if you were dealing with a SATA, as each SATA device uses only its own cable, IDEs can share devices.
  • Locate the empty bay inside your machine case.
  • Connect the ribbon cable that to your hard drive.
  • Connect the Molex power cable; you can distinguish it by the 3 thin internal wires of red, yellow, and black. Notice that SATA drive has a non similar kind of power cable.
  • Place the side panel where it was to your computer then screw it back.
  • If you reached here it’s the last step as you will have to plug all of cables, connect them back to their power source incase while installing the drive you unplugged them.
  • Now we need the computer organization to feel all the changes, and that’s why you will restart your machine. Log into BIOS startup (depending on your mother board manufacturer you can show it by either pressing F10 or DEL key on keyboard). Now check back the BIOS Auto-Detect to make sure that the additional drive got detected. Check the screen that presents the both the Primary and Slave drives, you should see the name of the new added one.
  • Once you log into it, you will face 4 settings named as following: PRIMARY MASTER\AUTOPRIMARY SLAVE\ SECONDARY MASTER\ SECONDARY SLAVE. Hit them all and change them into Auto-Detection.