Re: [Flashcoders] Cross domain AS3

2008-05-30 Thread BlackMail
Are you working in one domain (sandbox) ? I so, then probably you need
to fix the relative path. If your swf is stored in some folder ie:
http://www.mydomain.co.uk/banner/flash/MY.SWF

and it needs to load the image from:
http://www.mydomain.co.uk/banner/flash/uploadedimage/45/sunset.jpg

You can pass to getURL() (or whatever you use for loading) a value:
uploadedimage/45/sunset.jpg  ... just the way it already like it works for you

1)
If you need the absolute URL then you can use:
var myURL:String = _root._url

Its value will be: http://www.mydomain.co.uk/banner/flash/MY.SWF
(only when on-line)

2)
Next, cut off the swf file:
myURL = myURL.substr(0,myURL.lastIndexOf(/))
trace(myURL); // outputs: http://www.mydomain.co.uk/banner/flash/

3)
...and add you relative path:
myURL += uploadedimage/45/sunset.jpg;

If you SWF is not in a folder directly above the JPG, then you can cut
off more directories in point 2)

g

 29 06 2008 (11:11:50) wrote:

SJM Hi Guys

SJM My question; Is it possible in an XML file, to have an absolute
SJM link to an image ie. /banner/flash/uploadedimage/45/sunset.jpg. 

SJM I  need the url to be capable of being absolute and to contain
SJM the domain e.g.
SJM http://www.mydomain.co.uk/banner/flash/uploadedimage/45/sunset.jpg

SJM I currently have it set up but the image does not show. It only
SJM shows if the url is relative ie. uploadedimage/45/sunset.jpg

SJM SJM
SJM ___
SJM Flashcoders mailing list
SJM Flashcoders@chattyfig.figleaf.com
SJM http://chattyfig.figleaf.com/mailman/listinfo/flashcoders




--
Za co Doda nienawidzi Feel?
Sprawdz  http://link.interia.pl/f1e0b

___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] TextFormat Help:

2007-03-22 Thread BlackMail
Hi,


You can use setTextFormat(startIndex,endIndex,textFormat):

// start

var TF1:TextFormat = new TextFormat()
TF1.font=Arial;
//
var TF2:TextFormat = new TextFormat()
TF2.font=Courier New;
//
this.createTextField(txt,1,0,0,200,30);
//
this.txt.text = Ein, Zwei, Drei;
//
var end1Idx = this.txt.text.length-1;
var end2Idx = this.txt.text.length;
//
this.txt.setTextFormat(0,end1Idx,TF1);
this.txt.setTextFormat(end1Idx,end2Idx,TF2);

// end



hmdakr Hi

hmdakr Plz tell me how to change the format of last character of a word.

hmdakr LikeWorld

hmdakr I want Worl in Arial Font and d in Digital Readout Thick Upright 
Font.

hmdakr Thanks in Advance...
hmdakr HMD


hmdakr 
hmdakr __
hmdakr Yahoo! India Answers: Share what you know. Learn something new
hmdakr http://in.answers.yahoo.com/
hmdakr ___
hmdakr Flashcoders@chattyfig.figleaf.com
hmdakr To change your subscription options or search the archive:
hmdakr http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

hmdakr Brought to you by Fig Leaf Software
hmdakr Premier Authorized Adobe Consulting and Training
hmdakr http://www.figleaf.com
hmdakr http://training.figleaf.com



-- 
Pozdrowienia,
 BlackMail


--
Jestes kierowca? To poczytaj!  http://link.interia.pl/f199e

___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


Re: [Flashcoders] High CPU usage problems

2007-03-22 Thread BlackMail
Hi,

There a presentation related to garbage collection (effective
deleting/removing) and some performance related stuff. All in relation
to AS3, but applicable in many situations:
http://www.gskinner.com/talks/resource-management/



Carl Welch Hi Coders,

Carl Welch I've been having problem with some the apps I've been building. The 
CPU gets
Carl Welch really bogged down like with usage often at 100%.I tend to use alot 
of tween
Carl Welch classes, load external images and XML. I've never really had a good 
grasp of
Carl Welch what to do with things regarding memory
Carl Welch usage(programatically). I like to
Carl Welch keep all my scripting on one frame and have function do what I need 
do.

