[Flashcoders] String to object

2007-01-09 Thread Bart Albrecht
Hi,

 

I'm migrating some stuff from AS2 to AS3

 

In AS2 I can do this:

function doSomething(btnName:String)

{

_root[btnName]visible = false;

}

doSomething(exit_btn);

 

In AS3

I want to do the same:

public function doSomething(btnName:String)

{

//XXX here I don't know what I should do 

}

 

I hope someone can help me

 

Bart

 

 

___
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] LoadMovie library

2006-08-10 Thread Bart Albrecht
Tony,
 You just have to access them from the scope they where born to.
I can access them indeed in the scope where they are created. But the
problem is that I can't add other assets (movieclips) to that scope. 

I want this because I want to separate code from viewing assets, and import
different templates. 
I want for example to put my video object on the scope of my imported assets
so I can mask my video object. I want to use a mask of the imported assets
and I want to put some imported assets like a shadow border on top of my
video. This is only possible if I get my video object on the same scope as
the imported assets or if I get the assets that I want on top of the video
object in a different movieclip (duplicatemovieclip).



-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Anthony Lee
Sent: donderdag 10 augustus 2006 6:49
To: Flashcoders mailing list
Subject: Re: [Flashcoders] LoadMovie library

Bart,
 I don't find a
 solution where I can get my movieclips away of the library container to
some
 movieclip on the main.swf.
   
I think if you look at the technotes you'll find that it can't be done.

That doesn't mean you can't use loaded movie library assets. You just 
have to access them from the scope they where born to.

Tony
___
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@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] LoadMovie library

2006-08-10 Thread Bart Albrecht
I think I will be forced to use the bitmap class of flash 8 to take a bitmap
of the imported assets and copy thos bitmaps on to the stage :-s
This has 2 big disadvantages:
- processor overkill, first load a movieclip into a container, take a bitmap
copy of that movieclip, create new movieclip, put that bitmap into the new
movieclip, remove the movieclip from the container (imagine this for 500
assets ...)
- the quality of a bitmap is not that of a vector, so I will have to make
the vector movieclips quit big so I don't lose to much detail when I make a
bitmap and a user scales his window to a bigger screen.

I'm getting disappointed by Flash, how old is this program? And you can
still don't have a good working runtime external library.

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Anthony Lee
Sent: donderdag 10 augustus 2006 11:38
To: Flashcoders mailing list
Subject: Re: [Flashcoders] LoadMovie library


 I want this because I want to separate code from viewing assets, and
import
 different templates. 
   
I feel your pain Bart. Unfortunately it's a no can do:

http://livedocs.macromedia.com/flash/mx2004/main_7_2/wwhelp/wwhimpl/common/h
tml/wwhelp.htm?context=Flash_MX_2004file=1519.html

Do a text search for library and scan the page,  you should get the idea.
 I want for example to put my video object on the scope of my imported
assets
 so I can mask my video object. I want to use a mask of the imported assets
 and I want to put some imported assets like a shadow border on top of my
 video. This is only possible if I get my video object on the same scope as
 the imported assets or if I get the assets that I want on top of the video
 object in a different movieclip (duplicatemovieclip).
   
I see what you mean. I think it'd take some serious monkey business to 
make that work.

Tony
___
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@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] Scrollpane issue

2006-08-09 Thread Bart Albrecht
Have you tried setting your max position like this?
myScrollpane.vPosition = myScrollpane.maxVPosition;

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Randy Tinfow
Sent: dinsdag 8 augustus 2006 21:43
To: flashcoders@chattyfig.figleaf.com
Subject: [Flashcoders] Scrollpane issue

We're having an odd issue with the ScrollPane component included with
Flash 8 Pro.  Testing on Flash Player 9.   

The scrollpane content contains a textfield that loads HTML Text from an
XML document.  The text displays correctly, but when scrolling, weird
things happen.  Using the mouse wheel, the top couple of lines of text
get lost underneath an image until you scroll back up to the top. If you
scroll with the scrollpane's up and down buttons, the text on the very
bottom of the content clip is never shown...it doesn't scroll far
enough.  

It seems the only reliable way to scroll is to drag the scrollbar up and
down, but I can't expect users to do this.  Is this just an issue with
Flash Player 9, am I doing something wrong, or is the ScrollPane just
buggy?

To see the problem, click on Rooms/Reservations, then Sussex.

http://128.177.1.30/NEW/main.html



Thanks,

Randy Tinfow
IMAGE PLANT
___
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@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] LoadMovie library

2006-08-09 Thread Bart Albrecht
Hi Naz,

I tried that but it also didn't help because I need to put some mc of my
main.swf between some library assets on the stage. And I don't find a
solution where I can get my movieclips away of the library container to some
movieclip on the main.swf.
I also tried swapDepths, but that also didn't help.

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Carlos
Nazareno
Sent: dinsdag 8 augustus 2006 18:23
To: 'Flashcoders mailing list'
Subject: RE: [Flashcoders] LoadMovie library


How about if you loadMovie your entire Library SWF into your main SWF, 
then access your library files via mainSWF.librarySWF.libraryAsset syntax?

Not sure, but you may have to create instances of your library asset on the 
stage and name them properly...

-Naz



