Adobe Flash CS5.5 and AS3 – Click event from frame 1 that calls frame 2 causes click event in frame 2 to fire also

If you compile your game with Flash Player 9 (Publish Settings), this is not an issue. When the Flash Player is set to 10 and above is when propagation occurs.

To prevent this from happening, add the following code…

event.stopPropagation();

…to the top of the function that handles your first click event. This will stop propagation of the next click in the subsequent frame.

Related API Elements

flash.events.Event.stopImmediatePropagation()

flash.events.Event.preventDefault()

Please follow and like us:

Adobe Flash Plugin – Can’t install Flash Player

One day, out of the blue, I couldn’t seem to play embedded flash on the web. An error insisted I needed to install the correct version of flash. I proceeded to do so, but the install kept failing. Somehow I inherited a damaged windows system registry. I did some research and found a solution.

If you are having this issue, give it a try.

http://kb2.adobe.com/cps/494/cpsid_49419.html

Note: Visit the Adobe Flash Player Help and Support page for help with top issues. Make sure to uninstall Flash Player, restart your computer, and install the latest version of Flash Player before continuing with the recommendations in this article. For more information, see “Troubleshoot Flash Player installation | Windows” (TechNote 19166).

Issue

A damaged Windows system registry or incorrect registry permissions settings may prevent you from installing Flash Player.
Symptoms may include:
  • During installation, you see the error message “Failed to install. For Troubleshooting please see: http://www.adobe.com/go/tn_19166.”
  • Your Flash Player installation finishes with no error, but you cannot view Flash content in Internet Explorer.
  • Some sites tell you that you do not have the correct version of Flash Player, even though you have installed the latest version.
  • Some sites tell you to reinstall Flash Player, but after you do so, you see the same message.
Permissions can be tricky, but in most cases, you can install and use Adobe Flash Player if you are logged into a Windows Administrator account. If you don’t know how to do this, check with your system administrator, or read your Windows documentation.
Make sure to uninstall Flash Player, restart your computer, and install the latest version of Flash Player before continuing with the recommendations in this article. For more information, see “Troubleshoot Flash Player installation | Windows” (TechNote 19166).

System administrators

If you are a system administrator, see the “Advanced Troubleshooting” section of “Troubleshoot Flash Player installation | Windows” for information about permissions and registry key issues that can block the installation of Flash Player.

Solution

Warning! By following the directions below, you will modify the Windows System Registry. A mistake could cause serious system damage, which may require you to reinstall your operating system.
If you are not comfortable editing the registry, get help from your system administrator or another IT professional.
If you choose to proceed, first back up your entire hard drive, and create a Windows System Restore Point.
Adobe Systems cannot be held responsible for damage resulting from your following these instructions.
Note: The following solution is not required for Flash Player 10 and above. These registry changes were included in the Flash Player uninstaller and can be downloaded here.
  1. Make sure you are logged into a Windows Administrator account. If you are not, you will not be able to use SubInACL.
  2. Download SubInACL from the Microsoft Download Center.
  3. Follow the installation instructions. Make sure you install SubInACL (subinacl.exe) to the directory C:Program FilesWindows Resource KitsTools.
  4. Download the reset_fp10.zip file.
  5. Open the fp10.zip file and extract the reset_fp10.cmd file to the directory C:Program FilesWindows Resource KitsTools.
    Both this file and SubInACL (subinacl.exe) must be in this directory.
  6. Double-click reset_fp10.cmd. A command window will open, and SubInACL will run.
    Do not use the machine while SubInACL is running.
  7. After SubInACL finishes, you will see a prompt “Press any key to continue”.
  8. Install Flash Player from the Flash Player download page.
  9. To confirm that your installation succeeded, visit the About Flash Player page. At the top of the screen, you should see a message that reads “Adobe Flash Player Successfully Installed.”
Please follow and like us:

Host Domain – How to prevent or allow directory listing on your host domain

There is a very simple way to prevent people from seeing your directory listing via the web browser’s address bar. You can prevent it at the root level (www) or inany sub level folder. All you need is a file called .htaccess

Note: It may seem that .htaccess is a file extension and the filename to the left is missing, but this is not the case. The actual name of the file is .htaccess

Bare minimum, all you need is one line of text:

Options -Indexes

If you do not want to prevent directory listings:

Options +Indexes

Let us say you do not care if people see what is in your directory, but want to restrict certain file types. You can control what files are seen by using the IndexIgnore option.

So, let’s say you want to prevent people from seeing shock wave files *.swf and PHP files *.php

