Environment:
Flash, Action Script 3
Scenario:
publishing FLA and getting the error "Error #1046: Type was not found or was not a compile-time constant: TextField"
Problem:
You have not imported everything you are including in your movieClip. For example if you are using dynamic textField inside your movieClip and you didn't imported the TextFiled class
Even if you create a dynamic text field and yet you didn't create the code to handle this dynamic text field you'll see this error.
Solution:
Import the the relevant class.
In this case:
import flash.text.TextField;
Sunday, May 23, 2010
Monday, May 17, 2010
TraceLog - Seeing the output window on-line
Trace Log
Trace Log is a free open source software that enables you to perform real-time monitoring on any server logs simultaneously. The main goal is to group all related log files into one tool so that you don't have search and dig for them. This tool enables you to attach any log files, such as Tomcat logs, WAS logs, IIS logs, etc.
If this is the first time you are use Trace Log, you need to configure and attach any necessary log files. Once attached, a configuration file will be stored locally in your user profile of that computer. The next time you use this software again, it will load the configuration automatically and you can begin monitoring the log contents immediately.
Related links:
Project home page | |
Required software | |
Trace Log | |
Java Runtime Environment (JRE) | |
Adobe Flash Player 10 — Debugger Version | Java Runtime Environment |
Edit > Options > Log Configuration > Log Files
Windows XP:
C:\Documents and Settings\ \Application Data\Macromedia\Flash Player\Logs\flashlog.txt
Windows 7:
C:\Users\Create a file named “mm.cfg” in one of the following locations:
§ Windows XP; C:\Documents and Settings\ \mm.cfg
§ Windows 7; C:\Users\ \mm.cfg
§ OSX; /Library/Application Support/Macromedia/mm.cfg
§ Linux; home/ /mm.cfg
Open the newly created mm.cfg file in a text editor and add the following text:
ErrorReportingEnable=1
TraceOutputFileEnable=1
The flashlog.txt file will be created in the following location:
§ Windows; C:\Documents and Settings\username\Application Data\Macromedia\Flash Player\Logs\flashlog.txt
§ OSX; /Users/username/Library/Preferences/Macromedia/Flash Player/Logs/flashlog.txt
§ Linux; home/username/Macromedia/Flash_Player/Logs/flashlog.txt
FileReference.download() don't save the file
Environment:
Flash, Action Script 3
Scenario:
When creating a FileReference.download() for downloading a file to user local hard drive the download dialog is open as it should but when I click the "Save" button I can't find the saved file.
Problem:
The FileReference variable is declared inside the download function and as a result of that he is a "local variable" (obviously :-) ).
When the download dialog is opened, the FileReference is unknown since he was declared inside the function. code sample 1
Solution:
Declare the FileReference variable outside the download function as a "Global variable". code sample 2
Code sample 1:
private function startDownload(e:Event):void
{
var fileRefToDownload:fileRefToDownload = new FileReference();
fileRefToDownload.addEventListener(Event.COMPLETE, downloadCompleted);
fileRefToDownload.download(new URLRequest(fileToDownloadURL), "this_is_my_file_name.jpg");
}
Code sample 2:
var fileRefToDownload:fileRefToDownload;
private function startDownload(e:Event):void
{
fileRefToDownload = new FileReference();
fileRefToDownload.addEventListener(Event.COMPLETE, downloadCompleted);
fileRefToDownload.download(new URLRequest(fileToDownloadURL), "this_is_my_file_name.jpg");
}
Subscribe to:
Posts (Atom)
linux bulk prefix filenames
In order to bulk add prefix to filenames in a directory run the following comnmand for f in * ; do mv -- "$f" "2018-05-24_...
-
In order to bulk add prefix to filenames in a directory run the following comnmand for f in * ; do mv -- "$f" "2018-05-24_...
-
After few weeks that I tried to set my guitar amplifier fender mustang 1 v2 to produce "crystal clear" sound + two days of th...
-
Copy & paste (ctrl+shift+V) into your terminal window sudo hd /sys/firmware/acpi/tables/MSDM *Might work on other...