Carl Welch Currently, I am having the problem with this project:
Carl Welch http://www.artandsignfx.com/temp.html

Carl Welch I programmed the Portfolio Section. Bring up the task manager and 
watch
Carl Welch the performance graph. You can watch it start to bogg down after a 
while of
Carl Welch clicking around the portfolio section. Its loading xmls (one for 
the Side
Carl Welch Menu) and the other for the thumbnails and theire respective data. 
There are
Carl Welch quite a few createMovieClips and AttachMovieClips and some 
setIntervals -
Carl Welch which I do clear when I'm done. When I create a tween object I try 
to kill
Carl Welch it when I'm done using it with delete myObject; - not sure if 
that even
Carl Welch works.

Carl Welch Can anyone offer any advice or point me in the direction of a 
really good
Carl Welch article regarding this subject?.




-- 
Pozdrowienia,
 BlackMail


--
Jestes kierowca? To poczytaj!  http://link.interia.pl/f199e

___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


Re: [Flashcoders] Flash Sandy: Camera Flythrough

2007-03-21 Thread BlackMail
 There is a good introduction:
 http://www.petitpub.com/labs/media/flash/sandy/primitives.shtml
 

 21 marca 2007 (13:51:51) wrote:

eric e. dolecki I just downloaded Sandy (and there are so many
eric e. dolecki things in it not sure where
eric e. dolecki to start).

eric e. dolecki I just want to place 3 mcs back into space (z-index) (each 
further back than
eric e. dolecki the previous) and bring them up towards the camera, stepping 
them.

eric e. dolecki is there some demo code someplace where I can get started to 
do this. I can
eric e. dolecki move the objects or the camera - makes no difference.

eric e. dolecki - eric
eric e. dolecki ___
eric e. dolecki Flashcoders@chattyfig.figleaf.com
eric e. dolecki To change your subscription options or search the archive:
eric e. dolecki http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

eric e. dolecki Brought to you by Fig Leaf Software
eric e. dolecki Premier Authorized Adobe Consulting and Training
eric e. dolecki http://www.figleaf.com
eric e. dolecki http://training.figleaf.com



-- 
Pozdrowienia,
 BlackMail


-
Ta oferta jest dla Ciebie ! 
Sprawd¼ na: http://link.interia.pl/f1a33


___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


[Flashcoders] overwriting a class

2007-01-16 Thread BlackMail
Hi,

I am looking for advice about swapping classes of the same name but
using different methods.

Let's consider three classes:

class SomeClass
{
public function meth()
{
   trace(meth of skin SomeClass VERSION 0);
}
}
//
class SomeClass
{
public function meth()
{
trace(meth of skin SomeClass VERSION 1);
}

}
//
class SomeClass
{
public function meth()
{
trace(meth of skin SomeClass VERSION 2);
someNewMethod();

}
private function someNewMethod()
{
trace(something new...);
}

}

The first of those is imported into a main.swf file. I can make an
instance:

var Q:SomeClass = new SomeClass();
Q.meth()   // traces :  meth of skin SomeClass VERSION 0

The next two classes are imported in: one storage1.swf and the other,
storage2.swf 

Both .swf files are loaded into the main.swf. First the storage1.swf
and next storage2.swf. But before loading, I delete the class:

trace(SomeClass) // out: [type Function]
delete SomeClass
trace(SomeClass) // out: undefined

And after loading the storage1.swf I can make again an
instance of SomeClass:

var Q1:SomeClass = new SomeClass();
Q1.meth() // traces:   meth of skin SomeClass VERSION 1

It uses a new version of meth().

Now I delete the SomeClass class:

delete SomeClass

... and load somewhere into the stage of main.swf the storage2.swf
file. After loading the first one I can make a new instance of
SomeClass:

var Q2:SomeClass = new SomeClass();
Q2.meth() // traces:   meth of skin SomeClass VERSION 2
  //   something new...


and so on, deleting an loading a new version

Now the question:
The same class name, the same method name, eventually other, new
methods of the same class and deleting the class Could this be a
good way to overwrite classes ? I tested it and works. Flash allows
deleting classes. But maybe I am not aware of some resulting problems.
Is is ok in terms of good programing practices ?

Thanks,

Greg






--
Lufa dla generala. Zobacz  http://link.interia.pl/f19e1


___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com