[flexcoders] Memory Leak and SuperImage

2008-11-04 Thread Alexander Baetz
Hi,

i'm new to flex and have the following problem.
When i run my application firefox and IE require nearly 5mb per second 
more memory and run on 100% cpu.

Are there common mistakes i could have made?

The only data i load are images with the help of the super image component.
( 
http://www.quietlyscheming.com/blog/2007/01/23/some-thoughts-on-doubt-on-flex-as-the-best-option-orhow-i-made-my-flex-images-stop-dancing/
 
)

i'm changing this images for mouseover effects and stuff but use allways 
the same.

I hope anybody has an idea what could go wrong.

Greetings,
Alexander



--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Alternative FAQ location: 
https://share.acrobat.com/adc/document.do?docid=942dbdc8-e469-446f-b4cf-1e62079f6847
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo! 
Groups Links

* To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/

* Your email settings:
Individual Email | Traditional

* To change settings online go to:
http://groups.yahoo.com/group/flexcoders/join
(Yahoo! ID required)

* To change settings via email:
mailto:[EMAIL PROTECTED] 
mailto:[EMAIL PROTECTED]

* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

* Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/



Re: [flexcoders] Memory Leak and SuperImage

2008-11-04 Thread Alexander Baetz
I tried to debug it with the flex builder profiler, but i dont quite 
undertstand the outputs there.

There aren't to many instance of my classes out there. Mostly one or 
two more than visible. my guess is that the garbage collector didnt 
collect them in time for the snapshot.
what worries me are more than 5000 instances of Function and nearly 
the same number of Object. Is this normal? Together these two groups 
need more than 60% of my memory.

If i read the profiler right, most of the objects are created in a 
function where i create a tooltip.

I still hope someone has an idea.

Greetings,
Alexander

CODE:

var pt:Point = new Point(event.currentTarget.x, event.currentTarget.y);
pt = event.currentTarget.localToGlobal(pt);

var curX:Number = pt.x;
var curY:Number = pt.y + event.currentTarget.height;
   
tip =  new SkillTooltip();
tip.Skill = mySkill;
   
if (curX + tip.width  Application.application.width) {
curX = Application.application.width - tip.width;
}
tip.x = curX;
tip.y = curY;
   
var sm:ISystemManager = Application.application.systemManager;
   
sm.toolTipChildren.addChild(tip);

Alexander Baetz schrieb:
 Hi,

 i'm new to flex and have the following problem.
 When i run my application firefox and IE require nearly 5mb per second 
 more memory and run on 100% cpu.

 Are there common mistakes i could have made?

 The only data i load are images with the help of the super image component.
 ( 
 http://www.quietlyscheming.com/blog/2007/01/23/some-thoughts-on-doubt-on-flex-as-the-best-option-orhow-i-made-my-flex-images-stop-dancing/
  
 )

 i'm changing this images for mouseover effects and stuff but use allways 
 the same.

 I hope anybody has an idea what could go wrong.

 Greetings,
 Alexander

 

 --
 Flexcoders Mailing List
 FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
 Alternative FAQ location: 
 https://share.acrobat.com/adc/document.do?docid=942dbdc8-e469-446f-b4cf-1e62079f6847
 Search Archives: 
 http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo! Groups Links



   




--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Alternative FAQ location: 
https://share.acrobat.com/adc/document.do?docid=942dbdc8-e469-446f-b4cf-1e62079f6847
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo! 
Groups Links

* To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/

* Your email settings:
Individual Email | Traditional

* To change settings online go to:
http://groups.yahoo.com/group/flexcoders/join
(Yahoo! ID required)

* To change settings via email:
mailto:[EMAIL PROTECTED] 
mailto:[EMAIL PROTECTED]

* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

* Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/



Re: [flexcoders] Dynamicaly loading of images

2008-10-31 Thread Alexander Baetz
Hi,

i use the SuperImage component now. Works fine.

Thanks to all,
Alexander

Alexander Baetz schrieb:
 Hi,

 for a special tool i want to display buttons with icons that where 
 loaded at runtime (based on an xml document loaded at runtime)
 in adobe livedocs i read that i cant load icons at runtime.

 To workaround that i switched to Images in buttonmode. But everytime the 
 displayed image changes because i changed the source attribute (for 
 example when my button is disabled) there is a timegap and the image 
 is empty.
 This happens even i used the same source-url before.
 My guess would be that my application forgetts the imagedata if no 
 object uses it anymore and therefore loads the url again.

 So im looking either for a way to store the imagedata and supply it to 
 my Button when necessary.

 Greetings,
 Alexander



 

 --
 Flexcoders Mailing List
 FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
 Alternative FAQ location: 
 https://share.acrobat.com/adc/document.do?docid=942dbdc8-e469-446f-b4cf-1e62079f6847
 Search Archives: 
 http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo! Groups Links
   




--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Alternative FAQ location: 
https://share.acrobat.com/adc/document.do?docid=942dbdc8-e469-446f-b4cf-1e62079f6847
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo! 
Groups Links

* To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/

* Your email settings:
Individual Email | Traditional

* To change settings online go to:
http://groups.yahoo.com/group/flexcoders/join
(Yahoo! ID required)

* To change settings via email:
mailto:[EMAIL PROTECTED] 
mailto:[EMAIL PROTECTED]

* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

* Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/



[flexcoders] Dynamicaly loading of images

