Ask a Question related to Macromedia Flash, Design and Development.
-
Nigel #1
sequential javascript commands in actionscript
Hi,
I am trying to make DIV layers disappear on a frame of a movie no
matter how many were opened. So I have a "Forward" into which I have
added the javascript
on (release) {
currentStep = bringmenu.PreviousStep(currentStep);
getURL ("javascript:hideDiv2('dcCon02')");
getURL ("javascript:hideDiv1('dcCon01')");
}
The problem is only the second getURL command is executed. If I swap
them around, it's the same thing. Only the second getURL works. Is
there some way I can combine these or find another work around?
I've tried
getURL ("javascript:hideDiv2('dcCon02')")
("javascript:hideDiv1('dcCon01')");
(all one line)
But no luck.
Thanks,
Nigel
Nigel Guest
-
Calling ActionScript methods from javascript?
Am considering Flash MX 2004 capabilities for a project but need to make sure I can call methods I create in ActionScript from my DHTML hosting... -
sequential functions?
I'm trying to make one function go right after another function finishes. For example, say I have an EaseTo function (which would make an MC ease to... -
Help! actionscript-javascript
I have the following ActionScript function test(x) { return (2*x); } Is there any way to call this function from JavaScript embeded in the... -
Adding actionscript commands to a buttons?
I would like to play a movie clip when the cursor rolls off of a button...is this possible? Thanks! -
Sequential Number Generator
Look up Identity in BOL. "John" <jeetrana@yahoo.com> a écrit dans le message de news: 125f01c34238$a275b250$a301280a@phx.gbl... -
Brandon Bradley #2
Re: sequential javascript commands in actionscript
Nigel wrote:
You might try:> I've tried
>
> getURL ("javascript:hideDiv2('dcCon02')")
> ("javascript:hideDiv1('dcCon01')");
>
> (all one line)
getURL ("javascript:hideDiv2('dcCon02');hideDiv1('dcCon01 ')");
Not sure that will work, but it may be worth a try.
--
Brandon Bradley
Macromedia Certified Instructor
[url]http://www.attconline.org/[/url]
Brandon Bradley Guest
-
timberfish #3
Re: sequential javascript commands in actionscript
On 2005-04-02 11:01:58 -0800, Nigel <not_real@address.com> said:
It'd be better to make a more flexible Javascript function that can> Hi,
>
> I am trying to make DIV layers disappear on a frame of a movie no
> matter how many were opened. So I have a "Forward" into which I have
> added the javascript
>
> on (release) {
> currentStep = bringmenu.PreviousStep(currentStep); getURL
> ("javascript:hideDiv2('dcCon02')");
> getURL ("javascript:hideDiv1('dcCon01')");
> }
>
> The problem is only the second getURL command is executed. If I swap
> them around, it's the same thing. Only the second getURL works. Is
> there some way I can combine these or find another work around?
>
> I've tried
>
> getURL ("javascript:hideDiv2('dcCon02')")
> ("javascript:hideDiv1('dcCon01')");
>
> (all one line)
>
> But no luck.
>
> Thanks,
>
> Nigel
accept paramters from you to tell it which DIV to hide/unhide etc..
then you only have to make 1 JS call at a time. However, if you must
make multiple different calls like this - I would recommend using
setInterval or soem other way of offsetting the calls by at least
300ms. That seems to fix the issue every time.
--
The Grass Apple - { [url]www.grassapple.com[/url] } news?
timberfish Guest
-
JP #4
Re: sequential javascript commands in actionscript
I've had similar problems, it seemed to me that it was not multiple
javascript that caused the problems, just the first javascript was not
executed. My messy work around was to have a javascript command right at the
start of the code, which didn't work, then the rest appeared to do so.
I thought that maybe javascript somehow wasn't started up and it took one
command to start it. I was experiencing this when running just the swf in
IE. I didn't try any other browsers or an embedded swf.
-JP
JP Guest



Reply With Quote

