How can I upgrade code for "CCLabelBMFont::purgeCachedData" in cocos2d v3.7 ? - cocos2d-x

How can I upgrade code for "CCLabelBMFont::purgeCachedData" in cocos2d v3.7 ?
Now in 3.7 it don't have "CCLabelBMFont" or "LabelBMFont"
All font display use Label class. But Label don't contain like "purgeCachedData" function.

cocos2dx 3.7
FontAtlasCache::purgeCachedData();

Related

BindingUtils in FlashBuilder 4.7

I used BindingUtils from Flex library in my pure AS3 projects many times. It was fine in FlashBuilder 3, 4, 4.5 and 4.6, but in 4.7 it doesn't work.
When I make
BindingUtils.bindProperty(foo1, "bar1", foo2, "bar2");
it changes foo1.bar1 only once at the beginning, but all changes in foo2.bar2 don't influence on foo1.bar1 property. So my project, which worked in 4.6 doesn't work in 4.7.
Why is it so? Anybody please help me.

Windows phone 8 Performance progressbar

Do i need to use performance progressbar in windows phone 8. In my windows phone 7/7.5 application i was used the progressbar shipped with the toolkit(performance progressbar). Is it necessary to use the same in windows phone 8 or simple progress bar is sufficient?
The WP8 SDK contains the improved progress bar now. So use this one only.
The TK version in not working properly anymore on WP8.
See changes for the SDK here, including a sentence about the progress bar:
http://msdn.microsoft.com/en-us/library/windowsphone/develop/jj206940%28v=vs.105%29.aspx
See a discussion about that topic here:
http://social.msdn.microsoft.com/Forums/en-GB/wpdevelop/thread/dd457734-a11a-48e2-8443-ba8f5e3f67ac
Use the WP8 SDK's progress bar, but don't forget to set IsIndeterminate = false after collapsing the progressbar. It will run in the background & use battery & UI thread cycles even though its collapsed! :(
I think you should use something like this when targeting WP7 and WP8 with linked files:
#if WP8
public class MyPerformanceProgressBar : ProgressBar
{
}
#else
public class MyPerformanceProgressBar : Microsoft.Phone.Controls.PerformanceProgressBar
{
}
#endif
and use the class MyPerformanceProgressBar in your XAML code (which is linked in WP7 and WP8 project).

Flare3D Flex Context3D issue

I have followed step by step the instruction to build the Flare3D examples at this url
http://www.flare3d.com/blog/2011/03/10/flare3d-2-0-startup-with-flash-builder/
and I fixed the wmode to direct in my html template for the actionscript project, but when it comes to building the examples from the 5th Flex refuses to compile since there are errors in the project.
The errors are these ones:
https://dl.dropbox.com/u/4064417/FlareProblems.jpg
Do you have any idea on how to fix them?
Thank you!
The guide I linked is old!
Since I was using Flash Builder 4.6 I just went to Project > Properties > ActionScript Compiler and selected Flex 4.6 sdk!
This made all the errors disappear.
The problem was that display3d exists only in flashplayer 11 and the guide was telling me to select 10.2 which is WRONG!
Hope this will be helpful for others as well!

Adobe Flash Builder : AddChild vs AddElement

Using Adobe Flash Builder 4.0 ?
Getting error when using addChild(). Compiler suggests about using addElement(). Are both these functions alternate of each other ? Or is it like addChild is deprecated ?
To get clear. Adobe Flash Builder is IDE for developing flex apps. What's important is Flex SDK version. Obviously you're using version 4+. I suggest to avoid using mx (Flex 3) components without strong need. You should read more about Flex 3 and Flex 4 difference.
Post about addChild vs addElement.

Capture CTRL+A, CTRL+C keys/events in flex

How to capture CTRL+A, CTRL+C events in flex? It looks like they are special keys/combinations.
As I understand in Flex 3.4 I can capture CTRL+A by capturing Event.SELECT_ALL, and CTRL+C by capturing Event.COPY. BUT it complains that there are no SELECT_ALL static const in Event class.
I'm using Flex SDK 3.4 and Flex Builder for Linux (Ubuntu).
public function MyCanvas()
{
super();
focusEnabled = true;
addEventListener(Event.SELECT_ALL, onSelectAll); // It complains here
addEventListener(Event.COPY, onCopy); // and here
}
According to Flex 3.4 language reference there is SELECT_ALL in Event class. What version of Flex SDK are you using? Can you post example of your code?
Update: It seems the SELECT_ALL has been added in Flash Player 10. Based on this.
I don't see this from the API, but it could be an issue of targeting the right Flash player version.
You're probably not targeting Flash 10. In Project > Properties > Flex Compiler, make sure you've set either Require Flash Version: 10.0.0 (under HTML Wrapper -- yours may read 9.x.x) or otherwise specified the compiler argument -target-player=10.0.0. That ought to do the trick.