ActionScript 2.0 :: How To Create Generic Activity Interactions
Jun 15, 2004
As I have done all my work for the week already I have been given the basically pointless takes of creating generic functions, classes and maybe components for a number of possible e-learning interactions for the projects we have, things such as sliders, drag and drops, multiple choice questions, scenario driven things and so on. How would I go about making things like this generic? The graphics will always be different and more then likely so will the kind of things needed from them, in many cases we don't know the capacity these things will be used in!
I have a flash project on the solar system. I created a drag and drop activity, dropping pictures near in the correct place/next to the correct name.
Everything is working perfectly but when I return to the home scene, the pictures are still being displayed from the acitivity even though they are on a different scene... they go away if I navigate through to different places.
I would like to create some text on the stage that does not respond to mouse activity. I've found that after adding a piece of text to a class I am using to draw, it covers up some of the mousing area of my class and disables the user from being able to roll over the other graphical elements...
Is there something like:
var t:TextField = new TextField(); t.text = "hello"; t.active = false; //
i know that this is wrong, but I haven't found an equivalent method
I try to create a function to change border property of border container.To do that I create a function for each border container on my MXML.But I'd to code better and to do a generic function.Today my function is:
protected function bcContact_mouseOverHandler(event:MouseEvent):void { // TODO Auto-generated method stub bcContact.setStyle("borderVisible",true);
[code]....
bcContact is one border container Id.I try to replace bcContact by this but it doesn't work.
I have this frame where in the button links will change whenever the textbox changes. Here is an attached sample image so you could imagine what I am trying to say. For the
textboxes (instance anme: voca2_pg and voca3_pg)
it should be 10-20 then when next button is clicked, it will be
20-3030-4040-5050-6060-7070-8080-9090-100
For short, the next and back button will operate the textboxes.
but if I type for example 25 (on voa2_pg textbox), it will show 25-35 (basically getting 10 numbers in all)
ex. I typed 43it will look like: 43 - 53 or if I type 88it will look like: 88 - 98 And then the purple button below also will change every numbering..10 - 20 the AS is:
on (release) { getURL("javascript:command_voca(1,1)","_self"); } 20-30on (release) {
I have a bunch of drag and drop interactions in my flash file that gets graded, the problem is, they can move it away and back again to make the points keep adding up. What kind of code can I put inside my draggable movie/button to say when it is placed correctly, that is it, it can't be moved again?
I am using a learning interactions quiz at the end of an animated movie. Because it is entertaining I would rather not launch as a standalone quiz. Everything works perfectly when the quiz is on its own timeline that starts at frame1, but whether I use loadMovie or use the quiz as a movieclip, or start the quiz on frame 1460 on the scene1 timeline the calculate score control doesn't work. It is called mc, frameNav and it comes with the Flash quiz templates. The AS associated with that mc is below.
with a "what should be fairly simple" problem I am having with the quiz template. I have a 5 frame quiz that I've developed from the template. All 5 interactions are Hot Object interaction types. The problem I am having is when I go from one frame to the next, the Hot Objects do not reset. Whatever the selection from the previous slide was, remains in a selected state.
I've tried renaming the Interactions in the Component Inspector, but that doesn't work. If I put some other interaction between two Hot Object Interactions, no problem. It's only when they are consecutive.
I have a bunch of drag and drop interactions in my flash file that gets graded, the problem is, they can move it away and back again to make the points keep adding up. What kind of code can I put inside my draggable movie/button to say when it is placed correctly, that is it, it can't be moved again?
I am looking at the creation of a quiz using the Learning Interactions in Flash.I noticed that when I place say a Multiple Choice question on the stage that the area which says 'Question will appear here' is a dynamic text field.This renders the final text bitmapped. Is there any way of getting the text to look like smooth like the rest of my work?I have tried to anti alias it for Animation and Readability but it doesn't change.nd in all honesty set against the rest of my work the text looks crap.
I'm using CS4 Professional with ActionScript 2.0.I'm working with a movie that contains 23 Tab keypress interactions, each of which uses this code (with each one navigating to a different frame number):
Actionscript Code: var kl = new Object();kl.onKeyDown = function(){ if(Key.isDown(Key.TAB)){ gotoAndPlay(20); }};Key.addListener(kl);
im making an image recignition app. for a kiosk and im trying to figure out a way to make the movie start over if it hasnt been touched after a certain amount of time. i tried to use a timer class but it doesnt seem to be working the way i want it to.
Anyone know of any code I can add to my project to keep a log of how many times a button is pressed? Ideally it would write to the disk with date/time stamp.
Why setloopback needs to be set to true for microphone activity to be detected. The problem is the echo feedback when using a macbook with a built in mic. Right now I'm experimenting with toggling gain, depending on activity to simulate echo reduction. Not optimal though.
Get all URLRequests() that are made within the application? Get all RTMP:// connections to a Flash Media server?
Since my application contains SWC files which were compiled by another developer, I cannot directly access the ActionScript which creates the URL requests and RTMP connections.
I have created an application in Flash and in the first frame u enter a number of parameters for the application. Then you press start and it continuose to the second frame. Here is all my code and mc.
Now I have created a RESET button and when it is pressed. I want all the functions, variables to be deleted i.e. nothing should happen.'
My first attempt was to just tell the main timeline to go to frame 1 (which is empty, only the textboxes with the param. are there), and i thought that all running functions from frame 2 would just stop. But they dont.
So how can i stop/reset all activity, cause i dont want to close the app. each time i would like to enter new values?
I have a very large projector movie with many loaded in swf files. I want to make it so as you are reading and viewing the whole movie the screensaver is not active. I then want it so after 10 minutes of no activity a screensaver (or movieclip in the movie) starts playing and then goes away when there is activity again. How do I do this? What would be the best way... just have the screensaver (movieclip) the only thing in the first scene and it just goes to this after 10 minutes?
I have a problem with using the webcam in flash. Most of the times it works fine but sometimes the wecampicture is not updated and is outputs a constant activity level of 100%.
I have to detect avtivityLevel of microphone in Flex. I am using the activityLevel property of Microphone class but as I found out it always return -1 even if I have done Microphone.getMicrophone(). To detect activity level we have to set microphone.setLoopback = true;
how to do this without using loop back as I do not want to hear my sound back just monitor the activity level
i am trying to detect the microphone activity level. In windows XP, it's returing the activity level. But in windows vista, even if the mic is not connected it's returning an activity level. has anyone come across like this.what is the problem?
i attached my fla file and the sample activity image.so before i create like this activity i try basics of this activity.so i got proplem.there are lot of line drawing
I have a set of 5 button that change their opacity when clicked to a lower opacity. What I need to add is the ability to "toggle" the button to go back and forth from 100% opacity to 20% or whatever and then back to 100%. I would also like to add the ability to fade the opacity instead of it changing all at once. Her is the code as I have it so far.
Iam having 3 buttons in stage and three corresponding movieclips. When I clicked on one button, it should play its corresponding movieclip from the second frame. (Same case for the rest of the buttons).Here the action for the three buttons are almost same, only the movieclip differs. In AS2, I can optimize the script for the above activity as below
for (var i = 1; i<=3; i++) { _root["btn_"+i].onRelease = function() { myname = this._name.split("_")[1];[code]..........
My Question is ===>is there any way to add the Event listeners for all the 3 buttons using "for loop" instead of initializing it for each buttons seperately ? [Imagine if we have more than 10 buttons and it will be very boring to add the listener for each button in a seperate line ].
Take a look at [URL] I have made a preloader for a site but the tween dosnt seem to be working properly. Stop the page from loading as soon as you see the preloader. You'll notice that the preloader circle appears to shimmer, i have no idea why. its basically a photoshop psd file that i have dropped to the stage as a graphic and then done a motion tween to make it rotate across 24 frames. I have set the html page to show the flash at 'best' quality and tried it on a black background to see if it was an optical effect, but its always the same.
I've put together a little flash activity for my educational website, and although it works perfectly on my PC (I also zipped it up and passed it onto my laptop, where it also works perfectly), when I try to open it after uploading it to the website, all it shows is the background.
[URL]
To download the ZIP file I passed onto my laptop: [URL]
I was looking this new game ([URL]) that uses the iPhone as a control pad for a flash game in your computer browser. I tried to monitor the HTTP activity of the browser but it doesn't seem to be using the HTTP protocol. Do you know how does this works? It's sockets programming? Can the flash movie become a socket server?
I have SWF application that contains some video windows and a chat window. Do you know any opportunities to save all contents of an application into video file (may be flv)? In other words i need to record all activity in program into video file. I need to do this in AS code.