2008-10-30 Thread Alexander Baetz
Hi,

for a special tool i want to display buttons with icons that where 
loaded at runtime (based on an xml document loaded at runtime)
in adobe livedocs i read that i cant load icons at runtime.

To workaround that i switched to Images in buttonmode. But everytime the 
displayed image changes because i changed the source attribute (for 
example when my button is disabled) there is a timegap and the image 
is empty.
This happens even i used the same source-url before.
My guess would be that my application forgetts the imagedata if no 
object uses it anymore and therefore loads the url again.

So im looking either for a way to store the imagedata and supply it to 
my Button when necessary.

Greetings,
Alexander





--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Alternative FAQ location: 
https://share.acrobat.com/adc/document.do?docid=942dbdc8-e469-446f-b4cf-1e62079f6847
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo! 
Groups Links

* To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/

* Your email settings:
Individual Email | Traditional

* To change settings online go to:
http://groups.yahoo.com/group/flexcoders/join
(Yahoo! ID required)

* To change settings via email:
mailto:[EMAIL PROTECTED] 
mailto:[EMAIL PROTECTED]

* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

* Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/



[flexcoders] How to Embed an Application that Supports Deep-Linking?

2008-10-29 Thread Alexander Baetz
Hi,

for Training i developed an application that uses the Flex 3 
Deeplinking-Mechanism. I used the Flex Builder and everything Works 
perfect when i open the html-file, the flex builder creates.

Now i tried to embed the application into an existing page (for example 
www.mydomain.de/myapp.html . I placed the application at 
www.myotherdomain.de/testapp/ and started trying.
Since i don't know much about JavaScript i tried the 
copy-paste-Approach. Copy the content of the generated html-file, fix 
all links, check all links, hope it works.

Well, all links work, i hoped and it didn't.
No action inside my app changes the url inside the browser.
No parameters attached to the url in the prowser affect the application.

My current Testembed is added as an attachment. Everything beside 
testapp_embed.txt was generated by the flex builder.


How can (or should) i use a flex application from another domain and 
make deeplinking still work?

I hope somebody out there can help me.

Greetings,
Alexander
script language=JavaScript type=text/javascript
!--
// Version check for the Flash Player that has the ability to start Player 
Product Install (6.0r65)
var hasProductInstall = DetectFlashVer(6, 0, 65);

// Version check based upon the values defined in globals
var hasRequestedVersion = DetectFlashVer(requiredMajorVersion, 
requiredMinorVersion, requiredRevision);

if (hasRequestedVersion) {
// if we've detected an acceptable version
// embed the Flash Content SWF when all tests are passed
AC_FL_RunContent(
src, http://www.myotherdomain.de/testapp/myapp;,
width, 625,
height, 1000px,
align, middle,
id, myapp,
quality, high,
bgcolor, #869ca7,
name, myapp,
allowScriptAccess,sameDomain,
type, application/x-shockwave-flash,
pluginspage, http://www.adobe.com/go/getflashplayer;
);
  } else {  ... }
// --
/script
noscriptobject
classid=clsid:D27CDB6E-AE6D-11cf-96B8-44455354

codebase=http://fpdownload.macromedia.com/get/flashplayer/current/swflash.cab;
param name=bgcolor value=#869ca7 /
embed name=guGenericSkilltree
play=true loop=false quality=high
/embed /object/noscript// Flash Player Version Detection - Rev 1.6
// Detect Client Browser type
// Copyright(c) 2005-2006 Adobe Macromedia Software, LLC. All rights reserved.
var isIE  = (navigator.appVersion.indexOf(MSIE) != -1) ? true : false;
var isWin = (navigator.appVersion.toLowerCase().indexOf(win) != -1) ? true : 
false;
var isOpera = (navigator.userAgent.indexOf(Opera) != -1) ? true : false;

function ControlVersion()
{
var version;
var axo;
var e;

// NOTE : new ActiveXObject(strFoo) throws an exception if strFoo isn't 
in the registry

try {
// version will be set for 7.X or greater players
axo = new ActiveXObject(ShockwaveFlash.ShockwaveFlash.7);
version = axo.GetVariable($version);
} catch (e) {
}

if (!version)
{
try {
// version will be set for 6.X players only
axo = new 
ActiveXObject(ShockwaveFlash.ShockwaveFlash.6);

// installed player is some revision of 6.0
// GetVariable($version) crashes for versions 6.0.22 
through 6.0.29,
// so we have to be careful. 

// default to the first public version
version = WIN 6,0,21,0;

// throws if AllowScripAccess does not exist 
(introduced in 6.0r47) 
axo.AllowScriptAccess = always;

// safe to call for 6.0r47 or greater
version = axo.GetVariable($version);

} catch (e) {
}
}

if (!version)
{
try {
// version will be set for 4.X or 5.X player
axo = new 
ActiveXObject(ShockwaveFlash.ShockwaveFlash.3);
version = axo.GetVariable($version);
} catch (e) {
}
}

if (!version)
{
try {
// version will be set for 3.X player
axo = new 
ActiveXObject(ShockwaveFlash.ShockwaveFlash.3);
version = WIN 3,0,18,0;
} catch (e) {
}
}

if (!version)
{
try {
// version will be set for 2.X player
axo = new 
ActiveXObject(ShockwaveFlash.ShockwaveFlash);
version = WIN 2,0,0,11;
} catch (e) {
version = -1;
}
}