You can code it like this:

Options +Indexes
IndexIgnore *.swf *.php

Note: Separate each file extension with a space.

That’s all!

Please follow and like us:

Toon Boom Animation – Rotate an object from a camera angle skewing the camera

Issue: You have this record player. The record is round and rotates as you designed it. So far so good.

You attempt to skew the entire object (we are just going to skew the record for demonstration purposes) to give the impression of a camera angle.

 

The problem is that when you run the animation, the record does not spin correctly based on the record skew, but instead wobbles all over the place.

 

 

 

 

 

Instead of skewing the object, you the skew the camera instead. This way, the object, being the record on the record player, still rotates as designed. Skewing the camera imitates positioning the camera on the angle you desire to capture. The problem is that you can’t use the skew tools that you use for skewing objects. You must use the advance tools instead.

 

Where is this toolbar? See below

Now, we can skew our camera instead.

First, select the camera layer and create a key frame:

Select the skew in the advanced animation tools




So far, we should like this:


Now, hover the mouse over the yellow frame at the bottom and drag right. It should now look like this:

 

Using the skew for objects, adjust your record player, record, and record arm.

 

It should now look like this:
Notice how the purple background is skewed also. Just make sure the background extends your camera lens to hide the trick of skewing the camera.

Now, play your animation and watch as your record spins as it should.

 

 

 

Please follow and like us:

Microsoft Visual Studio – How to extract characters from a data string

Let’s say you have a string of data from a credit card that you swiped using a credit card swiper device. In the standard formatted string of data that is received into your string variable from the credit card, you want to extract the credit card number and expiration date in order to populate a windows form.

The following demonstration walks you through this scenario using class methods provided to you by Microsoft’s DLL libraries.

Let’s say you have a string of data from the card swiper that looks like this:

CreditCardData  = 1234567890123456^JOHN DOE^1206XXXXXXXXXXXXXXXXXXXXXXXXXX
The first 16 characters is the credit card number.

The name is JOHN DOE between the two carrots ‘^’.

The expiration year is 12 and the month is 06 after the second carrot ‘^’.

First, let’s find the starting position of the first carrot ‘^’ so we can grab the credit card number. The credit card number is prior to the first carrot ‘^’.

We can use the Strings.InStr method:

Dim mFindCarrotBeforeName As Integer = Strings.InStr(_CreditCardData, "^")
mFindCarrotBeforeName value should be 17.

Now we know how to get the credit card number. Using mFindCarrotBeforeName, we can use the Strings.Left method.

Dim mHoldCreditCardNumber As String = Strings.Left(_CreditCardData, (mFindCarrotBeforeName - 1))

The credit card number should be everything starting at the left of the string for a length of 16 (mFindCarrotFirstCarrot – 1= 16)

Now to simplify things, let’s remove everything from the start of the string up to the name. The following statement results in removing the credit card number plus the first carrot using the mFindCarrotBeforeName integer value of 17.

Dim mRemoveUpToName As String = _ CreditCardData.Remove(1, mFindCarrotBeforeName)

mRemoveUpToName should now contain the following:

JOHN DOE^0612XXXXXXXXXXXXXXXXXXXXXXXXXX

Now we know how to get past the name to determine the starting position of our expiration year and month. Using mRemoveUpToName, we can use the Strings.Instr method to get the first carrot ‘^’.

Dim mFindCarrotAfterName As Integer = Strings.InStr(mRemoveUpToName, "^")

mFindCarrotAfterName value should be 9.

Now we know how to get the expiration year and month. Using mFindCarrotAfterName, we can use the Strings.Mid method.

Dim mYearMonth As String = Strings.Mid(mRemoveUpToName, (mFindCarrotAfterName + 1), 4)

This statement says, using the mRemoveUpToName string,

(JOHN DOE^1206XXXXXXXXXXXXXXXXXXXXXXXXXX)

Starting at position 10 (mFindCarrotAfterName + 1 = 10), get me the 4 character expiration year and month.

mYearMonth should now = 1206

Lastly, I want to reverse the order of the Year and Month. Using again the Strings.Mid and Strings.Left, I can accomplish this in the following statement:

Dim mHoldExpirationDate As String = (Strings.Mid(mYearMonth, 3, 2)) & (Strings.Left(mYearMonth, 2))

mHoldExpirationDate now equals 0612.

Please follow and like us:

Adobe Flash CS5.5 and AS3 – Can’t disable a textField in Flash?

Other controls such as the combox box, numeric stepper, checkbox, and radio button can be disabled