DISCLAIMER: This Message may contain confidential information intended only
for the use of the addressee named above. If you are not the intended
recipient of this message you are hereby notified that any use,
dissemination, distribution or reproduction of this message is prohibited.
If you received this message in error please notify your Mail Administrator
and delete this message immediately. Any views expressed in this message are
those of the individual sender and may not necessarily reflect the views of
GMA New Media, Inc.
___
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@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] LoadMovie library

2006-08-08 Thread Bart Albrecht
Hi,

 

I looked on the internet and did not find the answer. I read a few times
can't be done

What I want to do is load movieclips in my main.swf from a library.swf and
put those movieclips on the root or put movieclips from the root in the
controller of my loadmovie.

Secondly I want to add a movieclip who is in my main.swf library to the
controller_mc. But this is not possible.

 

I also try to put a movieclip which I loaded from the library.swf to the
root. But also that is not possible.

 

I cannot make use of the shared library because the name of the library.swf
should be dynamic.

 

Here is the code:

Where I load a circle mc from the library.swf into the controller_mc. This
works.

Where I load a circleRoot mc from the library of the current swf to the
controller_mc. This does not work.

Where I load a circle mc from the library.swf onto the current root. This
also does not work.

 

this.createEmptyMovieClip(controller_mc, 1);

var libMovie = library.swf;

controller_mc.loadMovie(libMovie);

 

this.onEnterFrame = function(){

var tLoaded, tBytes;

tLoaded = controller_mc.getBytesLoaded();

tBytes = controller_mc.getBytesTotal();

var percentage = int(tLoaded*100/tBytes);

 

if (isNaN(tBytes) || tBytes  4) return;



if (tLoaded/tBytes = 1) {

delete this.onEnterFrame;

//attach circle from library.swf to controller_mc in
the main.swf

controller_mc.attachMovie(circle, circle_mc,
controller_mc.getNextHighestDepth());  //OK

 

//attach circleRoot from main.swf library to
controller_mc in the main.swf

controller_mc.attachMovie(circleRoot,
circle2_mc, , controller_mc.getNextHighestDepth()); //NOT OK  

//attach circle from library.swf to the root of my
main.swf

_root. attachMovie circle, circle_mc,
_root.getNextHighestDepth());  //NOT OK

}

}

 

Is there perhaps an other way to load external movieclips from an other swf
(library.swf) onto the root of the main.swf?

 

Thx,

Bart

 

 

___
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] LoadMovie library

2006-08-08 Thread Bart Albrecht
Thx for your reaction.
Unfortunately a shared library for each movieclip, would result in over 1000
swf's and this all for just calling some movieclips from an external
library, is overkill I think.
I hope there is still a better way for doing this.


-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Michael
Bedar
Sent: dinsdag 8 augustus 2006 16:20
To: Flashcoders mailing list
Subject: Re: [Flashcoders] LoadMovie library

First of all, try MovieClipLoader to load your swf's..

If you don't want to use a runtime shared library, then I'd suggest  
making each movieclip you want to load at runtime a separate swf.

You can export MovieClips directly from your library.

also, as long as it is set to export for actionscript, you can attach  
any MC you want, to any other MC you want at runtime.


On Aug 8, 2006, at 9:01 AM, Bart Albrecht wrote:

 Hi,



 I looked on the internet and did not find the answer. I read a few  
 times
 can't be done

 What I want to do is load movieclips in my main.swf from a  
 library.swf and
 put those movieclips on the root or put movieclips from the root in  
 the
 controller of my loadmovie.

 Secondly I want to add a movieclip who is in my main.swf library to  
 the
 controller_mc. But this is not possible.



 I also try to put a movieclip which I loaded from the library.swf  
 to the
 root. But also that is not possible.



 I cannot make use of the shared library because the name of the  
 library.swf
 should be dynamic.



 Here is the code:

 Where I load a circle mc from the library.swf into the  
 controller_mc. This
 works.

 Where I load a circleRoot mc from the library of the current swf to  
 the
 controller_mc. This does not work.

 Where I load a circle mc from the library.swf onto the current  
 root. This
 also does not work.



 this.createEmptyMovieClip(controller_mc, 1);

 var libMovie = library.swf;

 controller_mc.loadMovie(libMovie);



 this.onEnterFrame = function(){

 var tLoaded, tBytes;

 tLoaded = controller_mc.getBytesLoaded();

 tBytes = controller_mc.getBytesTotal();

 var percentage = int(tLoaded*100/tBytes);



 if (isNaN(tBytes) || tBytes  4) return;



 if (tLoaded/tBytes = 1) {

 delete this.onEnterFrame;

 //attach circle from library.swf to  
 controller_mc in
 the main.swf

 controller_mc.attachMovie(circle,  
 circle_mc,
 controller_mc.getNextHighestDepth());  //OK



 //attach circleRoot from main.swf library to
 controller_mc in the main.swf

 controller_mc.attachMovie(circleRoot,
 circle2_mc, , controller_mc.getNextHighestDepth()); //NOT OK

 //attach circle from library.swf to the  
 root of my
 main.swf

 _root. attachMovie circle, circle_mc,
 _root.getNextHighestDepth());  //NOT OK

 }

 }



 Is there perhaps an other way to load external movieclips from an  
 other swf
 (library.swf) onto the root of the main.swf?



 Thx,

 Bart





 ___
 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@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@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