Interaction between flash and javascript
I want to make a player separate from my swf file in my web page
and according to this link
http://www.adobe.com/support/flash/publishexport/scriptingwithflash/scriptingwithflash_03. html
I make two button which play and stop the swf but I need three more buttons which control sound (mute , increase volume , decrease volume)
any suggestions ...?
thanks in advance
Your going to have to unpack your array no matter what, so no.
You can make your class factory with your huge case, or, if you have the source for your lib you could modify the constructor, but its the same amount of work:
Was:
public function MyClass(s:String, n:Number, d:Date){...}
To:
public function MyClass(s:*, n:Number=0, d:Date=nul){
<case code here>
If you have a decent platform, or even javascript, you could maybe think about writing a parser that will generate the class factory case based on the constructor signatures.
Similar Messages
-
What's the difference between java and Javascript?
I a new programer, I am getting Java down. Now I want to add some java scripts to my site. Is there any difference between java and Javascript? Can I use the Java API site refference and classes? Thanks..
Java is a programming language, Javascript is more for web pages. It is used to add interactivity to your web pages. 2 different languages.
check out www.java.sun.com for Sun Java stuff.
Lynn -
What's the difference between flash and premier
I know Flash is usually used for game production and Premier for video creation, but I saw poeple also can use Flash for video production as well. So I need to know what are the differences between the two of them.
Flash is used most often for animation, and especially interactive animation.
Premiere is used for video production, but with certain limitations, such as version support, or lack of it, can work with Flash animations.
There is some cross-over, just as there is with Premiere and After Effects, but each program has specific uses.
Good luck, and that is the very short answer. Others will likely be able to give you a point-by-point difference between Flash and Premiere.
Hunt -
Difference between Flash And AIR
Hi,
Actually, What is the difference between Flash and AIRAt a very high level, Flash Player is a plugin used by browsers to display Flash content typically hosted on a server. AIR is a runtime that displays a superset of Flash Player content, but does so in an application format installed on the users system or device. In addition, there are differences in how the two interact with the file system and security policies.
http://www.adobe.com/products/flashplayer/faq.html -
Interaction between BSP and SAP GUI
Hello all,
I am having trouble with interaction between BSP and dynpros:
I have a dynpro with a container where a BSP is shown.
I would like to be able to return a value from the BSP to the control program of the dynpro.
Any ideas of how to do it?
Thanks a lot!
Helpful answers will be regarded.Hello both,
thank you for your replies, but I am still not able of performing this.
I have tried using GET/SET parameters but it is not working, I get no parameter (perhaps I am not using the sentences correctly or in the correct place).
I have also tried the code of demo program SAPHTML_EVENTS_DEMO and I think I cannot do it, I explain it a bit more:
I have a button on my BSP with some code programmed on event OnInputProcessing to be executed, and at the end I would like to return one value to the control program of the dynpro.
But if I set the html form of the BSP as action:SAPEVENT, the bsp code is not executed...
Am I doing something wrong?
Thanks!! -
Array data between Flash and PHP
As the title suggests, I'm trying to find a good way of
getting an ActionScript/Flash dynamic array into PHP, so I can
serialize it and store it in a DB, then simply give back that same
array when it's called. Are there any popular techniques? The array
will always be a different size, containing different values -
which is why I'd like to keep the array in tact, to minimise the
amount of parameter transfers. If there's no good solution, I
suppose I could pass in parameters and read them in, create an
array and serialize that... but I'd much rather find a way of
having my flasher serialize his own array and pass me the
byte-code. Is this possible?
PHP doesn't need to read the contents of the array, simply
store it in a DB, so if there's some kind of flash method for
serializing an array into bytecode that it can unserialize and read
back later, that would be awesome.
Thanks. =]
[edit]
I found this:
http://sourceforge.net/projects/serializerclass/
a serializer class. Is this the best method?Sorry, I should have explained, we already use XML for data
transfers (though I personally find JSON much nicer with less
overhead). So, in this project, we use XML for data transfer
between flash and PHP/Database. The reason I wanted this
functionality, is because the flash array, in this one case, will
be completely dynamic and the PHP doesn't need to know the contents
of the array at all. In fact, in this instance, PHP is just the
mechanism used for storing the data. Becuase of the nature of the
data, I wanted to serialize the flash array, store it in the
database as Bytecode, then when the flash needs that information
again, I can pass back the same bytecode, which can then be
unserialized back into the original array.
I think I've found the solution, the one I linked in the
original post. I should know if it's as effective as I want it to
be in the next couple of days when my flasher gives it a try. =]
Thanks for the responses. If anyone has any other ideas,
please throw them in here. -
HT202574 what is the difference between Flash and Fusion Drives?
what is the difference between Flash and Fusion Drives?
Here's Apple's explanation Mac mini (Late 2012 and later), iMac (Late 2012 and later): About Fusion Drive - Apple Support
-
How do I interact between stage and classes?
Hi,
I have asked this question before, and all I got is "Go back
to reading beginner books", so I'm hoping that someone here is
willing to actually answer my question as opposed to brushing me
off because they were unwilling to help...
And yes, I have read books on the topic and gone through tons
of the documentation and not found the answer to this. I have
ActionScript 1 and JavaScript experience, so this whole business
shouldn't be this hard.
I am using ActionScript 3 in Flash CS3.
My problem is this:
I need to find out how to send commands between stuff on the
stage and stuff that's defined in a class.
I have had this issue for ages and kept trying to find ways
around it since so far I haven't been able to find help for it.
For example:
When using a document class, how can I access the current
frame number of the Stage?
Or using a document class, how can I access any object (like
a MovieClip with instance name) that was put on the stage using the
IDE?
Currently, to be more specific, I am trying to do something
really simple:
Make a button work on my stage that is not always visible.
With AS3 that's not as easy anymore as it used to be.
So what I did now is create the button in the document class,
used addChild and set it to alpha = 0.
Now, when the Stage reaches specific frames (i.e. ones with
labels, and I got this part figured out), it is supposed to make
the button visible. Then I can add event listeners and stuff, and I
can figure that part out myself.
I don't know how to access the stage frame number from the
document class, so I put it into a frame script in frame 1, but now
this script cannot access the button that is defined in the
document class.
It's driving me bananas...
PLEASE, someone here, can someone please explain to me how I
can make this work?
I have seen plenty of diagrams of the Display List and the
Object Hierarchy, but none of that explains how to actually USE any
of it...
Thanks so much in advance to anyone who is willing to spend
some time to answer!Well, first of all, I have to say that AS3 has basically been
designed to be difficult on purpose, in that all this interaction
between objects is purposefully very strict. For this reason, I
still use AS2 for all my basic Flash work. AS3 is just a lot more
involved, a lot more strict, a lot less forgiving... you need a lot
of experience with it before it starts to make sense.
Now, I think I might have a few specific answers to your
questions:
From any DisplayObject (this includes any Document class,
which has to extend MovieClip or in some cases Sprite) you can
access the Stage using the 'stage' property.
However, stage is probably not exactly what you want, you
want the main timeline, which is the child of stage. To access the
main timeline, you can use the 'root' property of any
DisplayObject.
However, unless you have strict mode off, Flash won't let you
just say "root.myMovieClip" because the root property is of the
type DisplayObject, which is not a dynamic class (meaning you can't
add properties to it) and it has no built in property "myMovieClip"
so it thinks you made a mistake. So you have to "cast" the root
property as a MovieClip, which *is* dynamic so it will let you try
to reference anything on it (like AS1/2 did for everything.)
So what all that means is this should work from inside you
document class:
(root as MovieClip).myMovieClip
or
MovieClip(root).myMovieClip
Either will successfully reference a MovieClip you had put on
the main stage in the IDE and named "myMovieClip".
Rather than setting the alpha to 0, try setting visible to
false. I think this will disable all interactive events, where
simply setting alpha to 0 would make it still be interactive.
HTH -
How do you communicate between flash and java?
Hi,
How can you pass parameters between a Flash movie and a Java applet running on the same machine? I would like to do this without opening a new browser window or putting parameters in the url of the browser window that is running the Flash movie.Flash supports Javascript , check out actions.
set the URL like you would the Javascript for
making a method call from a webpage.
make sure that Scriptable <PARAM> has been set to true. -
Data Communication between flash and different applications
Is there a way to communicate between two different
standalone applications, without using a HTTP server ?
for eg: from Flash to JVMhi,
I want to communicate between flash exe and director exe
using local
connection object. Can anybody help me in this, by telling
the code for it. I
tried a lot using it by different ways but I am not succesful
in it yet
Thanx in advance
ANSWER :
you should make an action script to the animation & etc.
you made in your FLASH by a name as like as this : (I made a pause
Button & named it gPause);
on (release) {
getURL("event:gPause");
and then in youe director file make a MovieScript including
the following code :
on startMovie
member("name of member you imported from Flash as swf. file
").model("Bip01").bonesplayer.pause()
end
on gPause
member("name of member you imported from Flash as swf. file
").model("Bip01").bonesplayer.pause()
end -
Communication between flash and Director
hi,
I want to communicate between flash exe and director exe
using local connection object. Can anybody help me in this, by
telling the code for it. I tried a lot using it by different ways
but I am not succesful in it yet
Thanx in advancehi,
I want to communicate between flash exe and director exe
using local
connection object. Can anybody help me in this, by telling
the code for it. I
tried a lot using it by different ways but I am not succesful
in it yet
Thanx in advance
ANSWER :
you should make an action script to the animation & etc.
you made in your FLASH by a name as like as this : (I made a pause
Button & named it gPause);
on (release) {
getURL("event:gPause");
and then in youe director file make a MovieScript including
the following code :
on startMovie
member("name of member you imported from Flash as swf. file
").model("Bip01").bonesplayer.pause()
end
on gPause
member("name of member you imported from Flash as swf. file
").model("Bip01").bonesplayer.pause()
end -
Can we built connection between flash and JAVA?
Hello i m a flash developer. I need a solution to improt java class in flash.
Is there any solution to connect java and flash. Plz reply ASAP.Hi,
I have created a java class in EJB now want to import
it in Flash and want to use the object of the class.
Can u give me any program to do this?Huh?
What do you mean?
Why do you want to import an EJB into your Flash app?
It's impossible to do such a thing you know.
Also EJBs are not meant to execute on any client end.
Those are server end beasts.
From the Flash application you should call remotely the EJB through a servlet.
Please read: [url http://www.onjava.com/pub/a/onjava/2003/02/26/flash_remoting.html?page=1]Flash Remoting for J2EE Developers.
Regards -
Switching Between Flash and Other Applications
Recently when I've been using Flash, if I switch to another application, then come back into flash, it hangs for about 5-10 seconds (beach ball spinning). If you're a flash developer you know how often you go back and forth from other applications and flash, and this is causing my machine to be almost unusable with the amount of time wasted.
I verified permissions, and not sure what else I can do.
Any suggestions will be much appreciated!Yep, it was a Helvetica issue. I replaced my Helvetica system fonts that were corrupted with good ones. Even though suitcase still shows them as damaged (not sure how to fix that), they seem to be working fine.
Thanks! -
Interaction between InDesign and Flash CS5
To all the InDesign/Flash users: I have a question for you...
I've been asked something by a client: He would like to add a Google Analytics on a Flash file to track users. He cannot do it in the HTML ('cause he only creates the .swf file and doesn't have access to the HTML file), so he needs to do it in the .fla file. He has found the ActionScript code to do so, but there's a problem...
From InDesign, he needs to export as .swf, because he wants to have the Page Curl effect (and I think some other features also) that he looses if he exports to .fla.
The .swf alone works well. But as soon as we try to import it in Flash (in another .fla), it looses all it's attributes/codes and just import the layout (that keeps moving from page to page)...
If I open it in a decompiler (SWF Decompiler), it shows me there is some ActionScript code, but even then, if I decompile it and export it as a .fla, when I open I loose all the interactions (like the imported .swf).
It's the first time I see something like that. What does InDesign do to the .swf file? How can we solve that problem?
Any help will be welcomed (I'm not a InDesign user...).Turn off the editable text option when importing the PSD into Flash to convert them to images. If keeping the text editable is important then you will have to re-create the look using Flash's life effects. It's a completely different thing from PS...
Mylenium -
Copy and paste text and graphics between Flash and Illustrator
When copying text in Illustrator and pasting them to Flash, some text would become drawing objects and some remain text. A drawing object is not editable. If I import the AI file, then text remains text but the placement of graphics can be a little bit off sometimes.
It's just not possible to copy-and-paste text and graphics from Flash to Illustrator.
Is it just me? If not, when will Adobe have better integration between the 2?
Thanks,Even though you can change your InDesign preferences for Clipboard Handling to allow formatted information to be pasted into InDesign from other programs, unfortunately Illustrator still won't allow you paste in text with formatting. This is due to how Illustrator and InDesign handle text differently. Even if you copy the text from Illustrator and paste it into a program like Word, which has a lot of different ways to handle formatted text, Illustrator just treats text differently than other Adobe applications.
Maybe you are looking for
-
How can I verify an apple id already created without attaching a credit card?
how can I verify an apple id already created without attaching a credit card?
-
I am attempting to install Adobe Photoshop CS4 on Windows 7?
I have a laptop that is running on Windows 7 and I am attempting to install Adobe Photoshop CS4. It downloads the program file alright but when I click on the Set Up button it says "Cannot install Please click quit below" and then below it there are
-
I am trying to open a document I need to apply for Nursing School. Every time I click on it I get an Adobe Acrobat error that says, "This file appears to use a new format that his version of Acrobat does not support. It may not open or dicplay corr
-
I am running Windows Vosta SP2 on a Dell Inspiron 1525 and have loaded the latest iTunes software successfully. However, both times once the load is complete, I can no longer use the CD/DVD player/recorder. In MyComputer, the drive is no longer vis
-
Imported iMovie footage jitters in FCP - Workaround?
Have a problem in that I have to use segments of footage that were edited in iMovie, but they jitter when I import them into FCP. I understand iMovie muxes the audio and video, so that is probably the cause, but I need a workaround because there is n