Anyway, I'm looking to create a star object that flickers or blinks at random intervals. The object will also be part of a menu system and may need to perform other functions, so, I may need to roll my own class eventually.
Here is how I initally went about it:
Code: Select allfunction myRandom() {
var r:Number = (Math.random());
I have a clip in the library with the linkage ShootingStar, and I need this to be randomly placed all over the stage at intervals of between 0.1 and 1 second, as well as random sizes between 100% and 300%. And having a random tint to it.
well in my fla i have a movieclip exported with class name Star and in my Star.as file i have this code:
package { public class Star { public function Star() { this.visible = false; } }
i tried putting movieclip on and off stage but didnt work all i want to do is control my class Star in my fla. Im very new to OOP and trying to get the gist of how to control objects like the way you could by instances like i used to :/
ActionScript Code: var myTween:Tween = new Tween(star, "alpha", Strong.easeOut, 0, 0.9, 3, true);
And I also have some extra code that spawns stars all over the place.If you view my swf, http:[url]...., you can notice that the stars appear to 'flash' first before settling down.I'm simply wondering if this is some problem of the Tween class or if I set something wrong. Something I found odd was when I removed my code that generated a random colour for my star,
I'm working on a variation of the photo gallery tutorial, and I've been trying to specify random effects on a movie clip which is dynamically loading photos. I tried using the idea of the randomly loading backgrounds to specify panning effects, except that flash is running several of them on each photo instead of one case to each time a new photo loads.Here is the script, without the random effects.......
[AS] var absX = Stage.width/2; var absY = Stage.height/2; this.pathToPics = "";
I have a textbox where there should be a 1 to 5 star classification for a movie, so I used the star symbol (character code 0xAB) from the Wingdings Symbol Font. But instead of the stars, What I get is double angular quotes in Arial, the corresponding character in a normal text font: «
In fact, every Wingding character above 0x80 (included) is displayed in Arial instead of Wingdings. This also seems to happen with all Symbol fonts.
I've also made Wingdings into a font symbol but the problem still happens. It also happens in static text boxes.
To reproduce the error just make a text box and set the font to Wingdings. Now type something and it shows in Wingdings but press ALT+0171 (or copy the star from the Character Map app) and instead of a star, you get double angular quotes.
I bought a flash file the other day which i plan to modify and use for an intro to a project i am working on. Currently there is one instance of a Star which follows a path and emits "sparkles" while tracing the path. I would like to add two more stars/ paths.
i need to build a 5 star rating for a image gallery. when someone rates a image from the gallery i need to retrieve the rating (say like .5 or 2.5 or 3 or 4.5 or 5) How can we create something like a 5 star rating system in AS 3.0? Edited: not the solutions to send the rating vlues to database... I am looking for the logic to set the rating (stars changing the color indicating the rating has been updated) and get the rating values applied...
This is other part to my earlier question that i posted before for those of you that came across it.Part 2: What i'm actually looking for is to do something similar to the Star Trek Movie website [URL]..for those unfamiliar. The bit that im looking for is a solution to achieve the full screen video background they have that simulates the user walking through the starship. Everytime you navigate to a different part of the website, this background video walks you through to another section of the ship.
I'm presuming its all flv, and i'm presuming its one big flv file divided into various "scenes", as the problem with having a seperate flv file for each "scene" is that it take a few seconds to load in between flv's and you get a blank white screen for a few moments (i've tried). Am i presuming the right method to go about achieving what they've done?
I am making a flash video of a star with different colors, but I want to change the stars colors randomly. I have got the code to change the star to random colors, but now I need to reset it to it's original color.
Does anyone know the default code?
this is the coding I'm using:
(Reset button/ Default codes to return my star to it's original state) go_btn.addEventListener(MouseEvent.CLICK, goGo ); function goGo (e:MouseEvent):void { star_mc.y = 200 ;
i am develop 1 simple game for color fill to object, but now i have something wrong in my code...how do i get the correct answer if i click the red color and fill in to the star?
I'm trying to load some WDDX data into a shared object, but I'm having some troubles getting it back out. can open the sol file in a text editor and see that my data is in there, but I can't manage to access it. does putting information into a sharedObject change things? Can you load an array into a sharedObject and have it retain it's array-ed-ness?
I have flash CS4 and I understand that you can "easily" replicate the star wars text scroll effect with the 3d tools. [URL]. I have followed that tutorial to the best of my ability but no matter what I do, I cannot get the text to scroll into the distance, it just moves upwards.
has anybody seen somewhere a FLASH model of the Texas Star IPSC shooting target? What this target is and how it behaves can be seen in here: [URL] From physic's viewpoint this is a pendulum with mass and the length changing while it is swinging
In the scene there is a star and an AI player.what equation would take the AI player on the most direct route to the star...i.e guide it into the path of the star...just to make things clear, the star is static and the ai plaer is controlled by the computer. i think you have to make two variables distx and disty and use some sort of trigonometry on them but i'm not entirely sure on how to go along doing this.
I want a movieclip consisting of a dynamic text box that, from the time it's loaded onto the stage, loads a randomly selected text string from an array, and continues to loop until the clip is removed from the stage. I also want the text strings to appear in the text box for random intervals between 500 and 3000 milliseconds.
While I've found tutorials here and elsewhere on loading one element from an array, usually triggered by a button, I don't know how to combine/alter it with the other elements.So I want this movieclip on the stage randomly flashing phrases from an array, some for a barely perceptible time, and others for a readable time.
What I want is for my mc to slide to a new random x position when it is less than 5 pixels away from its target, it keeps doing this. the problem is for some bloody &*�$(()** reason my random numbers only keep going up!! why is this?? i want to produce random numbers between 1 and 770 - this is my code..
I've been putting data into an array via XML, and then selecting at random an image string to load in a pic at random. But whilst doing this, I wanted to remove the String from the Array that I have just used, so I don't get repetition of the same image in the output. I initially thought that pop would remove the string I had just used - But of course it Removes the last value in the Array instead, which doesn't really help.
Ok - so how about randomizing the data once inside the Array, after it has been pulled in from XML!? That way I can load in the 'last' image, and then pop it out! Keeping a randomized selection of images each time 'it' is loaded
A background music looping in the back, that starts with the opening of the swf and never stops. I think I achieved that with this bit of code :import flash.media.Sound;
Finally I need to jump from frame to frame randomly to play various animations. For example :Project starts, background music starts playing, we hear random sounds played one after the other, while some animations can be seen on screen, playing in a random order.
I have a picture on the stage covered by 12 squares (sq1, sq2, sq3.......sq12) When the movie opens I want the squares to move down, but i want a random sequence ( 3, 9, 2, 12...........8). I already made de function for the movement: