Showing posts with label on. Show all posts
Showing posts with label on. Show all posts
Tuesday, February 17, 2015
Pros and Cons of Interviewing Bloggers on your Blog

For some people bloggingis a way of life; they like producing content that stimulates conversation while also informing readers about a particular topic. In order to stay motivated, a blogger must get traffic by producing quality content and practicing tried and true techniques. One of these techniques is to interview another blogger or an individual who has authority in the same niche as you to provide a different perspective to your readers, which adds value. While this technique is effective, there are also some costs that go along with it. This article will go over the benefits and costs of interviewing bloggers for your blog.
Also Read: How to Choose the Right Theme for Your Blog?
Also Read: The 3 Basic Things You Should Know Before Creating a Blog to Become a Successful Blogger
Pros
As stated previously, one of the main benefits in interviewing bloggers for your blog is that your readers get to hear a different voice than the one theyre used to. While you’re the one asking the questions, the bulk of the content will be transcribed in the voice of the interviewee. This gives your audience real insight into what a person is thinking and allows them formulate opinions based on how another thinks, not just you. The immediate benefit to this is that your readers will feel like your blog is a place of discussion and exploration rather than a dictatorship ran by a person behind a computer.
Another benefit of interviewing bloggers on your blog is that you get real-life contact with the person if it’s a face-to-face interview. If start corresponding with other bloggers in your niche and become friendly, these good feelings go to a different level once you meet and chat about the issues. What this does overtime is allow your name and blog pop up in that person’s mind whenever they encounter something dealing with your topic, giving you a great lead source.
Cons
As with most things that produces a benefit, there is a cost to it. One of the costs of interviewing bloggers to your blog is that you may simply be a poor interviewer. Having good interviewing skills is different than knowing about a topic. So if you have poor interviewing skills and your readers discover this it will bring down some of your authority. If a person can’t ask the right questions to a person, will they be able to ask the right questions about a topic? This line of thought can lose your readers.
Also Read: The Top 10 Websites to create free Logo for your Blog
Another cost to interviewing bloggers on your blog is that you can ruffle some feathers with your peers. In order to get traffic, one must network with others so that they can exchange links, guest posts, and other things. If you interview a person and it turns out that you have an agenda or that your lines of questions go into unpleasant territory, knowingly or unknowingly, then you can lose the trust--or worse respect--of that individual. Being able to gracefully navigate a variety of topics and issues is a requirement for interviewing.
Conclusion
While there are benefits and costs to interviewing bloggers on your blog, the former outweigh the latter. You can’t be scared of what might happen and forego the benefits that could happen.
Author Bio:
This is a guest post written by Tarun Jaitely, He is a blogger and writes about Make Money Online, Blogging, SEO, Reviews. He recommends you to check out his latest review about sensational wordpresstheme from MyThemeShopon his blog.
Thursday, February 5, 2015
How to Create an Account on Facebook Instructions Guides Tips and Training Video Tutorials
If you want to learn how to create an account on Facebook and youre looking for resources about Facebook - instructions, guides, tips, and training - check out these free Facebook video tutorials below. These are from the Facebook Essential Training Course by lynda.com. It will teach you the basics of creating an account on Facebook and managing it. It has topics on: finding and adding friends, liking pages, reading the News Feed, writing on a friend’s wall, updating your status, posting videos and links, creating a page for a business, protecting privacy and staying secure, deactivating an account, and more. Check out the free videos below to see start learning. To view the entire course, become a lynda.com member or sign up for a FREE 7-day trial.

or 
or 
or 
Read more »

