Macromedia Flash Server - Simple help

This is Interesting: Free IT Magazines  
Home > Archive > Macromedia Flash Server > June 2005 > Simple help





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Simple help
John

2005-06-17, 5:45 pm

I'm having trouble calling a function that is on 1st frame actionscript..I'=
m=20
trying to call it from inside a component something like=20
_parent.myfuction(param) ...the function gets called but the parameter whic=
h=20
is a simple string ends up undefined when i trace it inside that function.
A simple example :
frame 1 actionscript
-------------------
function myfunction(parameter:String){
trace(parameter);
}
------------------
inside a component added on 1st frame...lets say a button which is inside=
=20
that component
-----------------
on(press) {
parameter =3D "OK";
_parent.myfunction(parameter);
}
----------------
Any help?
Many Thx !

=-----------------------------------------------------------
Supported by Fig Leaf Software - http://www.figleaf.com
=-----------------------------------------------------------

To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcomm

MJorge

2005-06-17, 5:45 pm

try,

on(press) {
parameter =3D "OK";
this._parent.myfunction(parameter);
}

if it doensn=B4t work the next event would work assuming your function is a=
t=20
the Main Timeline....

on(press) {
parameter =3D "OK";
_root.myfunction(parameter);
}

On 6/17/05, John <outsourcer-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
>=20
> I'm having trouble calling a function that is on 1st frame=20
> actionscript..I'm
> trying to call it from inside a component something like
> _parent.myfuction(param) ...the function gets called but the parameter=20
> which
> is a simple string ends up undefined when i trace it inside that function=

..
> A simple example :
> frame 1 actionscript
> -------------------
> function myfunction(parameter:String){
> trace(parameter);
> }
> ------------------
> inside a component added on 1st frame...lets say a button which is inside
> that component
> -----------------
> on(press) {
> parameter =3D "OK";
> _parent.myfunction(parameter);
> }
> ----------------
> Any help?
> Many Thx !
>=20
> -----------------------------------------------------------
> Supported by Fig Leaf Software - http://www.figleaf.com
> -----------------------------------------------------------
>=20
> To change your subscription options or search the archive:
> http://chattyfig.figleaf.com/mailman/listinfo/flashcomm
>=20




--=20
------------------------------------------------------------
M=E1rio Jorge
Mail: info-ytxgWPgSEmhwATOyAt5JVQ@public.gmane.org
Web: http://www.beedigital.net
Blog: http://www.beedigital.net/blog

=-----------------------------------------------------------
Supported by Fig Leaf Software - http://www.figleaf.com
=-----------------------------------------------------------

To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcomm

Simon Lord

2005-06-17, 5:45 pm

If I understand correctly, you have a component on stage with some code
on frame one of the timeline. The component has a button which you
would like to execute code in frame 1 of the timeline correct? If so
then I think this is a scope issue as _parent.myfunction() is going to
target frame 1 of the timeline within the component itself and NOT the
projects main timeline.

Try _root.myfunction(parameter);




On Jun 17, 2005, at 11:22 AM, John wrote:

> I'm having trouble calling a function that is on 1st frame
> actionscript..I'm
> trying to call it from inside a component something like
> _parent.myfuction(param) ...the function gets called but the parameter
> which
> is a simple string ends up undefined when i trace it inside that
> function.
> A simple example :
> frame 1 actionscript
> -------------------
> function myfunction(parameter:String){
> trace(parameter);
> }
> ------------------
> inside a component added on 1st frame...lets say a button which is
> inside
> that component
> -----------------
> on(press) {
> parameter = "OK";
> _parent.myfunction(parameter);
> }
> ----------------
> Any help?
> Many Thx !
>
> =-----------------------------------------------------------
> Supported by Fig Leaf Software - http://www.figleaf.com
> =-----------------------------------------------------------
>
> To change your subscription options or search the archive:
> http://chattyfig.figleaf.com/mailman/listinfo/flashcomm
>
>

Sincerely,
Simon


=-----------------------------------------------------------
Supported by Fig Leaf Software - http://www.figleaf.com
=-----------------------------------------------------------

To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcomm

Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com