[Flashcoders] Attach/Duplicate

2005-11-26 Thread Devendran I
Hi guys,
  I would like to duplicate a movieClip in a specified location, is it possible?
   
  (sample, I would like to duplicate _root.source_mc and have to set inside 
_root.capture_mc.sourceCopy_mc)
   
  Thanks
  Devendran.I


-
 Yahoo! Personals
 Single? There's someone we'd like you to meet.
 Lot's of someone's, actually. Try Yahoo! Personals
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


[Flashcoders] Extract Attribute values using XPATH

2005-11-26 Thread Sajid Saiyed
Hi,
Is it possible to extract attribute values with XPath?

using the syntax:

/Nodename/[EMAIL PROTECTED]

I am able to select the node that contains an attribute, but then how
do I extract the value of that attribute?

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


[Flashcoders] Re: Extract Attribute values using XPATH

2005-11-26 Thread Sajid Saiyed
The attribute value i want to extract is here:

Nodename
Node attribute=sometext /
/Nodename

On 11/26/05, Sajid Saiyed [EMAIL PROTECTED] wrote:
 Hi,
 Is it possible to extract attribute values with XPath?

 using the syntax:

 /Nodename/[EMAIL PROTECTED]

 I am able to select the node that contains an attribute, but then how
 do I extract the value of that attribute?

 thanks

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


[Flashcoders] ScrollPane of buttons_ Not

2005-11-26 Thread adennis

Sorry to but in...but thought since your conversation seemed to imply a  
working knowledge of ScrollPane 
use: Maybe you can give me a code line hint or example to allow my buttons in 
my scrollPane to Load swf.s?
Any help ? Dennis


- Original Message -
From: Marc Hoffman [EMAIL PROTECTED]
Date: Friday, November 25, 2005 11:42 pm
Subject: Re: [Flashcoders] scroll on ScrollPane not activating

 Thanks, Josh, I'll try this. I did try Scrollpane.redraw() but 
 didn't 
 realize it needs the boolean arg.  Just spent a bunch of time 
 making 
 my own scroller, but I think I'd rather get the Scrollpane working 
 since I'm using it elsewhere and it'll look better. - Marc
 
 At 08:25 PM 11/25/2005, you wrote:
 Have you tried calling Scrollpane.redraw(true) once the image is done
 loading?
 
 - Josh
 
 
 On Nov 25, 2005, at 6:50 PM, Marc Hoffman wrote:
 
 Is there a way to force the ScrollPane to refresh so that it adds
 the horizontal scroll bar?
 
 I have a ScrollPane that dynamically loads jpegs from the server.
 Was working fine until I added movieClipLoaders with listeners to
 load the jpegs sequentially while a progress indicator is
 displayed. Now the jpegs load fine but the horizontal scroll bar
 has stopped appearing.
 
 - Marc Hoffman
 
 
 ___
 Flashcoders mailing list
 Flashcoders@chattyfig.figleaf.com
 http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
 
 ___
 Flashcoders mailing list
 Flashcoders@chattyfig.figleaf.com
 http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
 
 
 ___
 Flashcoders mailing list
 Flashcoders@chattyfig.figleaf.com
 http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
 
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


RE: [Flashcoders] enable all movieclips to broadcast their onRelease event

2005-11-26 Thread Aaron Haines

Thanks
That works a treat.

Great.


-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of robadt
Sent: 25 November 2005 19:42
To: Flashcoders mailing list
Subject: Re: [Flashcoders] enable all movieclips to broadcast
theironReleaseevent

Aaron Haines wrote:

 I want this class to exist independently of any onRelease functions which
 have been assigned directly to movieclip instances.
 
 i.e. I don't want to have to include a call to my class in the onRelease
 function of every movieclip instance - I just want my class to listen for
 any onRelease events, and then do some action depending on which clip was
 clicked.
 
 The idea is that I could then include this class in movies which have
 already been created without having to go back through and add a call to
my
 class into every button and movieclip onRelease function.

On www.mosessupposes.com I have found this CallbackDispatcher.
Link to the Class: http://www.mosessupposes.com/2005/CallbackDispatcher.zip

Here's a example how it works:

CallbackDispatcher.initialize(my_mc);

my_mc.addEventListener ('onRollOver', this);
function onRollOver(o:Object) {
 trace('rollover for '+o.target+' captured in scope: '+this);
}



Here's the copied text of the entry:

Often when I'm writing classes if there is some simple clip that I'm 
only using callbacks from, like onPress, I end up writing references and 
callback functions onto it, which is kinda tacky.

Use this class like EventDispatcher to be able to addEventListener on 
any built-in callback. Works with MCs, TextFields, and Buttons, and 
includes multiple-simultaneous add/remove methods. Examples included!


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

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


Re: [Flashcoders] Dynamic Function problem

2005-11-26 Thread Hans Wichman

Hi,
leaving the is-this-really-the-design-that-u-want discussions out of the 
equation,

var _root.current is not going to work, it should be var current:Function;

I tried it, and it works that way.

Like I said though, you might want to rethink this design.