Facebook Essential Training by 
START LEARNING TODAY!
or 
WATCH THESE 5 FREE VIDEOS FROM THE COURSE
Facebook Essential Training - Welcome
Facebook Instructions - Changing your profile photo
Facebook Instructions - Understanding your News Feed
Facebook Instructions - Uploading videos
Facebook Instructions - Adding, removing, and blocking friends from your Chat list
Facebook Instructions - Changing your profile photo
Facebook Instructions - Understanding your News Feed
Facebook Instructions - Uploading videos
Facebook Instructions - Adding, removing, and blocking friends from your Chat list
START LEARNING TODAY!
or 
Course Information
Training Provider: Lynda.com
Title: Facebook Essential Training
Author: Garrick Chow
Duration: 3hrs 10mins
Date of release: 10 May 2011
Chapter 1: What Is Facebook?
Understanding Facebook and social networking
Chapter 2: Signing Up and Creating a Profile
Signing up with Facebook
Editing your profile
Changing your profile photo
Configuring your notifications
Chapter 3: Finding and Adding Friends
Understanding Facebook friends
Finding friends, family, and coworkers
Managing friend requests
Organizing friends into lists
Removing and blocking friends
Liking pages
Whats "poking"?
Chapter 4: Your Home Page and Your Wall
Understanding the home page
Understanding your News Feed
Understanding your Wall
Writing on a friends Wall
Chapter 5. Updating Your Status and Sharing
Content
Updating your status
Posting photos, videos, and links
Writing Notes
Tagging friends
Chapter 6: Managing Photos and Videos
Uploading photos and creating albums
Uploading videos
Tagging, editing, and deleting photos
Chapter 7: Sending and Receiving Private Messages
Sending private messages
Reading, replying to, and deleting private messages
Setting privacy for private messages
Chapter 8: Chatting
Displaying the Chat list and chatting with friends
Adding, removing, and blocking friends from your Chat list
Disabling Chat
Chapter 9: Searching Facebook
Searching for people
Searching for content
Editing your public search listing
Chapter 10: Facebook Groups
Searching for and joining groups
Creating and administering a group
Posting content to a group
Chapter 11: Facebook Applications
Understanding applications
Accepting, ignoring, and removing application requests
Installing and using applications
Viewing application settings and uninstalling applications
Chapter 12: Creating a Page for Your Business
Creating a page for your business, band, or organization
Assigning other people as administrators for your page
Using your page identity to post and comment on other peoples pages
Setting up a user name for your page
Chapter 13: Protecting Your Privacy and
Staying Secure
Choosing what to share publicly
Configuring sharing
Using https to log in
Using one-time passwords
Signing out remotely
Recognizing new devices accessing your account
Chapter 14: Taking a Break from Facebook
Downloading your information
Deactivating your account
Deleting your account
Training Provider: Lynda.com
Title: Facebook Essential Training
Author: Garrick Chow
Duration: 3hrs 10mins
Date of release: 10 May 2011
Chapter 1: What Is Facebook?
Understanding Facebook and social networking
Chapter 2: Signing Up and Creating a Profile
Signing up with Facebook
Editing your profile
Changing your profile photo
Configuring your notifications
Chapter 3: Finding and Adding Friends
Understanding Facebook friends
Finding friends, family, and coworkers
Managing friend requests
Organizing friends into lists
Removing and blocking friends
Liking pages
Whats "poking"?
Chapter 4: Your Home Page and Your Wall
Understanding the home page
Understanding your News Feed
Understanding your Wall
Writing on a friends Wall
Chapter 5. Updating Your Status and Sharing
Content
Updating your status
Posting photos, videos, and links
Writing Notes
Tagging friends
Chapter 6: Managing Photos and Videos
Uploading photos and creating albums
Uploading videos
Tagging, editing, and deleting photos
Chapter 7: Sending and Receiving Private Messages
Sending private messages
Reading, replying to, and deleting private messages
Setting privacy for private messages
Chapter 8: Chatting
Displaying the Chat list and chatting with friends
Adding, removing, and blocking friends from your Chat list
Disabling Chat
Chapter 9: Searching Facebook
Searching for people
Searching for content
Editing your public search listing
Chapter 10: Facebook Groups
Searching for and joining groups
Creating and administering a group
Posting content to a group
Chapter 11: Facebook Applications
Understanding applications
Accepting, ignoring, and removing application requests
Installing and using applications
Viewing application settings and uninstalling applications
Chapter 12: Creating a Page for Your Business
Creating a page for your business, band, or organization
Assigning other people as administrators for your page
Using your page identity to post and comment on other peoples pages
Setting up a user name for your page
Chapter 13: Protecting Your Privacy and
Staying Secure
Choosing what to share publicly
Configuring sharing
Using https to log in
Using one-time passwords
Signing out remotely
Recognizing new devices accessing your account
Chapter 14: Taking a Break from Facebook
Downloading your information
Deactivating your account
Deleting your account
About Lynda.com
Lynda.com is an online video training provider with over 1000 courses covering a wide array of topics - 3D, video, business, the web, graphic design, programming, animation, photography, and more. They produce top quality video tutorials with the best industry experts as your instructors. With a subscription, you can log-in at any time, and learn at your own pace. New courses are added each week, and you will receive a certificate of completion for each course that you finish.
Start learning today!
If you enjoyed the sample videos above and want to access the entire Facebook Essential Training course, you can sign up for a lynda.com membership. Your membership will allow you to access not only this course, but also the entire lynda.com library for as low as $25 for 1-month. Their training library has over 1000 courses with 50,000+ video tutorials. No long-term commitment required. You can cancel your membership at any time.

Not yet convinced? Try a FREE 7-day trial.
As a special promotion, visitors of this site can get a FREE 7-day trial to lynda.com. This free trial gives you access to their entire training library of over 1000 courses.

