| | |
Flash develop...
Please support our Graphics and Multimedia advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
Thread Solved |
Yup you got it Raja, that's how you set up the path to the SDK and the path to the external flash player!
I've got my Flashdevelop set up to use the flashplayer10 debug executable!
Note: in the FlashViewer section of the program settings, ensure that the 'Movie Display Style' property is set to External!
'Popup' and 'Document' use the default player (fp 9 debug ActiveX)
In order to demonstrate tracing in flashdevelop, I've knocked a little example project together. (see attached files.)
To actually create the project, I've just gone to 'project->new project' in the menu and then in the dialog I've selected the 'AS3 Project' template and called the project Tracing.
Flashdevelop has now created a few directories (bin, lib and src) and files. Briefly exploring the generated files and folders:
The bin folder is where the final .swf will end up being built.
Initially the bin folder contains a html file which is set up to embed the final .swf using swfobject.js (found in the js sub-folder). It also includes expressinstall.swf, which is also used by the html page, in case people viewing the page have an older version of flash...in which case, it can download and install the correct version.
The lib folder is where you can put any assets for your project (Bitmaps fonts etc.). It should be noted that simply adding items to the lib folder does not make them instantly accessible to the project. You first have to right-click them and then select 'Add to library'. Once you've added items to the library, you can drag them out of the library and drop them onto a blank line in your code and Flashdevelop will automatically generate code to embed the asset!
And finally the src folder is where your actionscript files will go.
Initially for the 'AS3 project' template there will be one file called main.as. Main.as is the main application class. So this is the class that holds everything together!
Main.as initially contains the Main class constructor and a function called init.
The constructor code is interesting...
if the 'stage' object has already been created and initialised, the init function is called.
Otherwise an event listener is set up to listen for the ADDED_TO_STAGE event. The listener will call the init function..
Never seen that code in the blank AS3 project before..This is new to me, I've only just upgraded my flashdevelop to the latest version, I was running the beta9 version of FD...hmm..Pretty nifty though!
So the init function is the entry point, this is where you initialise your application.
OK, so now we're ready to enter some code...
All I'm going to do here is write a bit of code to output some trace statements...But before that, I'm just gonna set the size of the final .swf!
In the menu, select 'project->properties' and change the dimensions of the .swf to 150X150 (we don't need anything too big seeing as we're not gonna be putting anything on the stage!)
OK that's that! Now we'll enter some code.
This is what I've put into main.as:
All we've done there is add a few trace statements to the init function and added another function called doSomething, which just runs a quick for loop and traces the value of the loops index (variable 'i'!).
Next we ensure that the project is in debug mode by checking the dropdown box in the main toolbar (it should be by defalt!)....Looking at that....Yup, that's definitely in debug mode!
Next click on the blue triangular icon that looks like the play button on your VCR/Media player/Walkman/Mp3 player/iPod, this will build our .swf and open it in the external flash player.
Surely enough, flash player pops up and displays a blank white movieclip...Lovely jubbly!
"OK, so where are the Trace statements?" I hear you cry...Well, if you mouse over the 'output' tab in the bar at the bottom of the screen you should see some trace statements. {Ta daaaaa! heh heh!} (see also the attached .png!)
If you can't see the 'output' tab, select 'view->output panel' from the main menu and the output tab should appear.
If you need to keep the output panel open so you can see your traces at all times, you can pin it in place (rather like visual studio).
Additional notes on tracing...
As mentioned, tracing only works when you are in debug mode and only when your file is part of the currently active/open project.
Also, when you are done with debugging your masterpiece. don't forget to set the configuration to release and then rebuild your .swf.
This will omit your trace statements from the final .swf (they stay in your code, they just don't get compiled into the .swf), it also removes some other additonal bits 'n bobs that are used by FD for debugging..
I can't count the number of times that I've been on websites recently and got a popup from flash player asking where the local debugger instance is because some doughnut of a designer on a deadline forgot to rebuild their .swf in release mode before uploading it to a site...Grrr...This issue doesn't affect your average joe with their vanilla flash player, it only affects people who use the content debugger versions...Like me...Aaaaagh!
heh heh!
There was one site that became virtually unusable to me a while ago because every single page had this one annoying flash advert at the top of the page that was a debug build...So every time I went to a different page I got that damn popup from flashplayer....That drove me nuts!
Installing the adblock pro plugin for firefox solved that problem for me! "Take that you clueless half-arsed advertising morons with your poor actionscript skills and annoying flash banners!" Ha!
Ooops, sorry!
Went into a bit of an anti advertising rant there!
OK, so that's tracing in FD. It only works if you use it in an active/open project and only in debug mode!
And don't forget to rebuild in release mode once your done debugging! heh heh!
Cheers for now,
Jas.
I've got my Flashdevelop set up to use the flashplayer10 debug executable!
Note: in the FlashViewer section of the program settings, ensure that the 'Movie Display Style' property is set to External!
'Popup' and 'Document' use the default player (fp 9 debug ActiveX)
In order to demonstrate tracing in flashdevelop, I've knocked a little example project together. (see attached files.)
To actually create the project, I've just gone to 'project->new project' in the menu and then in the dialog I've selected the 'AS3 Project' template and called the project Tracing.
Flashdevelop has now created a few directories (bin, lib and src) and files. Briefly exploring the generated files and folders:
The bin folder is where the final .swf will end up being built.
Initially the bin folder contains a html file which is set up to embed the final .swf using swfobject.js (found in the js sub-folder). It also includes expressinstall.swf, which is also used by the html page, in case people viewing the page have an older version of flash...in which case, it can download and install the correct version.
The lib folder is where you can put any assets for your project (Bitmaps fonts etc.). It should be noted that simply adding items to the lib folder does not make them instantly accessible to the project. You first have to right-click them and then select 'Add to library'. Once you've added items to the library, you can drag them out of the library and drop them onto a blank line in your code and Flashdevelop will automatically generate code to embed the asset!
And finally the src folder is where your actionscript files will go.
Initially for the 'AS3 project' template there will be one file called main.as. Main.as is the main application class. So this is the class that holds everything together!
Main.as initially contains the Main class constructor and a function called init.
The constructor code is interesting...
if the 'stage' object has already been created and initialised, the init function is called.
Otherwise an event listener is set up to listen for the ADDED_TO_STAGE event. The listener will call the init function..
Never seen that code in the blank AS3 project before..This is new to me, I've only just upgraded my flashdevelop to the latest version, I was running the beta9 version of FD...hmm..Pretty nifty though!
So the init function is the entry point, this is where you initialise your application.
OK, so now we're ready to enter some code...
All I'm going to do here is write a bit of code to output some trace statements...But before that, I'm just gonna set the size of the final .swf!
In the menu, select 'project->properties' and change the dimensions of the .swf to 150X150 (we don't need anything too big seeing as we're not gonna be putting anything on the stage!)
OK that's that! Now we'll enter some code.
This is what I've put into main.as:
ACTIONSCRIPT Syntax (Toggle Plain Text)
package { import flash.display.Sprite; import flash.events.Event; /** * ... * @author Jason Trunks */ public class Main extends Sprite { public function Main():void { if (stage) init(); else addEventListener(Event.ADDED_TO_STAGE, init); } private function init(e:Event = null):void { // entry point removeEventListener(Event.ADDED_TO_STAGE, init); trace("Inside init function..."); trace("Calling doSomething function.."); doSomething(); trace("Back inside init function..."); } private function doSomething():void { trace("Inside doSomething function.."); for (var i:Number = 0; i < 10; ++i) { trace("value of i is: " + String(i)); } } } }
All we've done there is add a few trace statements to the init function and added another function called doSomething, which just runs a quick for loop and traces the value of the loops index (variable 'i'!).
Next we ensure that the project is in debug mode by checking the dropdown box in the main toolbar (it should be by defalt!)....Looking at that....Yup, that's definitely in debug mode!
Next click on the blue triangular icon that looks like the play button on your VCR/Media player/Walkman/Mp3 player/iPod, this will build our .swf and open it in the external flash player.
Surely enough, flash player pops up and displays a blank white movieclip...Lovely jubbly!
"OK, so where are the Trace statements?" I hear you cry...Well, if you mouse over the 'output' tab in the bar at the bottom of the screen you should see some trace statements. {Ta daaaaa! heh heh!} (see also the attached .png!)
If you can't see the 'output' tab, select 'view->output panel' from the main menu and the output tab should appear.
If you need to keep the output panel open so you can see your traces at all times, you can pin it in place (rather like visual studio).
Additional notes on tracing...
As mentioned, tracing only works when you are in debug mode and only when your file is part of the currently active/open project.
Also, when you are done with debugging your masterpiece. don't forget to set the configuration to release and then rebuild your .swf.
This will omit your trace statements from the final .swf (they stay in your code, they just don't get compiled into the .swf), it also removes some other additonal bits 'n bobs that are used by FD for debugging..
I can't count the number of times that I've been on websites recently and got a popup from flash player asking where the local debugger instance is because some doughnut of a designer on a deadline forgot to rebuild their .swf in release mode before uploading it to a site...Grrr...This issue doesn't affect your average joe with their vanilla flash player, it only affects people who use the content debugger versions...Like me...Aaaaagh!
heh heh! There was one site that became virtually unusable to me a while ago because every single page had this one annoying flash advert at the top of the page that was a debug build...So every time I went to a different page I got that damn popup from flashplayer....That drove me nuts!
Installing the adblock pro plugin for firefox solved that problem for me! "Take that you clueless half-arsed advertising morons with your poor actionscript skills and annoying flash banners!" Ha!
Ooops, sorry!
Went into a bit of an anti advertising rant there!OK, so that's tracing in FD. It only works if you use it in an active/open project and only in debug mode!
And don't forget to rebuild in release mode once your done debugging! heh heh!

Cheers for now,
Jas.
There are 10 types of people in this world.....
Those who understand binary .....
And those who don't!
Those who understand binary .....
And those who don't!
1
#12 Oct 7th, 2009
Everything works except trace,
output panel shows:
output panel shows:
Graphics and Multimedia Syntax (Toggle Plain Text)
Starting new compile. Loading configuration file C:\Program Files\FlashDevelop\Flex_SDK\frameworks\flex-config.xml Loading configuration file C:\Documents and Settings\rajarajan\Desktop\ProjectTracing\obj\ProjectTracingConfig.xml obj\ProjectTracing633905373543906250 (999 bytes) (fcsh) Build succeeded Done (0) [Capturing traces with FDB]
0
#13 Oct 7th, 2009
•
•
•
•
Everything works except trace,
output panel shows:
Graphics and Multimedia Syntax (Toggle Plain Text)
Starting new compile. Loading configuration file C:\Program Files\FlashDevelop\Flex_SDK\frameworks\flex-config.xml Loading configuration file C:\Documents and Settings\rajarajan\Desktop\ProjectTracing\obj\ProjectTracingConfig.xml obj\ProjectTracing633905373543906250 (999 bytes) (fcsh) Build succeeded Done (0) [Capturing traces with FDB]
OK, well the only thing I can think of is perhaps you aren't using one of the debug flash players...Only the content debugger versions of flashplayer will allow you to see trace actions.
The standard player doesn't show them.
Try going to http://www.adobe.com/support/flashplayer/downloads.html and download and install the flash player 10 projector content debugger.
Once you've got it, set your copy of Flashdevelop up, so it uses the content debugger as the external player. Next, reload your project and try building/testing it!
You should now be able to see trace statements!
Cheers for now,
Jas.
There are 10 types of people in this world.....
Those who understand binary .....
And those who don't!
Those who understand binary .....
And those who don't!
0
#14 Oct 7th, 2009
Sweet jesus that was a lot of work but finally got it.
I was downloading the wrong exe it's the third one down
Download the Windows Flash Player 10 Projector content debugger (EXE, 5.18 MB).
Thanks a lot.
Notes
Project > properties > play in external player.
Then you have to set the output file of the swf.
Then on the tree menu in the right hand side, right click on the actionscript file and choose 'Always compile'.
Make sure it is set to debug and then finally click the blue triangle. Pressing ctrl+F8 doesn't show the trace.
Oh and you've got to create this as a project and not just a stand alone actionscript file.
I was downloading the wrong exe it's the third one down
Download the Windows Flash Player 10 Projector content debugger (EXE, 5.18 MB).
Thanks a lot.
Notes
Project > properties > play in external player.
Then you have to set the output file of the swf.
Then on the tree menu in the right hand side, right click on the actionscript file and choose 'Always compile'.
Make sure it is set to debug and then finally click the blue triangle. Pressing ctrl+F8 doesn't show the trace.
Oh and you've got to create this as a project and not just a stand alone actionscript file.
Last edited by iamthwee; Oct 7th, 2009 at 3:48 pm.
*Voted best profile in the world*
![]() |
Similar Threads
- Opening for Flash Programmer (Software Development Job Offers)
- Flash Developer, NYC, 75K + 5 % Bonus (Software Development Job Offers)
- Flash Video Platform Expert - DC (Web Development Job Offers)
- Multiple Flash Developer Roles (Web Development Job Offers)
- Flash Developers All Levels (Web Development Job Offers)
- R/GA Seeking Flash Dev's All Levels in NYC (Web Development Job Offers)
- Senior Level Flash Developer (Software Development Job Offers)
- Seeking a FT Flash Developer-NJ/NY Metro Area, USA ONLY (Web Development Job Offers)
- Slideshow Des/Dev - PHP/SQL/XML/FLASH/AS/AJAX, not all needed but it wouldn't hurt. (Web Development Job Offers)
- Is Flash the Future? (Graphics and Multimedia)
Other Threads in the Graphics and Multimedia Forum
- Previous Thread: Copyright
- Next Thread: Embedding flash into web-site
| Thread Tools | Search this Thread |
.net 7 30-nm adobe adobereader air ajax amazon amf apple asp.net battery browsers budget bundle cellphone dell directshow dofollow dojofoundation download downloads elearning emacs feeds flash flash-develop flashlite flv free freewebhosting fsf ftc gaussianelimination gnu google hardware hosting iamthwee image industry intel iphone javascript knowledge lexicon link linux live memory microsoft mobile moonlight multimedia nand nano news online pdf php plugins polynomial projectmanagement quicktime ram running sandisk security seo servers service silverlight site socialnetworking software solidstatedrive sproutcore ssd storage streamingmedia swappingxmlnodes swf. template test torrent ukmap unlimited video warning watch web webhosting webmaster website wifi windows7 windowsmedia xml zephyr zeroday