greetz
Hans

At 03:38 PM 11/26/2005, you wrote:

Hi,
I have many functions in my movie.

On press of different buttons, I would like to cal different functions.

BUT

I am not calling them directly.

Each button press goes through a couple of common functions and then
at the each of it, it needs to call a specif function based on the
button which was clicked.

So I tried creating a var like this:

var _root.current:Function;

Then on press of the button, I would update the value like this:

on(release){
_root.current = someNewName;
_root.callToSomeFunction();
}

//--

function callToSomeFunction(){
current();
}

function someNewName(){
trace(OK);
}

This does not work.

Does the value _root.current gets stored as a function?

Am i doing it right?
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


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


RE: [Flashcoders] How to use the same MC instance in atweenedanimation?

2005-11-26 Thread Kevin Boyd (MMCR)
Ok that's a good idea!

So just wanted to check that fundamentally each time you want to animate a
MC using tween animation on the time line you have to create a 2nd instance
of the sprite for the end keyframe? So say MC is on frame 1 you have to
press F6 to insert a 2nd keyframe at say frame 10 and then right click on
frame 5 and choose create motion tween.

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Steven Sacks
Sent: 25 November 2005 20:34
To: 'Flashcoders mailing list'
Subject: RE: [Flashcoders] How to use the same MC instance in
atweenedanimation?

Instead of setting dynamic text values, set variables and assign the
variables to the textfields.

Textfield.variable = thevariablename;

 

 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED] On Behalf Of Kevin 
 Boyd (MMCR)
 Sent: Friday, November 25, 2005 11:15 AM
 To: 'Flashcoders mailing list'
 Subject: [Flashcoders] How to use the same MC instance in a 
 tweenedanimation?
 
 Need help on a simple animation problem. I have a  flash 7 file which 
 contains two channels each containing MC's that I am setting the 
 dynamic text values from Director and once set with the correct values 
 I wish for them to animate onto the flash stage. Thing is, if I create 
 a new key frame to do a tween with, that means a new instance of the 
 MCs are created, hence loosing all the data set dynamically from 
 within Director!
 Can't figure out
 how I should be doing this to keep the same instance throughout a 
 tweened animation???
 
 Thanks in advance.
 
 Kevin
 
 
 
 ___
 Flashcoders mailing list
 Flashcoders@chattyfig.figleaf.com
 http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

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


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


Re: [Flashcoders] ScrollPane of buttons_ Not

2005-11-26 Thread Marc Hoffman
The way i set it up, the scrollPane content path is pointed to the 
linkage identifier of a movie clip in the library. That movie clip 
has code in the first frame to create empty movie clips that load the 
content I want (in this case, an array of jpegs from the web server). 
As you create the empty movie clips that load the content, you should 
be able to assign each of them an onRelease, onRollover, onPress, 
etc., to do whatever you want them to do. My code may be more complex 
than what you need -- if your buttons are statically embedded in a 
movie clip, just code them as you ordinarily would, and tell 
ScrollPane (via its content path) to attach the entire clip.


Here's what I have right now, but it's not loading and distributing 
all the jpegs quite right just yet (works fine locally but not 
perfectly over the web). It loads all the jpegs, one at a time, from 
an array declared elsewhere in the movie. Distributes the jpegs into 
two rows as they're loaded, and assigns event actions to each one. 
When there are no more jpegs to load, it turns off a Loading message 
and builds a scrollbar as needed. If assigning actions this way, you 
should just call functions that call press1(), rollover1(), press2(), 
etc., so you can name them dynamically. You can define what press1(), 
press2(), etc. do, elsewhere in the movie, so you have in effect 
built a lookup table of functions.