(shaded light grey and can no longer be interacted with) via the designer or programmatically if desired.

What about the textField? As you can see from the properties windows (below) at design time, there

is no property to enable or disable, nor does trying to assign true or false to the textField

programatically work either.

(txtField.enabled = true;) or (txtField.enabled = false;)

After doing some research, the alternative that I found was to simply just change the type of the textField.

For example: This textbox designed on the stage shows no blinking cursor because it is

defined as dynamic in the properties window of the designer.

 

 

Depending on some criteria, you may want to enable the textField so the user can enter anything into the control

You can do this programatically.

Let’s say you want to toggle the user’s capability to enter data into the control based on a boolean.

By changing the textField type from ‘input’ to ‘dynamic’ will create the desired results. ‘dynamic’ will not

allow the cursor to enter the textField thus preventing the user from entering data.

if (checkboxStatus == true)
{
  textField.type = 'input';
} else {
  textField.type = 'dynamic'
}

 

 

Please follow and like us:

Microsoft Outlook – How to unblock a file extension that Microsoft Outlook (Office 2007) won’t allow to be read or sent

You can define what outlook blocks or does not block by using this registry key

[HKEY_CURRENT_USERSoftwareMicrosoftOffice12.0OutlookSecurity]

“Level1Remove”=”.mdb;.zip;.exe;.url;.reg;.app”

Add to “Level1Remove” all extensions you do not want Outlook to block.

See the following article for more detail.

http://support.microsoft.com/kb/829982

Please follow and like us:

SQL Server – How to inner join a table to receive just one row of that table where a field is MAX. For example, has the greatest date.

This SQL statement will produce one row for each record found on the account_table for a given account number

We want also want to join the name and address table to the row. We only want one row from the transaction table (there are many)

that has the greatest transaction date and add it to our row as TransactionDate.

Here is how:

SELECT a.account_number, b.name_last, b.name_first, c.address, c.phonenumber, TransactionDate
FROM account_table a
LEFT OUTER JOIN
    (
    SELECT MAX(transaction_date) AS TransactionDate
    FROM transaction_table
    GROUP BY transaction_number
    ) groupedtt ON a. account_number = groupedtt. account_number 
LEFT OUTER JOIN name_table b on a. account_number = b. account_number
LEFT OUTER JOIN address_table c on a account_number = c. account_number 
where a. account_number = 'ACCT12345'
Please follow and like us:

Active Reports 6 – Sort a collection in Active Reports

In this example, we take an unsorted Product Collection called ProductCollection that is assigned

to our report Data Source. We instantiate another Product Collection for sorting called

sortedProductCollection. Using a Do Loop, we read the Product Collection and build the

sortedProductCollection in sorted order. When done, we overlay the ProductCollection

in the Data Source with our sortedProductCollection

‘Sort the Product Collection

Dim sortedProductCollection As New ProductCollection

‘A class that defines a collection

Dim mCounter = 0
Dim mLoopComplete = False

Do Until mLoopComplete = True
    For Each item As product In rpt.DataSource(0).ProductCollection
        If item.product_number.Value = mCounter + 1 Then
            sortedProductCollection.Add(item)
            Exit For
        End If
    Next
	
    mCounter += 1
	
    If rpt.DataSource(0).ProductCollection.Count = sortedProductCollection.Count Then
       mLoopComplete = True
    End If
Loop

rpt.DataSource(0).ProductCollection = sortedProductCollection
Please follow and like us:

SQL Server Reporting Services (SSRS) – Multiple IIf statements in an expression behind a textbox

Instead of using a code behind for simple decisions, you can use unlimited multiple IIf statements in an expression behind a textbox.

For example, let’s say you have a parameter called HoldType that can have 3 different values, (1, 2, or 3). Depending on the value, you may want to make an entire row of a report visible or not depending on these values.


To do this, use an IIf statement to interrogate a value and then assign an action to that value. In the case of only 2 different scenarios, you would simply type a comma and the alternative action. But what if like in this example there is more than 2 scenarios. You simply begin another IIf statement after the comma. You can keep adding multiple IIf statements until all scenarios are handled, and then simply add the default action after the comma of the last IIf statement as you would normal do with a single IIf statement.

The statement below demonstrates the visibility of a textbox on the report.

If HoldType is “1” then don’t hide the row, ELSE if HoldType is “2” then hide the row, ELSE don’t hide the row for any other value.

=IIf(Parameters!HoldType.Value = "1", FALSE, IIf(Parameters!HoldType.Value = "2", TRUE, FALSE))
Please follow and like us: