how to create dynamic button in actionscript

 

At first, it is a very simple tip.Maybe… anybody knows how can we create dynamic button in flash as we create textfield dynamically using this MovieClip.createTextField(), In this article, it shows how to creat dynamical button in actionscript. No design tools will be used, it is just actionscript code. Ok, let’s see the following code, hope it is what you are looking for and will be helpful to you.

 

  1. // paint
  2. var G:Array = [[0, 0], [80, 0], [80, 20], [0, 20], [0, 0]];
  3. this.createEmptyMovieClip(“btn”,0);
  4. btn.beginFill(“0x000000”,100);
  5. for (i=0; i<G.length; i++) {
  6. i == 0 ? btn.moveTo(G[i][0], G[i][1]) : btn.lineTo(G[i][0], G[i][1]);
  7. }
  8. btn.endFill();
  9. // set button position
  10. btn._x = (Stage.width/2)-btn._width/2;
  11. btn._y = (Stage.height/2)-btn._height/2;
  12. // button methon
  13. btn.onRelease = function() {
  14. getURL(“http://ntt.cc”, “_blank”);
  15. };

Beginning ActionScript 3.0 – Calling Functions

 

Question piled upon a question. After we know how to define the functions, we need to know how to use it.

 

 

 

Calling functions

Remember the identifier that we declare in the function statement? Now, you can use the identifier to call the function.

In ActionScript, you call a function by using its identifier followed by the parentheses operator (()). You use the parentheses operator to enclose any function parameters you want to send to the function.

Turn back to our example code, and focus on the center section.

  1. trace(”============Mathematics==========”);
  2. printScore(math);
  3. trace(”============History==========”);
  4. printScore(history);
  5. trace(”============Music==========”);
  6. printScore(music);

In this code, we use the printScore() three times with different parameters, the first time is math, then history and the third is music.

The statement:

  1. printScore(math);

means we call the printScore function here, and pass the math variable as parameter to the printScore function.

After you know how to call the functions in your code, there is also something you need to notice when you call the function.

The first thing is keep the number of parameters the same with the function definition. That means if you declare one parameter, you should pass one parameter when you call the function. If you use two or more parameters, or you don’t pass any parameters, you’ll get an error from the compiler.

For example, if we call the printScore function without parameters, we’ll get the following result.

 

The second thing is about the data type.

Suppose we define a function to join two strings like the following:

  1. function concat(stringA:String, stringB:String):String {
  2. return stringA+stringB;
  3. }

Now, we declare two formal parameters, stringA and stringB, and both of them are String type. So, if we use the following calling statement:

  1. concate(1,2);

we’ll get compiler errors.

 

Because, we use type int values inside the calling statements, while the function definition says they should be String type. So, when you calling functions, remember use the same type with the formal parameters.

In this example, we can change into:

  1. concate(”1″,”2″)

The third one is about the order.

Eh, when you declare two or more formal parameters inside your function, please remember the order, which means when you using the calling statements you should keep the parameters the same order with the definition.

For example, if you declare a function like this:

  1. function concate(integerA:int, stringB:String):String {
  2. return integerA.toString()+stringB;
  3. }

Then, in the calling statement, you should keep the parameters in order, type int should be first, followed by the string type value.

  1. concate(1,”2″)

Remember, the compiler is not so smart. The compiler will check the parameters one by one. So, you need to keep the same number, the same type, and the same order J…

Security Sandbox Improved Malware Protection In Adobe’s Reader Software

 

Nearly one week ago, M86 reported Adobe’s ActionScript and JavaScript Languages Navigate Around Traditional Anti-virus Platforms, Adobe on Tuesday previewed forthcoming security technology in the next major release of its Reader software, Adobe is taking to help protect users from attacks in a rapidly evolving threat landscape: Adobe Reader Protected Mode, –the name was borrowed from the security feature in Microsoft Internet Explorer.

 

 

Not only Flash Player, but also Adobe Reader and Acrobat are widely installed applications for reading and creating PDF files. Over the past 18 months, Adobe Reader users have been repeatedly hammered by hackers pushing attack code that targets un-patched security bugs in the application. The sandbox architecture called “Protected Mode” to defend the system can against vulnerability exploits in Adobe Reader, and the processes such as JavaScript and image parsing, 3D rendering in separate areas will be confined to prevent malicious.

Scheduled for inclusion in the next major version release of Adobe Reader, Protected Mode is a sandboxing technology based on Microsoft’s Practical Windows Sandboxing technique. It is similar to the Google Chrome sandbox and Microsoft Office 2010 Protected Viewing Mode.

Brad Arkin, Adobe’s senior director of product security and privacy said:

“With Adobe Reader Protected Mode enabled (it will be by default), all operations required by Adobe Reader to display the PDF file to the user are run in a very restricted manner inside a confined environment, the ’sandbox,’”

 

Reader and all plugins code will run in the sandbox. The actions such as writing to a user’s temporary folder are not permitted. Malicious code sneaks onto a computer by successfully exploiting a hole in Adobe reader be contained within the sandbox. Arkin said,

“Even if an attacker is able to take over Adobe Reader you’ll be protected,”

Because the vast majority of Adobe Reader downloads and exploits are on Windows, Adobe’s sandbox is Windows-only and will initially be limited to blocking write operations, there are no plans to add this feature to the version for Mac.

The sandboxing approaches that Microsoft has pioneered in Office, including the sandbox for its search subsystem, the MOICE sandbox, and Protected View, are there to improve the overall state of security on Windows. Adobe has been working closely with the Microsoft Office security team — Microsoft’s and Adobe’s products compete on many fronts, but it makes sense for Redmond to help its partners in the area of security.

 

Of course, it won’t be effective for users who don’t upgrade even if Adobe is successful in developing a rock-solid sandbox for Reader, so automatic updating is considered to promote better security than manual updating.

In fact, it has been understood for a long time now that allowing remote code execution is dangerous, Adobe Reader, Acrobat and Flash are all known to create additional vulnerabilities when you install them on your system. If you don’t want to wait for the Adobe Protected Mode, the products such as FoxIt Reader and Nuance PDF Reader with similar security contorls are available for windows users.

Anyway, as what Arkin said:

“It’s an exciting new step, but it’s not the security cure-all that will fix all problems forevermore,”…

Content Marketing: What You Need to Know

 

Many business owners are turning to the web to help them market their business and there are plenty of good reasons for doing this. Many expert online marketers claim online marketing is less expensive than other types of marketing but also more effective. According to several online studies, people will search for a product or service online before they decide to buy it. What does the average consumer look for when searching for these products or services?

 

 

Well, for starters, they want more information about the product. They want to know they’re making a good purchase, what the product is used for and how to upkeep or maintain it. They are really looking for any additional information they can find about the industry, the product or the service, and this is exactly the need that content marketing meets.

While this type of marketing has been around for a long time, just look at the number of real estate magazines sitting around on coffee tables, it has only just recently reached the online world. Current online technologies allow anyone to become a writer or publisher (so long as you have interesting information to share).

All you have to do is write interesting articles about your industry, which can include information, explain how something is done or offer some type of tips and tricks. Remember, the Internet is about sharing knowledge, so, the more you have to share, the more of an expert you become in your industry.

Intangibles

Online content marketing can benefit anyone, because it creates information about your industry and links back to your website, creating what Phorm experts call the Phorm Rapid ORM (); showing all the content that links back to your website. This offers a kind of map for viewers to follow back to your service or product website.

However, this marketing method especially helps businesses that offer intangible products or services, as products like e-books, reports or videos can’t really be tasted, seen in a local magazine or book store, or picked up and held. These are products that can only be sold by being talked about, and the best person to talk about them on the web is you. After all, you are the expert on the matter!

How Does it Work? 

Content marketing is the process of writing and publishing information to blogs, online magazines and informational websites, and offering a link back to your website for readers to click on and get even more information. The key to being successful as a content marketer lies in offering engaging information which people will read, and creating interest in your industry, service or product (a process that isn’t as easy as it appears to be.)

Consistency 

For content marketing to be successful, you need to be consistent, offering information on a regular basis, and ensuring each piece of content links back to your services or product. This creates much of the support connecting people back to your website. Once they create this content rapport with you, and feel you are qualified to offer advice and news about your service or industry, then these readers often become your customers.…

Will HTML5 + CSS + JavaScript Really Be Flash And Silverlight Killer?

 

Before HTML5, although the dynamic user experiences can be done with with Javascript and AJAX, but the abilities of HTML in the different browsers was very limited and Flash leveraged this very well by provided richer user experiences, more dynamic pages and most important video.

 

 

HTML 5, the next version of HTML does provide a nice new standard for building dynamic and media rich applications, of course include video etc.

HTML5 technologies such as Canvas, for 2-D drawing on a Web page, are being promoted by heavyweights in the Internet space such as Apple, Google, and Mozilla and Aafari Browser.

Long long ago… hmm, I talked some about Flex vs. Ajax — both have their pros and cons, the history told us, when a new tech came, it would bring many chatters. I asked google, many chatter around the issue: Should developers and designers invest in HTML5?

Not sure YOU will agree them, but I try to collect some representational points.

Why HTML5 is worth your time

 

Eric A. Meyer on HTML5’s future and the skills developers need to acquire by Mac Slocum,

MS: Without getting into the “Flash killer” stuff, how does HTML5 compare to Flash?

EM: HTML5 itself and Flash are vastly different. They have different things that they’re trying to do. But the HTML5 plus CSS plus JavaScript package is more. I think that’s an easier comparison to make to Flash because Flash is supposed to be this total environment. You can put things on the screen and you can script it and you can define interaction. And HTML5-CSS-JavaScript lets you do that as well.

We got to the point a couple of years ago where the HTML-CSS-JavaScript stack can technically do just about anything that the Flash environment makes possible. It’s just a lot harder at the moment to do that in HTML5-CSS-JavaScript because Flash has about a decade’s head start on authoring environments.

There are a number of people, myself included, who have been observing for a while now that the current web stack feels like Flash did in 1996. Look at the canvas demos, for example. The canvas demos we’re seeing now are totally reminiscent of the Flash demos we used to see in the ‘96 era, where it was like: “Hey, look! I have three circles and you can grab one with a mouse and flick it. And then it bounces around the box and there’s physics and collision and animation and they’re blobby and woo hoo.”

The Future of Web Content – HTML5, Flash & Mobile Apps

 

I’m often asked “Will HTML5 replace Flash?” on the Web. The quick answer is no. However, there is a lot of nuance here and it’s helpful to make the distinction between two broad classes of content applications that are deployed in browsers.

First, there are what I would call Web Productivity Apps…

The second broad class of applications are what I would call Rich Media Apps…

HTML 5, Flash and SilverLight

 

It’s all going to be even worse with the upcoming Apple iPad, the most desirable tablet you can imagine. It really doesn’t matter how great competitive devices are going to be. Everybody wants an iPad anyway. The iPad will be a great device to give a way in competitions, as sales incentives etc… just because everybody wants to have one. However your favorite browser plugin will not work on the device!

Just imagine some of the following:
1. Your business is giving away iPads as a price, don’t you want your website to work on the device?
2. You are in charge of deciding …

Omniture’s Internet Analytics Tools Would Be Folded Into The Adobe Online Marketing Suite & ex-CEO Josh James To Step Down

 

Adobe Systems Inc. annonuced it will create new business unit to handle the most high-profile prudocts on this monday. Omniture, which provides an integrated set of services: advanced web analytics and segmentation, online business optimization platform, will be a part of Adobe’s new strategy: Adobe said Omniture’s Internet analytics tools would be folded into the Adobe Online Marketing Suite. Then, the founder and ex-CEO Josh James of Omniture will step down at the end of this month.

 

 

Playback: Adobe Acquired Omniture

On Oct. 23, 2009, Adobe Systems Incorporated completed its acquisition of Omniture, Inc. in a transaction valued at approximately $1.8 billion on a fully diluted equity-value basis. Adobe acquired all of the outstanding common stock of Omniture for $21.50 per share in cash.

Adobe believed the combination of the two companies will increase the value Adobe delivers to customers, for designers, developers, and online marketers, an integrated workflow. Below is some resources about that acquisition, which released by Adobe:

  • Adobe successfully completes tender offer for Omniture shares (PDF: 29k )
  • Adobe granted early termination of Hart-Scott-Rodino waiting period for Omniture tender offer (PDF: 28k )
  • Adobe commences tender offer for Omniture (PDF: 36k )
  • Adobe to acquire Omniture (PDF: 40k )

Shantanu Narayen, president and chief executive officer of Adobe said,

“Adobe customers are looking to us for solutions to deliver engaging experiences and more effectively monetize their content and applications online,”

“This is a game changer for both Adobe and our customers. We will enable advertisers, media companies and e-tailers to realize the full value of their digital assets.”

Some customers were encouraged by that news, largely because they believe that Adobe would bring a new level of rigor to product development, integration, and customer support.

 

 

Why Josh James To Step Down

Most time a departure can suggest trouble, but in a news release Adobe CEO Shantanu Narayen said Omniture is doing well for Adobe:

“With Omniture, Josh built the industry’s first integrated online marketing suite as an intelligent platform to optimize online business initiatives,”

“Omniture’s business has never been stronger and now accounts for about 10 percent of Adobe’s revenue,”

“This is due, in large part, to Josh’s leadership and we’re grateful for his contributions.”

Adobe didn’t explain the reason behind James’ departure, however, James’ departure was announced along with other executive changes at Adobe, and the move comes at an critical time for Adobe’s mobile strategy, it’s full of spatial imagination.

 

What James Will Do Next

In March, Omniture struck a deal with Facebook that enabled marketers to buy and measure Facebook media through Omniture’s search campaign management platform.

James also joined Demand Media’s board in mid-April. But it’s unclear whether James has taken a role with another firm and what he will do next.

 

 

Who Will Take Over James’ Responsibilities

Brad Rencher, who formerly was vice president of business operations for Omniture BU (OBU), will take over James’ responsibilities as vice president and general manager of the Omniture unit.

 

About Omniture

Omniture, Inc. is a leading provider of online business optimization software, enabling customers to manage and enhance online, offline and multi-channel business initiatives.

Omniture’s software, which it hosts and delivers to its customers as an on-demand subscription service and on-premise solution, enables customers to capture, store and analyze information generated by their Web sites and other sources and to gain critical business insights into the performance and efficiency of marketing and sales initiatives and other business processes.

In addition, Omniture offers a range of professional services that complement its online services, including implementation, best practices, consulting, customer support and user training through Omniture Education. …

RIM Blackberry Tablet Will Support Flash, rumor?

 

In the post Sencha Or Adobe Flash, What’s The Future Of Mobile Apps Developers was published yesterday, we mentioned that RIM confirmed and showed off a new web browser for the BlackBerry based on WebKit. In fact, rumors of a BlackBerry tablet have been circulating for months, following Flash Player 10.1 On The Upcoming Motorola Droid X, today “a source close to RIM” also confirmed the rumors haven’t covered yet: Blackberry Tablet Will Support Flash.

 

 

“Our source said that the BlackBerry tablet will indeed include Flash, and will have a hardware-based Flash accelerator.”

reported by betanews.

I don’t think “Support Flash” will be a news before Apple Steve Jobs outspokenly denied support for Adobe Flash. But now, everything is different.

 

June 2010, Adobe announced that the final version of Flash Player 10.1 has been sent to mobile platform partners, which included support for Android, webOS, Windows Phone, LiMo, MeeGo, Symbian, and, as expected, BlackBerry.

Rumors that Blackberry Tablet will have a 7-inch screen and run on a 1GHz processor, and include a front and back facing camera for video-conferencing.

No further details have been given about any possible date of launch, but speculation is that it would be released during the holiday season.

“Seasonal buying has done wonders for devices like the Motorola Droid which launched during last year’s holiday season and went on to become the best-selling Android phone to date,”

Tim writes.

Of course, nobody know what to make of any potential BlackBerry-powered tablet and how well it might do, but it would probably be a worthy alternative to the iPad for enterprise environments that already employ RIM’s line of smartphones.

If all are true, I think it would be interesting to see how Apple responds, don’t you think so?

In addition, iPhone made a huge success in the United States, but still behind BlackBerry in market share. Below is some market share data of smart phones.…

Five Free Web Based Applications for Businesses

 

It’s an understatement to say that technology has changed almost every facet of our lives and the same can be said for business. Currently, more and more companies are increasing their online presence just to keep in the game. There are millions of things to think about in the real world but companies need to read more on ways they can improve the efficacy of their business with SEO, web design, and helpful applications. Below is a list of five applications that are helping companies stay competitive and function smoothly and all of them are totally free.

 

 

Like everything else, Google seems to be ruling the waves when in comes to online apps and services. Google Calendar in one such app that many companies are currently employing. It lets you quickly create events for your schedule by typing everything into a box. There are other applications that have similar features but the thing about Google Calendar is it’s easy-to-understand/ user-friendly approach.

Another great freebie is 30 Boxes. It also works as an online calendar but you can add things like weather reports, to-do lists, Facebook, and other features to it. The cool thing about Google Calendar is how easy to use it is but 30 boxes is totally customizable. You can add people; share calendars, and gives summaries of your daily schedule. This app is constantly updating the things you can do with it and has proven a very handy tool.

Google Notebook is the perfect option if you’re trying to organize information on the web. It streamlines the process and lets your organize information and create “notebooks” so you don’t have a bunch of confusing links lumped together. Finding information, with Google Notebook, has been made incredibly easy because it breaks up info by sections and the interface is just as easy to use. This seems to be Google’s approach too much of what it does. By taking a lot of the guesswork out of things, people continue to flock to their services and products.

No business is complete without a good spreadsheet tool and Num Sum is one of the best. It’s at least worth a try and you can either insert formulas manually or use its system to help you out. You can also invite other people to collaborate on a spreadsheet as well as add charts. Check it out and see if it works for you.

As far as email goes, Gmail is a great service. It has a lot of attention and it’s really popular. One of the neatest features is through its use of labels rather than folders to help organize your emails. Hotmail and others ended up being really cluttered and confusing but through Gmail you can interact with other members through chat and easily separate and send out your correspondence. Through its categorization and sub-categorization and many other features, it’s one of the best tools on the web.

Check out some of these options if you want to make your company run smoother while saving. You don’t have to buy expensive programs where there are tools like these out there available to the general public. Many of these apps work just as well for the average person so check it out.…

Open@Adobe: Adobe Open Source Community On SourceForge’s New Platform

 

July 14th, 2010, SourceForge, the leading resource for open source software development and distribution, announced it has launched its new forge development platform. The SourceForge 2.0 beta is ready to roll right now. Open@Adobe, a site aggregating Adobe’s openness programs, which includes source code hosting has been the first instantiation of SourceForge’s new platform.

 

 

The new forge offers considerable flexibility, by allowing developers to integrate and use third party tools directly on the platform.

SourceForge Product Director Nate Oostendorp says,

“Once we have stability, feature parity, and a data migration path with the existing tools, the new forge tools will replace the existing developer interface.”

Senior Director of Engineering Dean Henrichsmeyer says,

“This is the next iteration of the SourceForge development tools and platform. We want to give you an early look as we continue to release early and often and build great new tools,”

 

Adobe Systems Incorporated has created the first instantiation Open@Adobe  on SourceForge’s new platform. Include source code hosting, such as the Adobe(R) Flex framework, and contributions from Adobe to standards organizations, as well as specifications.

Adobe said that they had always followed a open process model, with exposure to bug bases, open discussion forums, roadmaps for products, and early access through Adobe Labs. However, the current repository of them was not meeting the desire to allow projects to evolve in multiple directions simultaneously.

By utilizing SourceForge, Adobe benefits from SourceForge’s new forge platform and large global community, while saving time and resources required to maintain a large repository of code and documentation.

 

Dave McAllister, director of Open Source and Standards at Adobe says,

“Working with SourceForge gives us the chance to tap the innovative energy of one of the world’s largest open source communities,”

About Adobe Open Source

 

Adobe is very committed to open source community these years. SWF is open.  FLV is open. AVM is open-sourced.  Flex SDK is open-sourced, Blaze DS is open-sourced. And more and more open technologies/products from Adobe comes on their way.

Adobe works multiple ways to support open source activities. We work directly with contributions to existing projects, like SQLite, and Eclipse. We work indirectly by supporting Adobe products on open source operating distributions, supporting Reader and Flash on Linux distributions. We do pure research on development and make those implementations open source, such as the work with the Adobe Source Libraries. And we are releasing substantial code and products to open source.

About SourceForge

 

SourceForge is a web-based source code repository. It acts as a centralized location for software developers to control and manage open source software development. The website is operated by Geeknet and runs a version of SourceForge Enterprise Edition, forked from the last open-source version available.

The SourceForge website currently hosts more than 267,000 open source software projects and facilitates nearly three million downloads each day.

2 Years Old Adobe Air-based Twitter Client Tweetdeck Has been Downloaded 15 Million Times!!!

 

One of 15 Amazing Apple’s iPad Apps You Should Know, Adobe Air-based Twitter client Tweetdeck, celebrated its 2nd anniversary on July 4th with the amazing download times, including the fact that its desktop application, more than 15 million!!! This impressive download milestone are as many as 5 times bigger than its nearest competitor possible!

 

 

An interesting thing is, the TweetDeck iPhone app has had over 2.5 million downloads so far. Tweetdeck is the most popular desktop client for twitter now.

 

UK-based TweetDeck founder Iain Dodsworth put up a post commemorating the two year anniversary of TweetDeck and giving an update on the company’s progress.Tweetdeck now employs 15 people and recently raised more than $3 million in a series B round, led by betaworks. And The Android version of TweetDeck is said to have multi-streams.

We believe the future holds even more fast-moving streams of socially relevant information. Our mission is to help our users manage and harness these information flows. To that end, we are moving towards being truly multi-stream, re-building our clients from the ground-up with multi-stream functionality ingrained rather than simply bolting on new disconnected networks.

Our Android TweetDeck is a great example of our belief that “true multi-stream”, the intersection of social networks, can be infinitely greater than the sum of its parts – or to put it another way TweetDeck should be more about what your friends are saying rather than the networks they are using to say it.

According below numbers, Some four million tweets and status updates are sent out via the service every day. The service also covers 30,000 plus images are uploaded to various networks each day, through its apps (desktop, iPhone and iPad), along with over 4 million tweets, status updates and buzz’s made each day.

Some numbers:

  • desktop TweetDeck has been downloaded over 15 million times
  • iPhone TweetDeck has been downloaded over 2.5 million times
  • our servers are syncing over 7 million twitter search columns, adding 25,000 per day
  • 30,000 images are uploaded each day from TweetDecks
  • approximately 4 million tweets, status updates and buzz’s are sent out every day via TweetDeck
  • far and away the most popular desktop client for twitter, and if measuring in outbound tweets we are 5 times bigger than our closest competitor
  • general usage of TweetDeck indicates our userbase is super-engaged, extremely active and, in many cases, highly influential

About TweetDeck

 

TweetDeck is the best way to stay in touch with what’s happening now on Twitter for your iPad. TweetDeck’s iPad optimized interface shows you everything you want to see at once, so you can stay organized and up to date wherever you are.

TweetDeck is a version of the free desktop client that’s popular among Twitter power users. Multi column view is supported. You can customize to show messages from all your friends, @mentions, direct messages, saved searches and your Twitter lists. TweetDeck also shortens URLs.…