Here's my code. I'd love it if anyone can explain why the jpegs line 
up beautifully when running locally, but get jumbled and overlapped 
when loading from a webserver (even after they're cached!):


/*/
stop();
// x position for first thumbnail:
var xPos = 5;
// variable to count up while creating loader clips:
var i = 0;
// set the spacing between the thumbnails:
margin = 12;
// set the y coords for the top and bottom rows:
row1Y = 11;
row2Y = 122;
//
//
loadThumbs = function () {
this.createEmptyMovieClip(holder + i, this.getNextHighestDepth());
// store name temporarily:
currentHolder = this[holder + i];
// create movieClipLoader to handle loading:
this[myLoader + i] = new MovieClipLoader();
// load thumbnail images into the holder:
this[myLoader + i].loadClip(images/ + _global.stock[i] + 
T.jpg, currentHolder);

// create a listener for the movieClipLoader to monitor load status:
var myListener = new Object();
// on load init for each jpeg, space it correctly into two rows:
myListener.onLoadInit = function() {
currentHolder._x = xPos;
// drop every other thumbnail into the second row (% 
= modulo in Flash):

// note first i=0, so i%2 would != 1:
if (i % 2 == 1) {
currentHolder._y = row2Y;
// after placing an element in the second 
row, increment the xPos for the next element:

xPos += currentHolder._width + margin;
} else {
currentHolder._y = row1Y;
}
// establish event actions for the thumbnails:
currentHolder.onRollOver = function() {
hintOn(stock[Number(this._name.substr(6))]);
};
//
currentHolder.onRollOut = currentHolder.onDragOut = 
currentHolder.onReleaseOutside = function () {

hintOff();
};
//
currentHolder.onRelease = function() {
trace(stock[Number(this._name.substr(6))]);
loadLargeImage();
};
// recurse this function if there are more thumbnails to load:
if (i  stock.length - 1) {
i++;
loadThumbs();
} else {
// turn off the Loading display and built 
the scrollbar:

_root.loadingMssg._visible = 0;
/// trace(done loading);
_root.thumbsPane.scrollBar._width = 
_root.thumbsPane.bg._width * _root.thumbsPane.bg._width / 
_root.thumbsPane.holder._width;
if (_root.thumbsPane.scrollBar._width  
_root.thumbsPane.bg._width) {

_root.thumbsPane.scrollBar._width = 0;
_root.thumbsPane.scrollBg._visible = 0;
} else {
_root.thumbsPane.scrollBg._visible = 1;
}
_root.thumbsPane.scrollBar.onPress = function() {
startDrag(this, false, 0, this._y + 
.5, _root.thumbsPane.bg._width - this._width, this._y + .5);

this.onEnterFrame = function() {
_root.thumbsPane.holder._x = 
-(this._x * 

Re: [Flashcoders] Dynamic Function problem

2005-11-26 Thread Hans Wichman

Hi,
thats strange becoz i copied and pasted ur code and it worked, this means 
it is probably a scoping issue.
Anyway, the idea of calling functions dynamically is not bad practice in 
itself, it just may lead to hard to understand and maintainable code.
Thats just simply a thing to look out for, i use it a lot myself as well, 
even for xml parsing.


The switch statement mentioned in the other post is a good alternative, or 
mapping it dynamically like u were trying to do in the first place i think.


greetz
Hans


At 04:02 PM 11/26/2005, Sajid Saiyed wrote:

Hi Hans,

I tried var current:Function;

Its still not working.

Sure I would like to rethink the design.

Any suggestion on how I can make this better?

I will tell you my problem.

I am usinf XPATH to load XML files.

The init() and xmlloaded() functions are common for each call.

But at the successful loading of xmlloaded()
I would like to go to a specific function based on which XML has loaded.

Can you suggest some good alternative?

Thanks

On 11/26/05, Hans Wichman [EMAIL PROTECTED] wrote:
 Hi,
 leaving the is-this-really-the-design-that-u-want discussions out of the
 equation,
 var _root.current is not going to work, it should be var current:Function;

 I tried it, and it works that way.

 Like I said though, you might want to rethink this design.

 greetz
 Hans

 At 03:38 PM 11/26/2005, you wrote:
 Hi,
 I have many functions in my movie.
 
 On press of different buttons, I would like to cal different functions.
 
 BUT
 
 I am not calling them directly.
 
 Each button press goes through a couple of common functions and then
 at the each of it, it needs to call a specif function based on the
 button which was clicked.
 
 So I tried creating a var like this:
 
 var _root.current:Function;
 
 Then on press of the button, I would update the value like this:
 
 on(release){
 _root.current = someNewName;
 _root.callToSomeFunction();
 }
 
 //--
 
 function callToSomeFunction(){
 current();
 }
 
 function someNewName(){
 trace(OK);
 }
 
 This does not work.
 
 Does the value _root.current gets stored as a function?
 
 Am i doing it right?
 ___
 Flashcoders mailing list
 Flashcoders@chattyfig.figleaf.com
 http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

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

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


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


Re: [Flashcoders] ::::::::::::: How to trace a movie ::::::::::::::: ? ? ?

2005-11-26 Thread John Grden
You could see all of that information at runtime with Xray as well as
control your movieclips and objects:

www.osflash.org/xray

hth,

Let me know if you need any help using Xray ;)

On 11/26/05, Devendran I [EMAIL PROTECTED] wrote:

 Hi guys,

   I need help from u. Is there any simple way to show a content of a movie
 as small in size.

   well, i'll explain here.

   I am having a 1500x1500 pix wide MovieClip in a 800x600 pix wide
 stage.(inside scrollpane).

   i would like to show the entire content of the movie in a 150x150 wide
 thumbNail move(which is also inside that swf).

   my problem is when ever the content of the sorce movie has been changed,
 the thumbnail movie content should be changed. all the contetnt of the
 source(Number of movieClips) are attached dynamically, and handled
 dynamically.

   (attaching a movie in thumb_mc when attaching to source_mc is a
 Complicated job in this project)

   any ideas welcome

   Thanks And Regards
   Devendran


 -
 Yahoo! Personals
 Single? There's someone we'd like you to meet.
 Lot's of someone's, actually. Try Yahoo! Personals
 ___
 Flashcoders mailing list
 Flashcoders@chattyfig.figleaf.com
 http://chattyfig.figleaf.com/mailman/listinfo/flashcoders




--
John Grden - Blitz
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders