ActionScript 3.0 :: Way To Manage Random Effect
Nov 13, 2009I could able to make random movements in a movie clip. but i want to adjust the moving speed and direction of it.
View 0 RepliesI could able to make random movements in a movie clip. but i want to adjust the moving speed and direction of it.
View 0 RepliesI have a pendulum that swings infinitely. I'd like to set the maximum angle to a random amount to give it a sort of "blown by a random wind" effect. I'm not great at code, so I can't figure out how to randomize "maxAngle" without making the animation jerky. Does anyone have any ideas on how to do this? Here is my code and FLA...
[Code]....
I made a semi-sinewave effect (view attachment) and it works fine with one exception. I want for it to wave on random intervals (from 1-15 seconds) instead of continuously, but I can't get it working right. Here's the code:
[AS]
pts = 5;
sine = 0;
[code].....
I would love to know how to make this: Yugop.com Those random typo over the btn's. I've been searching but anything I found it wasn't just like them.
View 2 Repliesi want to random load some movieclips i made with a tween effect.i made this code but it's not working good, i get some errors, maybe u fixing this code or come with another
Code:
import fl.transitions.Tween;
import fl.transitions.easing.*;
[code].....
im not exactly sure where to start right now im using a script for dhtml to rotate imaged randomly what i hope to accomplish is background , that will have some type of transition effect and randomly show my images
i have 32 images atm i would like to rotate through i found this and have tried to use it , but not exactly what i want , i need a transitional effect of somekind, and want it to rotate at a given amount of time , say maybe 12seconds[URL]...
code of loading random movie clips for example fac1_mc,fac2_mc,fac3_mc and etc, i want them to display random on my screen with tween transition i'm gna post the fla so you can see what i want to do, or the other way is to make more external swf's with picture animated and load them random with a 10sec between them. here is the link to my .fla with movieclips animated, and dunno how to make them to display random and animated
[Code]....
I am trying to make a so called pixel effect in witch I want to make a shape only from pixels that are positioned in some random place on the stage. And all these pixels move to a certain point and create that shape. I've been looking into BitmapData Class but I don't now if that is the best way to do it.
View 2 RepliesI'm creating a mask effect. i create 10 movieclip with a library class reference that appear on the screen with a random alpha effect. THe problem is that if i try the effect alone all works ok. if i mask the layer that contains the effect on an image i don't see the effect. i see directly the image masked with the boxes. i can't explain that because i've the effect first but it seems that when i test the movie the effect doesn't play and the boxes appear directly on the screen.
View 5 RepliesI am still using flash MX. I'm pulling random text from a textfile (array.txt) into movieclip instance textbox.[code]All is good, but now my question is if I can have a text effect as well. For example having the random quotes typed out as they appear.
View 16 RepliesJust want to put the thumbnails in a movie clip.Not any thumbs are appearing, there is a mc on stage, there are images and thumbs, there is a xml_fileďż˝
Code:
var gallery_xml = new XML();
gallery_xml.ignoreWhite = true;
gallery_xml.onLoad = function(ok) {[code]...
My code structure is
FlashTesting --> folder contains
Test.fla with one button called cmd_button
engine --> folder contains
[code]....
When I compile output says 1120: Access of undefined property cmd_button
folder structure
FlashTesting -->engine--->code
All I want to access cmd_button to add EventListener which is in code folder. Seems can't access fla components.
I need to use gotoAndPlay with a timeline situated within a MC. So, how can I identify this timeline from the main one?
View 2 RepliesI have a very big proyect completelly developed in FLASX MX PROFESSIONAL 2004. In order to manage it,I have divided the file in several parts. What I want to do now is to connect that parts and compile them as a Whole.
View 12 RepliesI have swf file containing a game with english language. for question sake will call it mygame.swfNow what I want to do, is to take the fla file and translate it to french and german and save to differen swf files.So now i have:English - mygame.swfFrench - ygame_fr.swfGerman - mygame_gr.swfSame game, different language.My question is: what is the acceptible / good way to contain text in fla file so it will be in one place? like hashtable or some array?I am developer, just not flash developer this is why Im trying to consoult Im not interested in keeping data in external files (xml), I want everything to be keept within swf.
View 1 RepliesI use AIR HTML component, and I need to delete cookies sometimes. I have to open IE and delete cookies there... Can I do it via AS code?
View 1 RepliesI'm working on an AS3 project that must load a lot of external files; images, sound clips, movie clips etc. The program first loads an XML file that contains the file names of all assets needed by each class. From that point on I'm not sure what would be the best way to distribute those assets.I thought about making a dedicated assets class that will load everything the XML object describes, and then pass it to each class' constructor so they can access the objects they need. This seems like the "tidiest" option, but is there a best practice way for managing loaded assets?
View 1 RepliesPURE MVC - In my application there are multiple screens which are minimized like in windows desktop. Now each has different instances of mediator which have same notification. So if I do changes in one screen say press some button >> which sends some command >> to proxy >>then proxy sends notifications to mediator. But as multiple screens are active there it is showing changes in all screens as they are notified too by proxies. How to make sure that proxy calls to particular view component (mediator) and not for all live instances of mediators ?
View 1 RepliesI wrot a FLA in AS3 which is basicaly a nicly designed Loader which loads little cute SWF games. Each game is built a bit differently and has its own 'thing'.I was wondering, how can I control the sound of the SWF's from the Loader File?
Which leads me to a wider issue of how can I control variables of a loaded SWF.
I'm trying to contol the amount of time that a video plays, using netstream. I need to have the stream stop or pause after a amount of time... Here is the code...
var flvPlayback:FLVPlayback = new FLVPlayback();
var flvPlayback1:FLVPlayback = new FLVPlayback();
var cuePt:Object = new Object(); //create cue point object
[code].....
I cannot manage to the focusSkin for a datefield.
In my css I have done the following:
mx|DateField { focus-skin: ClassReference("skins.myFocusSkin"); skinClass: ClassReference(".myInputSkin"); }
My focus Skin is as such:
import spark.components.supportClasses.SkinnableComponent ;
private var _target:SkinnableComponent;
public function get target():SkinnableComponent
[Code].....
However, when the datefield gets focus, I get the following error :
TypeError: Error #1009: Cannot access a property or method of a null object reference. at skins::myFocusSkin/updateDisplayList()
I have a simple test for how I want a game im making to work. A movie clip is placed on the stage, upon which I want it to start floating to the top of the screen according to given x and y coordinates. But I cannot manage to get the clip to move.
View 1 RepliesI would like to know how to manage timing in AS3.Let say I have some functions in a code and all of them trigger an animation.
A) I would like to run the functions one by one, but next function must not be triggered before the animation of the previous one is completed
B) I would like to run the functions one by one, but next function must be triggered certain time after the animation of the previous one is completed.
URL...The problem is controlling which are the elements to be moved, and mostly, how to manage the amount of movement. When I open a submenu, I've got to move all the subsequent buttons down. But when I close a submenu, I've got to move them up. If I'd do it in different times, no problem.
View 5 RepliesI'm creating a movie object using images. I'm using PNG file types with an alpha channel. Each frame is approx 640 x 480, each single pitch image is 36 frames creating an image 23040 x 480. If it's a multidimensional image it is 23040 x 11520. I load the image in using "img_name".loadMovie("imageFileName", 1);
The problem is it only seems to load around 2880 pix of the image.
How can I get it to load the whole image? How can I choose it to load the next section of the image?
Does anyone know if it's possible with any of the Adobe products to automate and manage streams?
We've got a project that will be streaming pre-recorded video and music. Due to the number and frequency of these streams we need a way for us to automate and manage these through our own CMS system.
We will be ultimately pushing these streams out to our CDN provider so no end user streaming actually required.
[Code]...
I have installed the development media server, played arround with some of the demos and now i'm looking for the possibilty to manage my VOD video files. But i can't find any tool, or informations delivered by the server how much video files are in the vod directory.
View 3 Replieshow to manage the target of a mouse event. As everyone knows, if I use localX/Y property on a mouse event, I'll get the x/y coordinate of the curson referred to the target Sprite. But if I need these coordinate referred to another Sprite, layed in the bottom of the stage (therefore unreachable for the event), how can I do for these?
View 1 RepliesPart of a larger presentation I've made, there is some background music. What happens is an XML file is read to get a file to play. It plays. When it finishes, it reads the XML again to get the new file. It can also stop when a video plays elsewhere in the presentation then I pick it up where it left off and start the process again. Trouble is, the presentation randomly stops. The music stops and the slides in the presentation stop. The music and slides come from a single XML file. There's also a third part of the presentation (a text crawler) that never stops.
This comes from a totally separate XML file. I never get an error, the presentation just stops on a slide and no more music plays, but the crawler keeps crawling. I've removed all the code for the music and it runs perfectly so it's obviously related to how the music is managed. So, finally, my question is how do I manage sound objects? If I need to create new objects for each sound I load and play, I'll need to do manage the sound from a single function, right? Something like:
Code:
function whatever():void {
if song is not loaded {
read xml, load and play song;
} else if video is playing {
pause the song;
} else if video has stopped playing {
resume song;
}}
For loop contains an event listener function. but loop iteration is quicker than listener function.Before the listener function completes next iteration starts. how to handle this?
View 2 Replies