Sign-up for a lynda.com membership today to learn how to how to create an account on Facebook and to view all the Facebook instructions, guides, and Tips from this excellent video training course.Lynda.com is an online video training provider with over 1000 courses covering a wide array of topics - 3D, video, business, the web, graphic design, programming, animation, photography, and more. They produce top quality video tutorials with the best industry experts as your instructors. With a subscription, you can log-in at any time, and learn at your own pace. New courses are added each week, and you will receive a certificate of completion for each course that you finish.
Start learning today!
If you enjoyed the sample videos above and want to access the entire Facebook Essential Training course, you can sign up for a lynda.com membership. Your membership will allow you to access not only this course, but also the entire lynda.com library for as low as $25 for 1-month. Their training library has over 1000 courses with 50,000+ video tutorials. No long-term commitment required. You can cancel your membership at any time.

Not yet convinced? Try a FREE 7-day trial.
As a special promotion, visitors of this site can get a FREE 7-day trial to lynda.com. This free trial gives you access to their entire training library of over 1000 courses.

START LEARNING TODAY!
or 
Monday, February 2, 2015
I am on Telegram NOW!
Hi to all,
You can now contact me in Telegram. I dont have a viber because I do not have a 64bit Linux OS it only work in a 64bit Linux OS as of the moment. Telegram works in 32bit Linux OS. I can reply to you ASAP when I got your message,
I may not be able to reply to you through text because I seldom reload my phone/SIM.
Here is my contact:
Telegram: 09126753342
Hangouts: gadgetzboyz@gmail.com
Read more »
You can now contact me in Telegram. I dont have a viber because I do not have a 64bit Linux OS it only work in a 64bit Linux OS as of the moment. Telegram works in 32bit Linux OS. I can reply to you ASAP when I got your message,
I may not be able to reply to you through text because I seldom reload my phone/SIM.
Here is my contact:
Telegram: 09126753342
Hangouts: gadgetzboyz@gmail.com
Tuesday, January 27, 2015
Working on a Mac
Introduction
At my new job (at TripAdvisor), we were given the following choice for the work computer:
The vast majority of my computing life has been spent on Windows, so either choice would present a significant change. I picked the Macbook Pro because I like the portability of a laptop: it lets me easily work from home, I can bring it with me to a meeting and also use it for non-work purposes. As I will be spending a lot of time on this thing, I will be posting my impressions of the transition here.
The Hardware
Since Macs and PCs use essentially the same hardware nowadays, there is nothing unusual here. Its a very solid system with enough horsepower to let me run Eclipse, a web server and half a dozen apps at the same time reasonably well. The only standout feature is the built in webcam, which has been largely useless to me, but is a neat toy with some fun software.
The only noticeable difference with Apples hardware is the meticulous effort Apple takes in the look and feel. The whole notebook has a nice steel look with lots of rounded edges. The Apple logo on the back of the LCD lights up when you are using it and the tiny LED on the front of the laptop will slowly pulsate when you put it to sleep. Even the wires are made out of a nice white plastic and have simple very Apple-esque designs.
Overall, its an attractive package, which is far more than I can say for my last laptop, the IBM ThinkPad T43. Apple takes real pride in its design and its not shy about telling you that: when you open the box the laptop comes in, the first thing you see is a large piece of black cardboard, in the middle of which is proudly proclaimed, in elegant white text:
"Designed by Apple in California"
...of course, it doesnt say built by Chinese and Mexicans in sweat shops :)
The Software - The Good
There is one thing OS X has going for it that I desperately want in windows: the search box in the top right corner of almost every application window. You can see it in Finder, Spotlight, the Mail program, System Preferences, iCal, iTunes and tons of other programs. In each case, the program indexes its contents (the song names in iTunes, your email in Mail, etc) and as you type something into the search box, it instantly filters the results to just items that contain the search terms. It makes launching a program, finding files, finding emails, etc extremely quick and efficient. Its available to some extent on Windows with third party apps such as Launchy and Google Desktop, but system wide integration in OS X is incredibly nice.
OS X comes preloaded with a ton of software. Given that Microsoft was sued for including Internet Explorer with Windows, I dont know how Apple gets away with it, but OS X users should be happy. Some of the software I really like: iTunes is a very solid media manager. The Mail program and iCal blow away Outlook and its calendar, and you only get Outlook if you shell out extra money on MS Office. iMovie (from watching others use it) seems very impressive, especially when stacked up against Windows Movie faker.
iPhoto, iChat, and Safari Im less thrilled with. They get the job done, but arent anything out of the norm. Widgets (which are available for XP and Vista) I dont like on any OS. The Preview app, which is unique only for its "cover flow" ability is very pretty, but honestly, fairly useless. Thumbnail view, while not as pretty, is a much more efficient way to find something visually. Finally, spaces is a neat (although very old) idea, and the execution is decent, but as I have multiple monitors at work, I have no use for it. I also havent tried GarageBand or Time Machine yet, although I hear good things.
OS X can also be fairly intelligent and well integrated. It does a lot for you (sometimes too much) that can be quiet useful. For example, as soon as you plug a monitor into the DVI port, it turns it on and extends your desktop onto it. In Windows, Id have to dig through several annoying menus (which differ widely depending on your video card) to enable the second monitor. If you highlight a date or time in the Mail program it gives you the option to add an event for that time to iCal. If you have an icon for your user in OS X, Adium (a nice multi protocol chat client) will automatically use it as your buddy icon. Network computers are effortlessly visible in Finder which, as odd as it sounds, can sometimes make it easier to connect to even Windows networks on a Mac.
The Software - The Bad
Given the specs, OS X wasnt as responsive as Id expect. Its by no means slow, but when launching apps and multitasking, theres a small amount of lag. I would guess that, like Windows Vista, all the extra graphical effects cause a bit of a slowdown.
Some small keyboard issues really irritate me on OS X. I understand the Apple button replacing the Windows button, but the changes are far deeper than that and oddly inconsistent. For example, if you push the Alt button in Windows, it highlights a menu at the top of the application. Alt + F often highlights the File menu. You can then use your arrow keys to browse the menu. OS X, as far as I can tell, doesnt have this. You either need to know the keyboard shortcut ahead of time or use the mouse.
The home and end buttons go to the beginning and end of a page, which is unlike every other OS on the planet, where they go to the beginning and end of a line. To emulate the proper behavior of home and end in OS X, you have to use apple button + arrow keys. This is an awkward combo to push and in Firefox, this actually will activate the back and forward buttons of the browser, which is a serious issue! Moreover, when using Firefox, instead of CTRL + T to open a new tab, you use Apple + T. But to switch between tabs, its CTRL + Tab, same as in Windows. Obviously, some of this frustration is just the pain of switching between OSs, but a lot of it is inconsistent and illogical and could have been avoided.
Another odd thing is that when you close a program by clicking the red circle in the top left corner (the x)... it doesnt actually close. The window disappears and makes you think the program is closed, but secretly, the program keeps running. Your only clues are that the program still shows up when you Apple + Tab between programs. To actually close it, you have to use the menu or push Apple + Q. This seems like a very non user-friendly design, which is odd coming from Apple.
Browsing for files in Finder - largely because of the way user accounts are handled in Unix - is a bit unintuitive as well. Its often hard to see the proper file hiearchy, its even more difficult to see files above your users file hiearchy (this is somewhat by design) and the shortcuts in the left pane ("Macintosh HD", "Desktop", "Applications") only add to the confusion as you have no idea where in this hiearchy they fit. This is painful to someone coming from Windows, where Im used to seeing every file and folder on the entire system. It is somewhat mitigated due to the wonderful aforementioned search feature but the file layout really should be cleaner.
Conclusion
Despite everything I say above, to be perfectly honest, during day-to-day usage, there is not much difference between OS X 10.5 and Windows XP. In the end, Im still browsing the web with Firefox, coding in Eclipse, browsing files and folders, typing commands at a prompt and so on. Despite all the marketing hype, these two OSs are not polar opposites. They both do a few things very well and a few things very poorly. Everything in between - which is probably 98% of what you do with your computer anyway - is a matter of personal preference.
Personally, I would not buy a Mac for myself for a few of reasons:
* I build my own PCs, out of just the parts I want, which you cant really do with a Mac, although thats slowly starting to change as Macs use more and more standard hardware.
* Macs have far fewer games available.
* Actually, in general the amount of software available for the PC is greater than for the Mac. This is largely because the PC market is so much larger, but its certainly worth considering.
Apple has come a long way from the original iMac and Im relieved to say that OS X is a very solid OS. Given that the pre ~10.2 Mac OSs used to make me gag, this is pretty high praise. And who knows, maybe after using it for long enough at work, itll start to grow on me. Or drive me nuts. Well see.
Read more »
At my new job (at TripAdvisor), we were given the following choice for the work computer:
- Linux workstation
- Macbook Pro
The vast majority of my computing life has been spent on Windows, so either choice would present a significant change. I picked the Macbook Pro because I like the portability of a laptop: it lets me easily work from home, I can bring it with me to a meeting and also use it for non-work purposes. As I will be spending a lot of time on this thing, I will be posting my impressions of the transition here.
The Hardware
- MacBook Pro
- Intel Core 2 Duo 2.2 Ghz (dual core)
- 2GB ddr2 800 RAM
- 15" widescreen display, 1440*900
- nVidia Geforce 8600GM GT
- 120GB HD
- OSX 10.5 Leopard
Since Macs and PCs use essentially the same hardware nowadays, there is nothing unusual here. Its a very solid system with enough horsepower to let me run Eclipse, a web server and half a dozen apps at the same time reasonably well. The only standout feature is the built in webcam, which has been largely useless to me, but is a neat toy with some fun software.
The only noticeable difference with Apples hardware is the meticulous effort Apple takes in the look and feel. The whole notebook has a nice steel look with lots of rounded edges. The Apple logo on the back of the LCD lights up when you are using it and the tiny LED on the front of the laptop will slowly pulsate when you put it to sleep. Even the wires are made out of a nice white plastic and have simple very Apple-esque designs.
Overall, its an attractive package, which is far more than I can say for my last laptop, the IBM ThinkPad T43. Apple takes real pride in its design and its not shy about telling you that: when you open the box the laptop comes in, the first thing you see is a large piece of black cardboard, in the middle of which is proudly proclaimed, in elegant white text:
"Designed by Apple in California"
...of course, it doesnt say built by Chinese and Mexicans in sweat shops :)
The Software - The Good
There is one thing OS X has going for it that I desperately want in windows: the search box in the top right corner of almost every application window. You can see it in Finder, Spotlight, the Mail program, System Preferences, iCal, iTunes and tons of other programs. In each case, the program indexes its contents (the song names in iTunes, your email in Mail, etc) and as you type something into the search box, it instantly filters the results to just items that contain the search terms. It makes launching a program, finding files, finding emails, etc extremely quick and efficient. Its available to some extent on Windows with third party apps such as Launchy and Google Desktop, but system wide integration in OS X is incredibly nice.
OS X comes preloaded with a ton of software. Given that Microsoft was sued for including Internet Explorer with Windows, I dont know how Apple gets away with it, but OS X users should be happy. Some of the software I really like: iTunes is a very solid media manager. The Mail program and iCal blow away Outlook and its calendar, and you only get Outlook if you shell out extra money on MS Office. iMovie (from watching others use it) seems very impressive, especially when stacked up against Windows Movie faker.
iPhoto, iChat, and Safari Im less thrilled with. They get the job done, but arent anything out of the norm. Widgets (which are available for XP and Vista) I dont like on any OS. The Preview app, which is unique only for its "cover flow" ability is very pretty, but honestly, fairly useless. Thumbnail view, while not as pretty, is a much more efficient way to find something visually. Finally, spaces is a neat (although very old) idea, and the execution is decent, but as I have multiple monitors at work, I have no use for it. I also havent tried GarageBand or Time Machine yet, although I hear good things.
OS X can also be fairly intelligent and well integrated. It does a lot for you (sometimes too much) that can be quiet useful. For example, as soon as you plug a monitor into the DVI port, it turns it on and extends your desktop onto it. In Windows, Id have to dig through several annoying menus (which differ widely depending on your video card) to enable the second monitor. If you highlight a date or time in the Mail program it gives you the option to add an event for that time to iCal. If you have an icon for your user in OS X, Adium (a nice multi protocol chat client) will automatically use it as your buddy icon. Network computers are effortlessly visible in Finder which, as odd as it sounds, can sometimes make it easier to connect to even Windows networks on a Mac.
The Software - The Bad
Given the specs, OS X wasnt as responsive as Id expect. Its by no means slow, but when launching apps and multitasking, theres a small amount of lag. I would guess that, like Windows Vista, all the extra graphical effects cause a bit of a slowdown.
Some small keyboard issues really irritate me on OS X. I understand the Apple button replacing the Windows button, but the changes are far deeper than that and oddly inconsistent. For example, if you push the Alt button in Windows, it highlights a menu at the top of the application. Alt + F often highlights the File menu. You can then use your arrow keys to browse the menu. OS X, as far as I can tell, doesnt have this. You either need to know the keyboard shortcut ahead of time or use the mouse.
The home and end buttons go to the beginning and end of a page, which is unlike every other OS on the planet, where they go to the beginning and end of a line. To emulate the proper behavior of home and end in OS X, you have to use apple button + arrow keys. This is an awkward combo to push and in Firefox, this actually will activate the back and forward buttons of the browser, which is a serious issue! Moreover, when using Firefox, instead of CTRL + T to open a new tab, you use Apple + T. But to switch between tabs, its CTRL + Tab, same as in Windows. Obviously, some of this frustration is just the pain of switching between OSs, but a lot of it is inconsistent and illogical and could have been avoided.
Another odd thing is that when you close a program by clicking the red circle in the top left corner (the x)... it doesnt actually close. The window disappears and makes you think the program is closed, but secretly, the program keeps running. Your only clues are that the program still shows up when you Apple + Tab between programs. To actually close it, you have to use the menu or push Apple + Q. This seems like a very non user-friendly design, which is odd coming from Apple.
Browsing for files in Finder - largely because of the way user accounts are handled in Unix - is a bit unintuitive as well. Its often hard to see the proper file hiearchy, its even more difficult to see files above your users file hiearchy (this is somewhat by design) and the shortcuts in the left pane ("Macintosh HD", "Desktop", "Applications") only add to the confusion as you have no idea where in this hiearchy they fit. This is painful to someone coming from Windows, where Im used to seeing every file and folder on the entire system. It is somewhat mitigated due to the wonderful aforementioned search feature but the file layout really should be cleaner.
Conclusion
Despite everything I say above, to be perfectly honest, during day-to-day usage, there is not much difference between OS X 10.5 and Windows XP. In the end, Im still browsing the web with Firefox, coding in Eclipse, browsing files and folders, typing commands at a prompt and so on. Despite all the marketing hype, these two OSs are not polar opposites. They both do a few things very well and a few things very poorly. Everything in between - which is probably 98% of what you do with your computer anyway - is a matter of personal preference.
Personally, I would not buy a Mac for myself for a few of reasons:
* I build my own PCs, out of just the parts I want, which you cant really do with a Mac, although thats slowly starting to change as Macs use more and more standard hardware.
* Macs have far fewer games available.
* Actually, in general the amount of software available for the PC is greater than for the Mac. This is largely because the PC market is so much larger, but its certainly worth considering.
Apple has come a long way from the original iMac and Im relieved to say that OS X is a very solid OS. Given that the pre ~10.2 Mac OSs used to make me gag, this is pretty high praise. And who knows, maybe after using it for long enough at work, itll start to grow on me. Or drive me nuts. Well see.
Monday, January 26, 2015
The AS3 this keyword and how to randomize the size of a MovieClip instance on the stage
In this lesson, well learn about the this keyword. But before I explain what the this keyword is, lets first recall that we can put some ActionScript code on keyframes in the main timeline. But we can also put some ActionScript code on the keyframes inside MovieClip symbols as well. If we place ActionScript code on the keyframes inside of MovieClip symbols, then it means that the code is inside the MovieClip symbols timeline, instead of being on the main timeline.
Its important to take note of this, because the this keyword references whichever object the this keyword is placed in. Is it within the code in the main timeline, or is it within the code nested inside a MovieClip symbol instead? If we placed the this keyword within the code inside one of the keyframes in the main timeline, then the this keyword will refer to the main timeline. If the this keyword was placed inside the timeline of a MovieClip symbol, then the this keyword will refer to the instance of the MovieClip symbol instead (or instances, if there are more than one). So what this is, depends on where this is.
To hopefully make things a little more clear, lets create an example.
Step 1
Create a new Flash ActionScript 3.0 document.
Step 2
Select the first keyframe of the main timeline, then open up the Actions Panel.
Step 3
In the script pane, type:
Lets try to trace this to see what it will output. Basically, when we create this trace statement, its like we are asking: what is this?
And in this example, the answer to that is: the main timeline. Since we selected the first keyframe of the main timeline when we added the code, this means that our code is on the main timeline. So in this example, this refers to the main timeline.
Step 4
Test the movie.
In the output window, you should see the message: [object MainTimeline]. So the message in the output window confirms that the this keyword in our example refers to the main timeline. It refers to the main timeline since the this keyword was placed in one of the frames of the main timeline. When using the this keyword, this refers to wherever this is.
Step 5
Now lets try placing the this keyword inside a MovieClip symbol instead. But first, go back to the actions panel and erase the trace statement that we placed on the main timeline so as not to make things confusing when were trying to trace the MovieClip objects were about to create.
Step 6
Next, lets create the symbol.
Using the oval tool, draw a circle on the stage and convert it into a MovieClip symbol named Circle.
Step 7
Then give the MovieClip instance an instance name.
Make sure that the instance on the stage is selected (do NOT double-click on it because that will bring you inside the MovieClip symbols timeline). Once its selected, go to the properties inspector and type circle1_mc in the instance name input field.
Step 8
Now, lets add some ActionScript inside the MovieClip symbols timeline.
This time, you can double-click on the MovieClip instance on the stage in order to go inside the MovieClip symbols timeline.
Step 9
Double-check that you are, in fact, inside the MovieClip symbols timeline by looking at the edit bar. The edit bar should say Scene 1 > Circle.
Step 10
Once youve confirmed that you are inside the MovieClip symbol, add another layer on the timeline, and name it Actions.
Remember: this timeline belongs to the MovieClip symbol. We are not on the main timeline.
Step 11
Then select the first keyframe of the Actions layer, then go to the actions panel and type:
Here, we are not simply referencing this, but specifically, we are tracing its name. You can use the this keyword to access properties and methods of objects as well. Basically, in this example, our trace statement is trying to ask: what is the name of this object?
Since the statement that contains the this keyword is inside the MovieClip symbols timeline, its going to output circle1_mc in the output window. The this keyword references objects or instances that contain it. So the this keyword is going to refer to the specific instance of the MovieClip symbol on the stage, and not the symbol in the library. This is why its going to output circle1_mc (which is the instance name), and not Circle (which is the symbols name).
Step 12
Now lets go back to the main timeline by clicking on the scene 1 link.
Step 13
Once we are back on the main timeline, go to the library and drag another instance of the Circle symbol onto the stage. Give this one circle2_mc for its instance name. Since this is also an instance of the Circle symbol, its also going to have the same trace statement inside it already. Whatever code you have inside the timeline of a MovieClip symbol will also be inside any of its instances that are on the stage. There is no need for us to add it again. So when we test the movie, Flash is also going to output the name of this second instance in the output window.
Step 14
Go ahead and test the movie.
You should see the names circle1_mc and circle2_mc displayed in the output window.
Why would we want to use the this keyword?
Sometimes, you might want to place some code inside a MovieClip symbols timeline. That way, every single instance of the MovieClip symbol will have the same code inside it when you place it on the stage. This saves you some time, because you wont have to repeatedly type the same code over and over. You just have to put it inside the MovieClip symbols timeline once, and then every instance of that MovieClip symbol will have the code already placed inside it. The this keyword lets us explicitly tell Flash that our code is meant for that specific instance that contains the this keyword.
Lets see this in action by adding more code to our example.
Step 15
Go back inside the Circle MovieClips timeline by double-clicking any of the instances on the stage. Then select the first keyframe of the Actions layer and open up the Actions Panel.
Step 16
Remove the trace statement, and add these lines of code in its place:
Here, weve added some lines of code that will increase the size of each instance of the MovieClip symbol that we place on the stage. Basically, the code is saying: scale this to 3 times its original size. So when the Flash movie runs, the MovieClip instances on the stage will be 3 times larger.
Step 17
Go back to the main timeline, by clicking on the scene 1 link.
Step 18
From the library, add more instances of the Circle MovieClip symbol until you have ten instances on the stage.
Step 19
Test the movie.
You should see that each circle is now three times larger than its original size. Since we placed the code inside the MovieClip symbols timeline, instead of the main timeline, then we only had to write those lines once, and each instance will have the same lines of code built-in. This is why every single instance of the Circle MovieClip became bigger.
Step 20
In this next step, well modify the code so that each instance of the Circle MovieClip will have a different, randomized size.
Go back to the Circle MovieClip symbols timeline by double-clicking any of the instances on the stage. Then select the first keyframe of the Actions layer and open up the Actions Panel.
Step 21
In the script pane, replace the current code with this:
The first line of code creates a variable named nScale. And then to this variable, we are assigning the expression Math.random() * 3. What this does is it generates a random number that can be anywhere between 0 and 3. If you want Flash to choose from a higher range of values, then simply replace 3 with a higher value (but dont make it too high since we are going to use it to scale the size of the objects). Then once that random number is generated, the number is assigned to the scaleX and scaleY properties. This is going to happen for each instance of the Circle MovieClip that we have on the stage. So chances are, theyll each generate a different value, thus making them all have different sizes once the Flash movie runs.
Step 22
Test the movie and you should see your circles all in different sizes. And since the values are generated randomly, youll see different sizes every time you test the movie.
Read more »
Its important to take note of this, because the this keyword references whichever object the this keyword is placed in. Is it within the code in the main timeline, or is it within the code nested inside a MovieClip symbol instead? If we placed the this keyword within the code inside one of the keyframes in the main timeline, then the this keyword will refer to the main timeline. If the this keyword was placed inside the timeline of a MovieClip symbol, then the this keyword will refer to the instance of the MovieClip symbol instead (or instances, if there are more than one). So what this is, depends on where this is.
To hopefully make things a little more clear, lets create an example.
Step 1
Create a new Flash ActionScript 3.0 document.
Step 2
Select the first keyframe of the main timeline, then open up the Actions Panel.
Step 3
In the script pane, type:
trace(this);
Lets try to trace this to see what it will output. Basically, when we create this trace statement, its like we are asking: what is this?
And in this example, the answer to that is: the main timeline. Since we selected the first keyframe of the main timeline when we added the code, this means that our code is on the main timeline. So in this example, this refers to the main timeline.
Step 4
Test the movie.
In the output window, you should see the message: [object MainTimeline]. So the message in the output window confirms that the this keyword in our example refers to the main timeline. It refers to the main timeline since the this keyword was placed in one of the frames of the main timeline. When using the this keyword, this refers to wherever this is.
Step 5
Now lets try placing the this keyword inside a MovieClip symbol instead. But first, go back to the actions panel and erase the trace statement that we placed on the main timeline so as not to make things confusing when were trying to trace the MovieClip objects were about to create.
Step 6
Next, lets create the symbol.
Using the oval tool, draw a circle on the stage and convert it into a MovieClip symbol named Circle.
Step 7
Then give the MovieClip instance an instance name.
Make sure that the instance on the stage is selected (do NOT double-click on it because that will bring you inside the MovieClip symbols timeline). Once its selected, go to the properties inspector and type circle1_mc in the instance name input field.
Step 8
Now, lets add some ActionScript inside the MovieClip symbols timeline.
This time, you can double-click on the MovieClip instance on the stage in order to go inside the MovieClip symbols timeline.
Step 9
Double-check that you are, in fact, inside the MovieClip symbols timeline by looking at the edit bar. The edit bar should say Scene 1 > Circle.
Step 10
Once youve confirmed that you are inside the MovieClip symbol, add another layer on the timeline, and name it Actions.
Remember: this timeline belongs to the MovieClip symbol. We are not on the main timeline.
Step 11
Then select the first keyframe of the Actions layer, then go to the actions panel and type:
trace(this.name);
Here, we are not simply referencing this, but specifically, we are tracing its name. You can use the this keyword to access properties and methods of objects as well. Basically, in this example, our trace statement is trying to ask: what is the name of this object?
Since the statement that contains the this keyword is inside the MovieClip symbols timeline, its going to output circle1_mc in the output window. The this keyword references objects or instances that contain it. So the this keyword is going to refer to the specific instance of the MovieClip symbol on the stage, and not the symbol in the library. This is why its going to output circle1_mc (which is the instance name), and not Circle (which is the symbols name).
Step 12
Now lets go back to the main timeline by clicking on the scene 1 link.
Step 13
Once we are back on the main timeline, go to the library and drag another instance of the Circle symbol onto the stage. Give this one circle2_mc for its instance name. Since this is also an instance of the Circle symbol, its also going to have the same trace statement inside it already. Whatever code you have inside the timeline of a MovieClip symbol will also be inside any of its instances that are on the stage. There is no need for us to add it again. So when we test the movie, Flash is also going to output the name of this second instance in the output window.
Step 14
Go ahead and test the movie.
You should see the names circle1_mc and circle2_mc displayed in the output window.
Why would we want to use the this keyword?
Sometimes, you might want to place some code inside a MovieClip symbols timeline. That way, every single instance of the MovieClip symbol will have the same code inside it when you place it on the stage. This saves you some time, because you wont have to repeatedly type the same code over and over. You just have to put it inside the MovieClip symbols timeline once, and then every instance of that MovieClip symbol will have the code already placed inside it. The this keyword lets us explicitly tell Flash that our code is meant for that specific instance that contains the this keyword.
Lets see this in action by adding more code to our example.
Step 15
Go back inside the Circle MovieClips timeline by double-clicking any of the instances on the stage. Then select the first keyframe of the Actions layer and open up the Actions Panel.
Step 16
Remove the trace statement, and add these lines of code in its place:
this.scaleX = 3;
this.scaleY = 3;
Here, weve added some lines of code that will increase the size of each instance of the MovieClip symbol that we place on the stage. Basically, the code is saying: scale this to 3 times its original size. So when the Flash movie runs, the MovieClip instances on the stage will be 3 times larger.
Step 17
Go back to the main timeline, by clicking on the scene 1 link.
Step 18
From the library, add more instances of the Circle MovieClip symbol until you have ten instances on the stage.
Step 19
Test the movie.
You should see that each circle is now three times larger than its original size. Since we placed the code inside the MovieClip symbols timeline, instead of the main timeline, then we only had to write those lines once, and each instance will have the same lines of code built-in. This is why every single instance of the Circle MovieClip became bigger.
Step 20
In this next step, well modify the code so that each instance of the Circle MovieClip will have a different, randomized size.
Go back to the Circle MovieClip symbols timeline by double-clicking any of the instances on the stage. Then select the first keyframe of the Actions layer and open up the Actions Panel.
Step 21
In the script pane, replace the current code with this:
var nScale:Number = Math.random() * 3;
this.scaleX = nScale;
this.scaleY = nScale;
The first line of code creates a variable named nScale. And then to this variable, we are assigning the expression Math.random() * 3. What this does is it generates a random number that can be anywhere between 0 and 3. If you want Flash to choose from a higher range of values, then simply replace 3 with a higher value (but dont make it too high since we are going to use it to scale the size of the objects). Then once that random number is generated, the number is assigned to the scaleX and scaleY properties. This is going to happen for each instance of the Circle MovieClip that we have on the stage. So chances are, theyll each generate a different value, thus making them all have different sizes once the Flash movie runs.
Step 22
Test the movie and you should see your circles all in different sizes. And since the values are generated randomly, youll see different sizes every time you test the movie.
Subscribe to:
Posts (Atom)