Very Basic actionscript question
Hi,
This is very basic but for some reason cant get it to work.
Basically I have a movie that plays and at the end I have a button that comes on screen but once the button stops I want the user to press the button then it goes to the url.
I have
stop() {
on (release) {
getURL("http://google.co.uk","_self","blank");
but this doesnt work.
Thankyou for any help.
I have now sorted it, I had my movie on actionscript 3 and needed to put the url code onto the actual button.
Similar Messages
-
Hi,
apologies for this being a very basic question, but I rarely
use Flash. About once a year, however, I am called upon to do some
sort of (usually very simple) Flash-based project for the students
I assist. This time it's a simple random slideshow.
The setup is this:
* I have a movieClip called 'slides_MC' containing all the
slide photos, on consecutive frames.
* This movieClip is placed inside another movieclip named
slideshowRand_MC.
This is given an instance name of topslide_mc, and faded up
and down with alpha keyframes.
The idea is that, when the slides mc is faded right down,
some Actionscript causes the slides movie to jump to, and stop
playing on a random frame, so random slides are faded up, then down
again, then swapped.
I need to apply some actionscript to particular keyframes so
that the swap is performed at the correct time.
This is my attempt at a reusable function to do the swapping.
It's placed in a keyframe on the root timeline:
// Go to and stop at random frame in slides movieclip
function goRandom(mc) {
// Number of slides in slides movieclip
var slides = 22;
// Random number between 1 and number of frames in slides
movieclip
var randFrame = Math.ceil(Math.random() * slides);
mc.goToAndStop("slide_" & randFrame);
This function is called from keyframes in slideshowRand_MC:
_root.goRandom(this.slideshow_rand_mc.topslide_mc);
I know this is really basic stuff, but can anyone tell me why
this isn't working.
I've tried adding a breakpoint in the goRandom function, but
it doesn't look like it ever gets called.
Any assistance very gratefully accepted.
AlexHi Bob, thanks for getting back to me.
quote:
Originally posted by:
Bob Pierce
"_root.goRandom(this.slideshow_rand_mc.topslide_mc);"
There's a typo in that line - if it's in your code, it won't
work!
Ah, true. The typo actually happened when I was re-writing
the code in post. The actual code in the movie is
_root.goRandom(this.topslide_mc);
This is attached to a keyframe of the container movie-clip
containing the slides MC.
I've put the fla file on our server.
slideshow_random.fla.zip
If you, or someone else could download it and help me find
out what I'm doing wrong, I'd be ever-so grateful. I'm sure it's
something really obvious. Without being very familiar with Flash
and Actionscript, it's hard to explain things, and much easier to
show you the actual Flash file.
The 2 functions are on a keyframe on frame 1 of the root
timeline. The 'goRandom' function is supposed to be called from a
keyframe in 'slideshowRand_MC'. I envisaged calling the random
pause function from another keyframe in the same movieclip.
Thanks again,
Alex -
Hi everyone, I´m somewhat new with programming and I have a very basic loop problem, that I can´t solve.
I have 3 ArrayLists:
A has the project information, ordered by client, identified by a projectId, clientId and businessId
B has the client information, ordered by business, identified by a clientId and businessId
C has the business information, identified by a businessId.
I need to show all the projects of a client, then the client information of a certain business, and at last the business information in a format like this:
A -- Project1
A -- Project2
A -- Project3
B -- Client1
A -- Project4
A -- Project 5
A -- Project 6
B -- Client2
C -- Business1
A -- Project7
A -- Project8
B -- Client3
A -- Project9
B -- Client4
C -- Business2
How should I program my loops? I've been trying different ways but everytime it doesn't print what I want. Help, please!OK, here's my code:
for(int bussCounter= 0; bussCounter< bussArray.size(); bussCounter++)
ValueObject bussVO = bussArray.get(bussCounter);
String bussId = bussVO.getBussId();
for (int clieCounter = 0; clieCounter < clieArray.size(); clieCounter++)
ValueObject clieVO = clieArray.get(clieCounter);
String clieId = clieVO.getClieId();
String bussIdClie = clieVO.getBussId();
for (int projCounter = 0; projCounter < projArray.size(); projCounter++)
ValueObject projVO = projArray.get(projCounter );
String clieIdProj = projVO .getClieId();
String bussIdProy = projVO .getBussd();
if (clieIdProy == clieId && bussIdProy == BussIdClie)
out.println("<tr>");
out.println("<td>" + projVO .getBussId() + "</td>");
out.println("<td>" + projVO .getClieId() + "</td>");
out.println("<td>" + projVO .getProjId() + "</td>");
out.println("<td>" + projVO .getTotal() + "</td>");
out.println("</tr>");
if (bussIdClie == bussId)
out.println("<tr>");
out.println("<td>" + clieVO .getBussId() + "</td>");
out.println("<td>" + clieVO .getClieId() + "</td>");
out.println("<td>" + clieVO .getTotal() + "</td>");
out.println("</tr>");
out.println("<tr>");
out.println("<td>" + bussVO .getBussId() + "</td>");
out.println("<td>" + projVO .getTotal() + "</td>");
out.println("</tr>");
} -
I apologize for this, but I can't seem to figure out this
very basic function:
I select a certian number of frames and I'd like to see at a
glance how many frames I have selected. if I select 42 frames is
there somewhere I can look that tells me I have 42 frames selected?
Thanks,
D.Quickest way to do this is to select the amount of frames you
want in the timeline then hit F6 on your keyboard to turn them all
into keyframes. Now if you look at the toolbar below it (where the
frames per second(fps), onion skinning, etc) you will see the
Current Frame displayed.
Undo to get rid of the keyframes -
Hi, as I said in the title, this is very basic. How can I set the pan on a stereo track to 9:15 or anything other than full left/right?
Thank you.Thanks. Let me see if you got it right. When I have a stereo track and I move the pan knob to left, at at 9 o'clock, is the right channel moving in the same exact opposite direction (:15) so I have a narrower stereo panning?
Or to do this I need what Bee Jay said?
Thanks. -
Forgive me, I'm really new to this.
Ok, so I'm wanting to have ads radomly play before people watch a video on my site.Is there a way to write the script for this and place it in the xml or do I have to something differently.
I already have the video up on our site. So I'm just not sure how I "connect" the actionscript and xml that way it plays the commercial before the video.
Do I have to build a new player and everything to do this? I've never built a player before, so if I don't have to, I'd rather not. Thanks.This is not a basic question but rather extensive topic.
Yes, there are ways to connect anything to XMLs. But you have to write your own application/player that will contain the logic to do that.
Also, there are open source player out there that may do what you ask. -
Very basic compiling question: multiple c files
Hi,
I've been playing with alchemy for a few days, and hit a road block. I'm sure there is an easy answer, but I can't find it...
I have a .c file "alchemy_project.c" that lets me call 3 functions from actionscript. I have the basic main() function that sets up the functions and calls
AS3_LibInit(result);
It is working well. However, I want to add another c file "support_functions.c" with a function I can call from "alchemy_project.c".
int testFunction(){
int i;
i = 2;
return i;
I made a header file "support_functions.h":
int testFunction();
I included this header in "alchemy_project.c" by placing it after my AS3.h include:
#include "AS3.h"
#include "support_functions.h"
I compile with:
alc-on
gcc alchemy_project.c support_functions.c -Wall -swc alchemy_project.swc
When I run my flash file, it gives:
Undefined sym: _main
If I add a main function to support_functions.c:
int main(){
return 0;
I get:
[object AlchemyExit]
Any tips?
Thanks for the help!This helped me a little bit:
http://forums.adobe.com/thread/465926
I now compile the 2 c files with:
gcc -c file1.c -o file1.o
gcc -c file2.c -o file2.o
then link them with
gcc file1.o file2.o file3.o -O3 -Wall -swc --combine lib.swc
I don't get any errors about main(), but actionscript gives me the error:
Undefined sym: _testFunction
when alchemy_project.c tries to call the testFunction() function in support_functions.c -
Hi,
I'm pretty new to dealing with this so please bare with me. I come from a PHP background so I got alot to learn here ;) Anyway, to my question then. I've got a book that im reading and following examples from but also try to evolve those examples into something more, to try and learn even more. I haven't come very far yet but I've stumbled across a little thing that I woulld like some help with. I'll post the complete code just in case.
import java.io.*;
import javax.microedition.midlet.*;
import javax.microedition.lcdui.*;
import javax.wireless.messaging.*;
import javax.microedition.io.*;
public class quiz
extends MIDlet
implements CommandListener {
private List mList, longList;
private Command mExitCommand, mNextCommand, longExitCommand, longNextCommand;
public quiz() {
String[] stringElements = { " Game 1", " Game 2", " Game 3", " Game 4", " Game 5", " Game 6", " Game 7", " Game 8" };
Image[] imageElements = { loadImage("/1.png"),
loadImage("/2.png"),
loadImage("/3.png"),
loadImage("/4.png"),
loadImage("/5.png"),
loadImage("/6.png"),
loadImage("/7.png"),
loadImage("/8.png") };
mList = new List("Quiz v1.0", List.IMPLICIT, stringElements, imageElements);
mNextCommand = new Command("Choose", Command.SCREEN, 0);
mExitCommand = new Command("Exit", Command.EXIT, 0);
mList.addCommand(mNextCommand);
mList.addCommand(mExitCommand);
mList.setCommandListener(this);
void HowMany() {
String[] stringElements = { " 1 question", " 2 questions", " 3 questions", " 4 questions", " 5 questions" };
longList = new List("Quiz v1.0", List.EXCLUSIVE, stringElements, null);
longNextCommand = new Command("V�lj", Command.SCREEN, 0);
longExitCommand = new Command("Avsluta", Command.EXIT, 0);
longList.addCommand(longNextCommand);
longList.addCommand(longExitCommand);
longList.setCommandListener(this);
public void startApp() {
Display.getDisplay(this).setCurrent(mList);
public void commandAction(Command c, Displayable s) {
if (c == mNextCommand || c == List.SELECT_COMMAND) {
int index = mList.getSelectedIndex();
if ( mList.getString(index) == " Game 1") {
HowMany();
Alert alert = new Alert("Your Choice", "Your choice: Game 1 with X questions.", null, AlertType.INFO);
Display.getDisplay(this).setCurrent(alert, mList);
if ( mList.getString(index) == " Game 2") {
HowMany();
Alert alert = new Alert("Your Choice", "Your choice: Game 2 with X questions.", null, AlertType.INFO);
Display.getDisplay(this).setCurrent(alert, mList);
if ( mList.getString(index) == " Game 3") {
HowMany();
Alert alert = new Alert("Your Choice", "Your choice: Game 3 with X questions.", null, AlertType.INFO);
Display.getDisplay(this).setCurrent(alert, mList);
if ( mList.getString(index) == " Game 4") {
HowMany();
Alert alert = new Alert("Your Choice", "Your choice: Game 4 with X questions.", null, AlertType.INFO);
Display.getDisplay(this).setCurrent(alert, mList);
if ( mList.getString(index) == " Game 5") {
HowMany();
Alert alert = new Alert("Your Choice", "Your choice: Game 5 with X questions.", null, AlertType.INFO);
Display.getDisplay(this).setCurrent(alert, mList);
if ( mList.getString(index) == " Game 6") {
HowMany();
Alert alert = new Alert("Your Choice", "Your choice: Game 6 with X questions.", null, AlertType.INFO);
Display.getDisplay(this).setCurrent(alert, mList);
if ( mList.getString(index) == " Game 7") {
HowMany();
Alert alert = new Alert("Your Choice", "Your choice: Game 7 with X questions.", null, AlertType.INFO);
Display.getDisplay(this).setCurrent(alert, mList);
if ( mList.getString(index) == " Game 8") {
HowMany();
Alert alert = new Alert("Your Choice", "Your choice: Game 8 with X questions.", null, AlertType.INFO);
Display.getDisplay(this).setCurrent(alert, mList);
else if (c == mExitCommand)
notifyDestroyed();
public void pauseApp() {}
public void destroyApp(boolean unconditional) {}
private Image loadImage(String name) {
Image image = null;
try {
image = Image.createImage(name);
catch (IOException ioe) {
System.out.println(ioe);
return image;
}I know that the IF parts pretty much suck, will improve those later on (or when my book does hehe) so that's not the issue. Anyways, I've included a second choice for the user which is what I call "HowMany", so first the user gets to choose between a few options (Game 1, Game 2, etc etc) and then the idea is for the user to choose how many questions, I get to that menu allright but when i try to choose that option nothing happens. I need to include some kind of listener or something to make something actually happen right? If someone would be so nice to show me how it's done it would be just super.
Thanks in advance!I get to that menu allright but when i try to choose that option nothing happens.The form of javax.microedition.lcdui.Display.setCurrent you use ispublic void setCurrent(Alert alert, Displayable nextDisplayable)Which List do you want to be the nextDisplayable? mList or longList?
Once that works, you will need to add suitable condition checking in commandAction(...) for doing stuff when the Command-s added to longList are selected.
db -
Very basic modules questions (ath_pci, etc)
Hello! (I'm sorry, I posted this one in another forum first, thinking I was posting it in this one :oops: )
I have a very simple question:
Where can I find modules (e.g., ah_pci for my Atheros mini PCI wireless card), and where and how do I install them?
For example, when I do:
modprobe ath_pci, I get a message saying something like:
can't find ath_pci module;
although I've seen a directory with this name on my system (IIRC, under /sys/drivers???).
Other example:
I have a 855GM Intelchipset. How do I find the module for it and how do I install it?
Thanks a lot.Thanks for the reply, and for deleting the other thread.
I looked for /lin/modules, and I don't have a /lin directory... Is it normal?
Or maybe you meant /bin/modules...? Anyway, I looked for this too and there is no /modules directory under /bin.
I found some modules under /sys/module. There is one named ide_cd that I put in the MODULES array of rc.conf (just for a test, I don't know why it is for...), but I get a message at bootup:
[/code]FATAL: module ide_cd not found[code]
Is this normal too? Or it has to be compiled with the kernel to work. And BTW, if I compile the kernel (I don't think I'm at this point in Linux yet!), do I loose my installation or if everything stays in place in my system?
Thanks a lot![/code] -
Very basic String + @ question
Hello all.
I'm trying to use the "BitmapMetadata.GetQuery(String query)" method. I've found a few examples online where the argument string is specified as follow:
string iptcRegion = @"/app13/irb/8bimiptc/iptc/Province\/State";
As I understand it, the use of "@" is so that I don't have to specify "//" everywhere...but what is the meaning of "\/" at the end just before "State"? Thank you in advance.
-LThanks Armin, but if it has no special meaning why is it being written that way? I understand that the "@" is specifying a literal string, but something is just not clicking here. I'm sourcing the above strings from two places:
https://social.msdn.microsoft.com/Forums/windowsdesktop/en-US/371f5e90-1a59-412d-8ae0-de7814da6158/iptc-query-using-bitmapmetadatagetquery-method-?forum=windowswic
and
http://www.dustyfish.com/blog/basic-editing-of-photo-metadata-using-windows-imaging-component
I've read and re-read these the two above posts but I just cannot make sense of their use of "/" and "\" and "@". There seem to be 3 different ways being shown and I can't figure out which one is correct. Can anyone clear this
up for me? Thank you very much. -
Web Service With Dynamic URL (Very Basic Conceptual Question)
Hi everyone,
I would like to employ JAX-WS to generate and publish a web service along with a web-based client which uses the service. The problem is: I want to deliver both the server (with its service) and the client to a customer, who will install the server on an internal machine, and who will have to configure the client to look for the web service at the IP of that internal machine, ideally by just putting the IP into some configuration setting. Both the services' path (on the server) as well as the services remain constant.
From everything I have found so far, it appears as if one fixes the service's IP during compilation, i.e., when generating the WSDL and stubs using wsgen/wsimport. I guess that's fine when the server remains with me & a fixed IP, but doesn't this approach break down as soon as you need some flexibility in the server's IP, as, e.g., in my above scenario? I guess I am missing something, but unfortunately all the documentation I have found so far either neglects this issue or comes up with rather complex solutions indeed. - Or would one not use SOAP+WSDL in the above scenario in the first place? Any other best practices?
I'd very grateful for any hints,
Cheers
equitone
Message was edited by:
EquitoneHi,
thanks for your reply. Of course, I agree I could alter the generated code, but, as you say, I would not want to do that, since it will make automatic builds and deployment rather complicated.
I guess my expectations on the "flexibility"/"design" of some of the generated artifacts is just a bit skewed, and I'll have to find a compromise between my expectations and the Java 6 way of web services. For instance, I also find it somewhat annoying that wsgen will apparently only generate the service against an implementing class, not an interface. E.g., when I have the following web service interface MyService and an implementing class MyDummyService:
@WebService
public interface MyService
@WebMethod
public String getString();
@WebService(endpointInterface = "com....MyService")
public class MyDummyService implements MyService {
public String getString() {
return "Just a dummy.";
}Then the service in the WSDL specifies its Port as "MyDummyServicePort", so if I ever change the implementation---without actually changing the (web service) interface, I will also have to regenerate all client stubs. I would have hoped that wsgen's "service" option would help in this regard, but apparently it doesn't. Unfortunately, the documentation on the whole issue is in a pitiful state, IMHO.
Cheers
Equitone -
Logic Express 8.02. I have four bass takes. Various parts of each are needed. I've read the manual and there is no explanation about how to select just a small section of a take. The only way I see to do it is to go to the beginning, drag all the way to the start point and go all the way to the end and drag left to the end point. After that, however, I see know way to use a later or earlier part of that take again without duplicating the track. I know how it should work. I should be able to "lasso" part the part of the take I want as I go through the song and make the lassoed parts active. The manual touches on this, but when I try to "select the desired take sections by click-dragging over them with the Pointer tool" nothing happens. I'm sure this is really easy, but not easy to figure out. What's the trick? Thanks for any help.
OK. It seems to be working now. That figures right after I post a question. I hit "revert to saved" and now I see how it works...I think.
-
I have a laptop and a mini, and I work on both and have difficulty keeping track of where documents are, which is the latest version, etc. What I'd like is to have is a server on which all the documents are kept and where the drive on the server shows up as a drive on the desktop of the laptop and mini (via wifi). Thus, I would always use the same files on the server via wifi, no matter which computer I'm using.
Does the Apple server provide this feature? If so, is the connection good enough that there won't be noticeable lag?Hi
+"Does the Apple server provide this feature?"+
Yes. You don't necessarily require Server OS as any client OS (regardless of platform) can provide simple file sharing. Peer-to-Peer File Sharing is built-into OSX and Windows. All you have to do is decide not to use that designated computer as a workstation. If there are only two workstations OSX Server could be overkill? Perhaps a second-hand G5 with a couple of 1TB drives and 10.5 Client OS would be a cheaper, better option? Other things you need to consider is some form or redundancy and backup. What plans do you have in place if the 'server' drives fails? Additionally do you have the necessary skill set to deploy and maintain a server and its environment?
Perhaps a NAS drive could be a better, cheaper, easier solution for you?
+". . . is the connection good enough that there won't be noticeable lag?"+
Only you can really answer the question. Mileage will vary depending on speed and bandwidth of the network, amount of data in terms of quantity, file sizes etc and frequency of access amongst other things.
Tony -
I am having troubles finding technical information about how RMI works, exactly. Specifically, I can't find out how the JVM and RMI is working on the remote machine.
Say you have the server app running and 2 clients invoke the same method at the same time. Does the JVM create a new thread per request? Do these threads exist within the same JVM? (I believe both answers to be "yes"...)
Basically, I have a program which causes the server to write a serialized objects to disk, and numerous clients are occasionally requesting these serialized objects from the server for remote processing. I want to be sure that the same file can't be served to more than one client.
If someone can point to me a resource, I'd be delighted.
TonyYour instincts are correct - the remote jvm will spawn separate threads for each incoming request, so you will have to provide some locking mechanism to ensure your serialized objects' state
-
Hi - for whatever reason, I have never been able to get my hands around graphs and their data. Currently I have a parallel loop running, which aquires the present reading from a piece of lab equipment . Obviously this output is not an array, but single points. What is the proper way of charting this onto a waveform chart? Should I be shifting the data out of the while loop, and then appending the new data to an array? Currently I use the 'build array' on the output, and send this to the chart.
By surface appearance this looks to work. However my timebase is off. Because the sample time is not always consistent, what is the best way to configure the dT/d0? Should I actively be measuring the time to aquire the signal, and piping this into the chart?
Thanks for entertaining my entry level questions!
Best Regards,
Jamie
v2009 devel. w/RTHi - thank you for your response and explaination. I have attached a VI, which works exactly as I need. :-)
My next question is how do I combine the data to stack these two plots (vs overlay). In the past I have clustered the two 'arrays' of data, but I can not cluster the two waveforms. I tried to bundle the two waveforms, as well as build waveform (from output of two waveforms).
Getting there,
Jamie
v2009 devel. w/RT
Attachments:
waveform_chart-broken.vi 13 KB
waveform_chart-working.vi 17 KB
Maybe you are looking for
-
How do I print black and white on Mountain Lion?
Hey. Does anyone know how to print black and white on Mountain Lion? I searched the community and Google but I couldn't find anything... Regards, TeaDragon
-
Crashing after upgrade to 10.8.5
I read a number of notices about Mac Pro (5.1, built november 2011, model 2010) crashing after waking from sleep after upgrading from 10.8.4 to 10.8.5. My Mac Pro crashes after starting up (just after the Apple appears). I then get something that loo
-
XML Comparision Using XDX - Issue with Carriage Return key
Hi I am using oracle XDX for doing a comparision between 2 xml files .I have issue is any node contains a enterkey chr(13)||chr(10) the xml shows that node as different.Even though they are same .
-
IS Mill functionality in ECC 6.0
Hi experts, I wanted to use an IS mill specific functionality of PRT capacity planning in ECC 6.0. How can I do this?. Is it possible to activate only this functionality of IS Mill in ECC6.0. Is there any implication by doing so? Request you please r
-
Hi all. I'm on SQL Developer 3.1.07. I have a little question: is it possible to import a txt file using sql developer? When I try it, it gives me this error: no process reading recorded for the type txt How can I load data into my database, txt file