Questions For Experts And Gurus
How do I find out the number of movieclips in the movieclip?
I could do this... but is there an easier way?
var count = 0;
for (var property in myClip) {
if (typeof myClip[property] == "movieclip") {
count++;
}
}
FlashKit > Flash Help > Flash ActionScript
Posted on: 11-30-2004, 04:13 PM
View Complete Forum Thread with Replies
Sponsored Links:
Calling All Gurus & Experts...
Hello
I've created a custom mp3 player using Flash 8, but optimized it for flash player 6 and actionscript 1.0 based upon the code that I've acquired in the Tutorial Section.
For the most part, it works great for ME....but everyone else that visits the site seems to have problems, and I don't understand why.
The problems aren't even consistant, which is the craziest thing. What happens is that, sometimes, the mp3 will load and SHOULD start to play upon loading, but it doesn't, and I don't know why. So you have to click on the name of the track AGAIN after it's loaded for it to play. I have 10 tracks available, and each of them have issues from time to time. Some people can't hear anything at all, and I've advised them all to update their flash players.
The site address is as follows: http://www.idestudios.com/musicbox
Here is the code that sits in the first frame of the movie:
***** This is on layer 1 *****
mySound = new Sound(mySoundMc);
mySoundVolume=100;
mySound.setVolume(mySoundVolume);
***** This is the code on layer 2 ******
this.onLoad = function () {
mySoundLoading=0;
_root.loadBar._xscale=mySoundLoading;
}//END onLoad
this.onEnterFrame = function () {
mySoundBytesTotal = _root.mySound.getBytesTotal();
mySoundBytesLoaded = _root.mySound.getBytesLoaded();
if (stopped!=true && myEvent==1) {
myMusicDurationText = int(_root.mySound.duration/1000);
myMusicPositionText = int(_root.mySound.position/1000);
}
if (preloadNow==1 && mySoundBytesLoaded>0) {
mySoundLoading=Math.round((mySoundBytesLoaded/mySoundBytesTotal)*100);
if (mySoundLoading==100) {
preloadNow=0;
_root.mySound.start()
_root.status="NOW PLAYING";
}
else { _root.status="LOADING"; }
_root.percentLoadedText=mySoundLoading+"%";
_root.loadBar._xscale=mySoundLoading;
}//Close if-statement
}//END onEnterFrame
****** This is the code that's executed when you click on a track name ***
on (release) {
playing=true;
_root.preloadNow=1;
_root.mySound.loadSound("music/iwillbless.mp3");
_root.desc="This song is sung by Avery McKnight. All music written by Gregory Speights";
_root.trackname="I WILL BLESS THE LORD";
_root.gotoAndPlay("StartMusic");
_root.songIsLoaded=1;
_root.myEvent=1;
_root.myMusicPosition=0;
mySound.start();
}//END
**********************
Please please help. I've done all sorts of things to try to get it to work....I've published it with Flash Player 8 & actionscript 2.0, and different variations, but the best results were when it was published for Flash Player 6 & actionscript 1.0.
I appreciate any help in advance. Thanks so much.
Greg
View Replies !
View Related
TWO Questions For The Gurus Out There...
QUESTION NUMBER ONE - In Flash MX I am attempting to create a button that exits the .exe running the flash application but cannot seem to figure it out.
QUESTION NUMBER TWO - I am also attempting to create a button that calls an external .exe - thereby launching it. Any ideas?
THANKS IN ADVANCE Y'ALL!!! nfisk@ablelinktech.com
View Replies !
View Related
Experts, Questions Here... =)
Ok, hm...I want to make a full page, can anyone show me step by steps? I'll ask one question at a time first, so please fill me in... =)
First, heres and example... http://www.tidy.com
Ok, it starts with an intro, then goes to the mainpage... =P
First, how do I do integrate all that? Like first it loads up some stuff (Preloaders I think). Then it goes to the mainpage...and I dunno how they did it, but it seems to work no matter wut resolution you're at...the windows seems to adjust itself~ Does anyone know how to do that? So does this mean I should first write up an HTML code, then start the page? Or do I do the Flash first, then adjust according to HTML? I can't tell if thatz many small flash files integrated...or is the page ONE big Flash file? Hm...anyone know?
View Replies !
View Related
Two Questions For Experts...please See
Thanks in advance,
Q1: Can I create a folder in the same directory where the swf is located with a name entered by the user in a text field using flash 5
Q2: What's the syntax to go to a label whose name is contained in a variable? Something like this:
label = playSong;
gotoAndPlay(label);
Can these things be done?
Thanks
View Replies !
View Related
Math Questions For The Math Experts :)
Hello there,
I am looking for a way to find a vector if i know one point and 1 angle...
Like i have A(x,y) and a vector starting from A(x,y) with an angle. I would like to know the position on a point X(x,y) that can be anywhere on that vector. I only know the coordinates of A and the angle. Possible?? I guess it has to be a function... ANy help would be appreciated
View Replies !
View Related
Sparky To Gurus Come In Gurus.
Hey guys,
Please can you help me with two thing.
Number 1,
There is a small movie clip on http://www.macuser.co.uk/front_flash.php that i have search every where to be able to do. It is the news desk version of the site. It is a scrolling news box, but u can click the news items and also it follows your mouse instead of you having to click up or down.
Please help
Number 2,
Where on the web can i get a good actionscript tutorial site. something that will teach me the basics through to more complex?
Please help
Thnx guys your all the best. he he
View Replies !
View Related
Only For You Gurus
Does anyone know of a script where I can place and remove movie clips on a scene, save where they are located, and when the flash movie is opened again, put the clips back in the lacations where they were last left? Im sure this involves saving variables to text files and reading from them.
If anyone can help, Ill be greatly appreciative.
View Replies !
View Related
AS Gurus - Please Help
Hi, this is kind of in depth and don't expect a quick answer. I've created a flash movie that dynamically creates moving boxes of random size, speed, alpha, and _x and _y positions. On frame 1 on the main timeline of my actions, I have the following:
objects = 45;
loop = 1;
while(loop <= objects){
duplicateMovieClip("bar","bar"+ loop,loop);
loop += 1;
}
And on the MC itself I have the script that actually sets the properties of each duplicated clip:
onClipEvent(load){
_x = Math.random()*300;
speed = Math.random()*-35;
_y = Math.random()*600 - (_height/2);
_xscale = Math.random()*150 +20;
_yscale = Math.random()*150 +20;
_alpha = Math.random()*30+10;
}
onClipEvent(enterFrame){
_x += speed + 18;
if(_x >= 750 || _x <= -100){
_xscale = Math.random()*150 +20;
_yscale = Math.random()*150 +20;
speed = Math.random()*-35;
_y = Math.random()*600 - (_height/2);
_x = Math.random()*600;
_alpha = Math.random()*30+10;
}
}
What I want to do is call a function once a seperate MC has finished playing that will make all the boxes currently on the screen to the same _y coordinate. Something like this:
function collapse() { //called from changes MC
for (i = 0; i <= 45; i++) {
while (_level + i.bar._y <= 80) { //if the _y is lower, bring it up
bar._y += 10;
}
while (_level + i.bar._y >= 80) { //if the _y is higher up, bring it down
bar._y -= 10;
}
}
}
I know this is probably totally the wrong way to go about it (It causes the swf to give a timeout error) but I can't really think of another way. That's about it. Hope this wasn't too long. Thanks in advance.
View Replies !
View Related
GURUS HELP
I am having trouble with a menu I am working on that opens onPress, and closes onRelease. I have a smaller clip of several buttons that moves out onPress, and I want to be able to have the button that you are OVER fire onRelease. These are also dynamic, so my code (placed on the "mainButtonHouse") looks like this:
onClipEvent(enterFrame) {
_root.mainButtonHouse.mainButton1.smbut1.onRelease = _root.mainTextMov.gotoAndStop(2);
_root.mainButtonHouse.mainButton1.smbut2.onRelease = _root.mainTextMov.gotoAndStop(3);
_root.mainButtonHouse.mainButton1.smbut3.onRelease = _root.mainTextMov.gotoAndStop(4);
_root.mainButtonHouse.mainButton1.smbut4.onRelease = _root.mainTextMov.gotoAndStop(5);
_root.mainButtonHouse.mainButton2.smbut1.onRelease = _root.mainTextMov.gotoAndStop(6);
_root.mainButtonHouse.mainButton2.smbut2.onRelease = _root.mainTextMov.gotoAndStop(7);
_root.mainButtonHouse.mainButton2.smbut3.onRelease = _root.mainTextMov.gotoAndStop(8);
_root.mainButtonHouse.mainButton2.smbut4.onRelease = _root.mainTextMov.gotoAndStop(9);
_root.mainButtonHouse.mainButton3.smbut1.onRelease .getURL("http://www.alliedassault.com", _blank);
_root.mainButtonHouse.mainButton3.smbut2.onRelease .getURL("http://www.mohaa.ea.com", _blank);
}
this will not work. It seems as if it is only paying attention to the onRelease of the Parent button, instructing the movie to close. I DO want this to happen, however, I need the sublayer buttons to work as well. Thanks.
View Replies !
View Related
Gurus HELP Please Tell Me This Is Possible
I'm dynamically loading jpgs into Movieclips just fine. The problem is that I've put the MovieClip on the timeline and then it moves to some frames that don't contain those MovieClips and then it comes back to them. When it does, they've gone back to there original self...with no picture attached to them.
Is there a way to dynamically load a jpg and make it stay on a movieclip and not leave? If the movieClip is on the stage or not or if I want to use it in one scene or another I want it to use a movieClip with that dynamic jpg loaded onto it. It keeps disappearing when a new keyframe for that Movieclip is created.
Any ideas? This is really important!
View Replies !
View Related
Hey Gurus - Please Keep Trying
I tried this a month ago with no one able to solve:
I really need it to work, ... please????
When I load the following action on a main movie, the whole thing works fine. But the second I load it into a mc on the main movie that slides back and forth under a mask...nothing.
stop();
externalText = new LoadVars();
externalText.load("myText.txt");
externalText.onLoad = function(success) {
if (success) {
_root.gregscroll.text = this.words;
}
};
Ive tried suggestions about levels and whatnot. Ive even loaded 3 other text scrollers and they all do the same thing. It seems like it would be easy to fix.
The files is at http://www.gregmcgann.com/files/cactest.fla
To test you will have to set up a .txt files that starts words= in the same directory to test.
Thanks to all.
GMcG
View Replies !
View Related
XML Gurus
I'm hoping some one could really help me. I'm making an audio palyer with flash and I wanted to incorporate a PLAY LIST feature simular to any play list on any given media player. Allowing it to search for songs from a database (probably XML as it will probably be the best - or it someone knows better) and list them in a play list. Allowing them to drag a song from the list into the player and moving songs in the list from top to mid to bottom etc.
Does anyone know how to do this or you have done this and can send me an example. Or any GOOD tutorials on something like this.
Thanks in advance.
View Replies !
View Related
Help Me Gurus...help Me Anyone
the topic in question is flash and sound. i find that the hardest part of creating a flash movie is sound sync. it's strange that i've gotten so far but still don't really know the right way to incorporate sounds into flash. most times i simply import the sounds, and devote a layer to these sounds, placing them in frames where it seems fit. it never turns out right after publishing though. the sounds are almost always out of sync, and never start or stop when i need them to. i need some advice. how can i accurately handle sounds in flash?
help is appreciated
View Replies !
View Related
Only For The Gurus
G'Day all,
I have a scroll pane (part of the flash components 2) on my Movie. Into which I load a movie clip that has n number of movie clips on it (the number of movie clips added to this is dependant on the return from the db).
The scroll pane grows as I expect it to and it even behaves properly with the scrolling.
However the variable number of movie clips are not masked by the boundaries of the scroll pane.
This means that if my scroll pane is 100 x 100 and the content is 200 x 200 then the user can see all 200 x 200 pixels of content while still being able to scroll it into any position.
Is there any proper way to fix this or do I have to build my own mask? If so how do I build a mask for movie clips that are created programatically?
View Replies !
View Related
FOR THE GURUS - Can You Help Me?
I have a thumbnail viwer effect class that zooms in, fades in, and scales each thumbnail when you rollover each one. It is using the Alex Uhlmann Animation Package and it works great when you go slow over them. If you go fast, there are a lot of jumps and random glitches that happen. I know it is because the animation of the scripting hasn't finished yet if you go fast so it just throws it off. Is there any way to get rid of it? Here is the class. Just name the class "skins.as" and then put a bunch of linked movieclips to that class on the stage and you will see what I mean. Ineed a solution fast!
Thanks for anyone who can help out.
Code:
import de.alex_uhlmann.animationpackage.*;
import de.alex_uhlmann.animationpackage.animation.*;
import de.alex_uhlmann.animationpackage.drawing.*;
import de.alex_uhlmann.animationpackage.utility.*;
import com.robertpenner.easing.*;
import mx.utils.*;
class skins extends MovieClip {
private var listen:Object;
function skins() {
APCore.initialize();
listen = {};
APCore.addListener(listen);
onRollOver = doOver;
onRollOut = doOut;
onPress = doPress;
onRelease = doRelease;
}
private function doOver():Void {
new Alpha(this).run(100, 200, Circ.easeOut);
new Scale(this).run(30, 30, 1000, Elastic.easeOut);
new Rotation(this).run(-10, 750, Elastic.easeOut);
this.swapDepths(this.getNextHighestDepth());
}
private function doOut():Void {
new Alpha(this).run(50, 200, Circ.easeOut);
new Scale(this).run(16.5, 16.5, 1000, Elastic.easeOut);
new Rotation(this).run(0, 750, Elastic.easeOut);
}
private function doPress():Void {
}
private function doRelease():Void {
}
}
View Replies !
View Related
Need The Gurus? Please
Ok I have sort of got a content management system on the go.
to give you a better Idea of what I mean by content managment system.
here is what I am making {LINK}
basicly I am building a system which will update the content on my main page. I am trying to make it so I can log in to a webpage(from my website) which uses will have input boxes say date; subject; poster; content. and once I have entered the desired information I can click send. which then using php will create a new text file(if text file already created it will just update the information). then it will comeback to the flash telling it if it was sucessful or not. I have got a few problems though (oh and just so I dont steal all the credit I didnt do this all my self I know very little actionscript so I have had a bit of help there) but I can seem to get it to create the text file.(which is a preety large part of the whole thing lol) So thats why I need the gurus because you guys probally have a better Idea than me as to how I can make it work.
Oh
And here Is the zip files so you can get a better idea of what I am doing wrong. [CMS.zip]
Thanx would really apriciate the help.
View Replies !
View Related
Any Php Gurus Out There?
my boss/client have been driving me nuts the last couple of days! i know i have been asking a lot of questions lately. and i'm hoping this is the last one i have to ask for a while, but i do appreciate everyone's help who has replied to my posts
i am wondering where i can go to find out how visitors to a site can upload pics preferably along with the info for a caption?
i am also hoping it can be done using php/mysql. i dont really know any languages beyond that very well and if i would have to either write my own code or go in and tweak somebody elses, i wouldnt know where to begin or what i was looking at
View Replies !
View Related
Need A GURUS Help
Hello all gurus,
Please help if you can,
I have used some of Lee's tutorials to create elements on this site I am developing. This is my first time ever programming anything with any language so maybe I am missing something. But my issue is as follows:
I have created MCs with createEmptyMovieClip this works great, I use XML in conjunction with that, also works great, the problem I am having is that that when I press the buttons sometime (most of the time) they will flicker and the actions associated will not work, I have no idea why that is happening. To see what I mean please go here http://74.100.154.206/testing/mc/index.html, go to the WHAT section then play around with the PUMA logos marked 1-9, and see what I mean.
I have attached the code as a txt file so you can see it. I hope it is not too confusing.
Thank you in advance for any help you can give.
FLASH GORDON
See abbreviated code below.
View Replies !
View Related
Math Gurus
Hi
I am interested in creating simulated lightening with actionscript. I have read a number or tutorials on lines, hot spots, etc. Just am not getting any closer to creating the swf I want. Has anyone tired to actionscript gradient colored bolts of lightening?
View Replies !
View Related
Math Gurus Help
I am trying to make a movie clip rotate a certain amount between 0 and - 90 degrees. I am trying to determine the amount by the _xmouse and _ymouse coordinates. I don't know what equation I need to use.
View Replies !
View Related
Sound Gurus....help
Hi guys,
I have been looking through some tutorials to try and figure out how to manage my sound loop. Basically all I want to be able to do is to turn it on and off. I have not gdound a tutorial yet that shows me this. I tried one by Michael Georges, that didn't really work out. I am using flash5 to create this.
Could someone direct me as to where I can find a better tutorial or simply show me here in the boards...
thanks a lot
...
Nik
View Replies !
View Related
Flash Gurus Help
I'm basically programming a typing recognition program - I have a problem with needing to change the individual colours of words in a dynamic textbox - can this be done???
Right now I have a dynamic textbox(alligned to center)I have then embedded this in movie clip and then duplicated this mc depending on how many letters are in a particular word (these words are not predeteremined - they a dynamically generated). I then set each text box within the mcs a differnet letter in the word.
This works fine however my problem comes as when a user hits the correct key the particular letter needs to change colour to grey(leaving other ones black). I have managed to do this using mc's and set RGB command. However the result is that kerning on letters does not look right - due to the fact they are seperate mc's)
So .. I have thought about just having one textbox
I know you can control the colour of a textbox by setting colour manually - and even change it dynamically using HTML - however this will change all letters within the text box - how do you contol setting the colour of individual letters in a text box- IS IT POSSIBLE??????
Any suggestions welcomed!!!
View Replies !
View Related
I Am New Here And I Need Some Help From Ya All Flash Gurus
i have made this check it out
http://www.xtradezign.com/clock.html
click on the upper button then second left button then bottom button then right hand second button u will get whats the bug :P the arrow is not standing on correct button if u go left wise or....but some time its working well....can some one tell me whats wrong? pleae give me scripting help?
View Replies !
View Related
HTML Gurus
Guys,
This is slightly off the Flash topic, but, is there a forum like FlashKit.com for HTML/Dreamweaver? Also, let me take this time to ask any who might know how to help me one question.
I want to have a simple form (one field) that collects data, and saves it to a text file. In a list, or appending, or whatever. In this case the data would be email addresses. How do I go about doing that?
Thanks Again,
Marc
View Replies !
View Related
Actionscript Gurus
Hi all
Basically I have a scroll pane in which I call upon a mc with this code on frame 2
Xsquare = _root.Main_Images._y;
Xdiff = _root.Ypos-Xsquare;
Xmove = Xdiff/2;
_root.Main_Images._y = Xsquare+Xmove;
it works fine but what I need to know is it possible to include a script added onto the existing script on the menu buttons that can call upon a mc clip to play when the pane basically gets into the _y position that is encoded on certain buttons. This is a piece of code on one of my buttons
on (release) {
_root.ypos = 279;
tellTarget ("_root.controls") {
}
}
I hope this makes sense as Im pulling my hair trying to sort it out.
Cheers guys
View Replies !
View Related
Flash Gurus: Please Help
Hi,
Is it possible to set a dynamic text field's width relatively and not absolute?
In Flash, when one inserts a dynamic text field onto the canvas, one sets the width of the text box by dragging the right edge.
I need the text box to be an infinite width. I am retrieving all this text from an XML file, and the text is never constant.
Another thing: The dynamic text field needs to be SINGLE LINE - not multiline because I will use ActionScript to move this dynamic text field to simulate a ticker.
Is this possible? All the Flash gurus out there please help. Thanks
View Replies !
View Related
For Your Flash Gurus
I wrote the word ONE broke it apart distributed to layers, then I made each letter a button, I went into edit mode, so when Mouse is over lets say O the word will come down saying ONE, then over N it'll come down saying NOO, and for E itll come down saying EEK. The problem is when I enable simple buttons it works, but when I test movie(ctrl+enter) it only does the E, but not the O or N. Can someone tell me why it doesn't work or whats up with it not working?
View Replies !
View Related
Flash Gurus > Really Really Need Your Help
Hello
Im using Flash MX and I have a component combobox with three labels and values
VALUE = LABEL
London = London
Sydney = Sydney
New York = New york
Now, when the user selects for example London from the combobox I need a Dynamic text box somewhere on the stage to say "This is in England" Likewise if I selected New York i would want the same box to say "This is in America" etc etc
Geddit?
Now i thought you did it this way;
Call the combo box instance "city"
Create a dynamic text box with instance "country"
and have the actionscript being simply -
if (city.getValue() == "London") {
country.text = "that's England";
}
But it doesnt work - am i way off - and can someone pls help me.
I have to get this working real soon - before I get my bum kicked.
Thanks
Christine!
View Replies !
View Related
I Need 2 Flash GURUS For This
Hi _ I hope u can help me. thanks in advance.
1.- I have 2 swf in one HTML page one x.swf (movie control) control the other swf (target.swf).
2.-using x.swf I load a movie inside (inside.swf) target.swf I just whant to call a frame from INSIDE.SWF
I already do that with target.swf BUT I cant call any frame from Inside.swf
x.swf ---contol--->target.swf <-ooo-loadmovie-ooinside.swf
*in x.swf I use for call a frame
labeltogo = "r1";
getURL("javascript:go()");
*HTML funtion go is:
<SCRIPT LANGUAGE=JavaScript>
function go() {
javavar = document.menu.GetVariable("labeltogo");
document.target.TGotoLabel("/",javavar);
}
</SCRIPT>
How to call the frame name of the inside.swf movie?
THANK YOU!
ps: if you want more details or a example plz tellme
View Replies !
View Related
This Is For Real GURUS
I asked several people about this issue but it seems that you can't export a movie clip to be attached, if the mc is in a library of a loaded swf and the target is in the _root.
please check the attachment - It's the most simple example that demonstrate the problem.
thanks for advance
View Replies !
View Related
Thanks Flash Gurus
Thanks so much for all your INVALUABLE HELP over the last week -
I rebuilt a site that took me 12 months to do the first time, in just 6 days, and used the tutorials to build a neat preloader for my 'Cartoon'...Link to Cartoon ...thanks to your advice on sizing options, it looks good at any resolution...plus it won't crash anyone! Really sorry about that (new=45pages+over100jpegs=7.8meg)
There is a page with 23 small pics - links to pages full of pics - now contained in one flash - biggest page at 800kb, but opens progressively. I have to reduce the pics... again...and remake all the buttons and links....(yawn...)+ I am going to try to use a 'silent' preloader to force the navigation buttons on each page to work before the whole flash has downloaded - the way the skip button works in my "Cartoon"... HERE IS MY NEW SITE!!! www.fnomna.com - EMAIL=fnomna@iprimus.com.au]Mail Me[/email]
View Replies !
View Related
Calling All Gurus
I humbly submit the following problem:
How do you jump from one scene in one movie to another scene in another movie?
At the moment I am using a get url command eg. get url: index.html - which jumps from one movie to another... but I want to be more specific I want to get the url AND THEN go straight to say frame 1 scene 3
If you look at my website: www.pipedreams3d.co.uk and the sitemap, you'll see what I mean.
I've split the website into 3 sections so that low bandwidth users don't stress, but this means I have this problem jumping from place to place.
View Replies !
View Related
Help O Ye Flash Gurus
I am not sure how to even phrase this question, its really got me stumped. ok here goes. I m trying to create a bunch of movie clips, using the duplicatemovieclip method. These clips are moving around the screen in random directions. I want to find a way by which the movie clips can exchange information whenever they come in contact. Basically i have two problems first how to make the clips recognixe that they are in contact with each other. i assume one would use 'hitTest' the problem is that with hitTest you have to give a 'target' value,- but in this case the target value will change according to which movieclips are in contact with eachother
-is there a way by which i can use hitTest w/ a flexible target value... Ok thats part one, the second part of the question is, what is the method or such i have to use to have the clips pass info over to their colliding buddies, is it something like load variables, or what? any help pointing in the right direction, any useful tutorials, anything will be greatly, Greatly appreciated, thanx for the time.
View Replies !
View Related
Actionscript Gurus Please Help Me
I have a piece of script that a friend wrote for me, and I am trying to adapt it with not too much luck. Below is the script.
When I click on the movieclip 'pushhome', movieclip 'home_mc' slides on screen. When I click on 'pushclients', 'home_mc' slides off screen. This works fine. But I am trying to add an extra function whereby clicking on 'pushclients' will not only slide 'home_mc' OFF, but will slide 'clients_mc' ON. As you can see I have added this to the script - but it wont work!! It seems to ignore clients_mc altogether. Anyone got any ideas??
Thanks in advance!
Math.easeOutQuad = function(t, b, c, d) {
return -c*(t /= d)*(t-2)+b;
};
MovieClip.prototype.motion = function(clip, pos, speed) {
clip.t = 0;
clip.d = speed;
clip.b = clip._x;
clip.c = pos-clip._x;
clip.onEnterFrame = function() {
if (this.t<=this.d) {
this._x = Math.easeOutQuad(this.t, this.b, this.c, this.d);
this.t++;
} else {
delete this.onEnterFrame;
}
};
};
pushhome.onRelease = function() {
this.motion(home_mc, 700, 25);
};
pushclients.onRelease = function() {
this.motion(home_mc, -300, 25);
this.motion(clients_mc, 700, 25);
};
View Replies !
View Related
Flash Gurus Help Please
Hello,
I posted this subject about 4 times in other forums but no-one solved my problem, i am really confused about this. When i test the flash movie, everything works perfectly(ctrl+enter). Images load perfectly, etc,etc. But when i transfered the files to Dreamweaver project, the images in the photo gallery aren't loading for a reason or another.
This is exactly what i did:
Opened Dreamweaver
Imported the main movie in a table
Centered the table on screen
Then i copied the images.swf and .fla files to the same directory in Dreamweaver
Preview in Browser
And images don't load (Photo Gallery)
This is the code i used for the images to loadNote that these worked perfectly when tested in Flash)
on (release) {
loadMovie ("pic1_clip.swf", "host");
}
This is the
SITE
View Replies !
View Related
Flash MX Gurus...I Need Your Help
I am new to Flash...but a very quick learner...here is my dilemma...
I have built pillars that I need to appear as breaking through the ground...I would like this image to shake and rumble. I do not need the ground to break as it will be off the stage anyway...I have the masking completed, so all it does is appear from the bottom of the pillar on up. Boring...I need the pillar the shake and gyrate
Can someone help me?
Zazen
View Replies !
View Related
Any Flash Gurus Available?
Hi
I am stressing this isnt working how I planned can someone help????
Okay: I have a script which I will break down and explain.
1st part: The following function allows me to center a mc and not scale...
function preloadInit() {
Stage.align = "LT";
Stage.scaleMode = "noScale";
this.attachMovie("gradBackground", "gradBackground", 1);
gradBackground.onResize = function () {
this._x = Stage.width/2;
this._y = Stage.height/2;
this._width = Stage.width;
this._height = Stage.height;
}
this.attachMovie("mainContainer", "mainContainer", 2);
mainContainer.onResize = function () {
this._x = Stage.width/2;
this._y = Stage.height/2;
}
Stage.addListener(gradBackground);
Stage.addListener(mainContainer);
this.gradBackground.onResize();
this.mainContainer.onResize();
}
preloadInit();
stop();
This script works fine
the next part is supposed to preload an external jpg but it doesnt do that
2nd part:
percent_display = "";
this.mainContainer.createEmptyMovieClip("imageCont ainer", 10);
imageContainer.loadMovie("images/imagea.jpg");
this.onEnterFrame=function(){
percent=(this.imageContainer.getBytesLoaded()/this.imageContainer.getBytesTotal())*100;
if(!isNan(percent)){
if (percent == 0) {
percent_display = "";
} else {
percent_display = Math.ceil(percent);
}
} else {
}
if(percent == 100){
delete this.onEnterFrame;
percent_display = "";
}
}
stop();
All I want to do is preload an external jpg into a certain mc which will always be centered and not scaled.
Any thoughts. Thanks in advance
View Replies !
View Related
I NEED THE SLIDEBAR GURUs
I need the help of the Gurus again.
I've created a few slidebar to control volume on an external web based audio mixer. The volume works just fine so long as I only have the web page open on 1 pc.
How do I make the position of the slider track on a second pc with the same page open. I need instant feedback so both pc will have the same volume setting regardless of which pc actually sets or changes the volume.
-----SWIFTBYNATURE-----
View Replies !
View Related
Flash AS Gurus Please Help
Hello Gurus,
I have created a projector. I used the
Stage.scaleMode = "noScale";
to keep the original movie size -- I don't want it streatching which the projector is in full screen mode.
I want the projector to load automatically from a CD ROM -- no problem. However I what the movieClip not to resize, but I want to Projector to go full screen. Is this possible?
I tried using the noScale and fullScreen commands -- it goes full screen, but it streatches the MC.
Any solutions?
BTW the full screen type command for PC is Ctrl+F. Does Anyone know what the command is for MAC?
Odisey
View Replies !
View Related
Calling All Gurus
I have made this scroll bar and it works fine . Now my problem comes when I try change the scroll bar to fit in the website i am making. The scroll bar is way to small at the moment and when it place it in the new movie the scroll bar dosent work and when i expand it well it still dosent work.
by the way I only customized this scroll bar I dont know much about AS at all. So I have no idea what it is actually doing which is probally why im not getting it to work.
Please if some of you guys have some free time could you please have a look at this and help me understand what it is actually doing and how I can get it to work as it it actually driving me nuts .
http://www.softgoowything.com/Server...arExample2.zip (the file lol just incase)
thanx
View Replies !
View Related
Any Flash Gurus Out There?
This is the code that loads an image into a movieclip and then tries to apply a tween to it using laco's tween class.
--PROBLEMS--
in the onLoadInit function the tween class cant access the created movie clip and nothing happens - but just changing the _x property works fine. Why cant the clip be accessed.
Strangely the tween class can access the clip in the onLoadComplete function - I thought you could only have access to properties in the onLoadInit function. Whats going on? any help would be greatly appreciated.
--CODE--
#include "lmc_tween.as"
var t:MovieClipLoader = new MovieClipLoader();
var o:Object = new Object();
t.addListener(o);
this.createEmptyMovieClip('base', this.getNextHighestDepth());
var files:XML = new XML('<items><item><image>http://www.jamesdacosta.com/photos/honfleur/images/1.jpg</image></item><item><image>http://www.jamesdacosta.com/photos/honfleur/images/4.jpg</image></item><item><image>http://www.jamesdacosta.com/photos/bulgaria/images/2.jpg</image></item><item><image>http://www.jamesdacosta.com/photos/bulgaria/images/4.jpg</image></item></items');
var i = 0;
var img = files.firstChild.childNodes[i].childNodes[0].childNodes.toString();
base.createEmptyMovieClip('clip'+i, base.getNextHighestDepth());
t.loadClip(img, base['clip'+i]);
o.onLoadInit = function() {
trace('done');
_level0.base.clip0._x = 30;
_level0.base.clip0.tween('_x', 100, 1, 'linear');
};
o.onLoadComplete = function() {
_level0.base.clip0.tween('_x', 100, 1, 'linear');
};
View Replies !
View Related
Flash CMS. Need The Gurus Help.
I am building a flash cms for a website which connects to a database and then using php to write and read the information updates my website. However I am haveing huge problems I have sort of fixed my php file so no errors occour but I am still not sure if they are 100% right. But the probalem is when i have changed the text and click update it just sits the saying tranferring data but nothing happens. I would really apriciate it if some one who knew this had a good understanding of cms could help me out and take a look at my flash and php andc where I am messing up.
I have attached a zip file below with all the cms files. on and you and http://www.arctosdesign/daimz/ will show u all the files working online and what errors they comeup with.
thanx would really apriciate the help
View Replies !
View Related
Attention All You AS Gurus
I need to create a windows vista aero style multiple window navigation. the one where the atl-tab key is pressed and the windows get cascaded and you can scroll through the winds with your mouse scroll botton. The windows need to be generated via xml. Anyone have any ideas or AS that i can use.
thanks guys
View Replies !
View Related
Ok All You Actionscript Gurus, Try This....
Whats an easier way to write this code?
button_btn.onRelease = function() {
this.onEnterFrame = function() {
if (_root._currentframe == 1) {
play();
} else {
this.onRelease = function() {
this.onEnterFrame = function() {
if (_root._currentframe == 25) {
play();
}
}
}
}
}
}
Basically Ive got a tween on the root timeline and it moves down between frames 1 to 25 and then back up from frame 25 to 50 and starts all over again.
Also how can I include all that code as a single function so I can just call it rather than writing the entire code again?
Thanks all
View Replies !
View Related
XML Question For All You Gurus Out There
Hey all, didnt know where to post this question so my apologies if its in the wrong thread.
Ok, I have a password protected xml driven gallery which I want to use for clients to log into to view only images in there login section.
My question is - is it possible to have a PASSWORD node and a LOGIN node in my xml file and have flash evaluate these and if they = true read the children of that node? The children being the image details for that particular client based on the PASSWORD and LOGIN strings.
I have successfully created this system however the PASSWORD and LOGIN strings have been hard coded in AS and I thought it would be faster to just update the xml file with new client details as they come about.
Thanks all, hope that all makes sense.
View Replies !
View Related
Flash Gurus This One Is For You
I am using the Smooth Preloader from this site
http://www.actionscript.org/tutorial...er/index.shtml
I selected this script because I thought it would advance the width of the loadbar all the way to 100% no matter what. It seems to only do this sometimes. The point is that I want the preloader to show all the way to 100%.
The code on the preloader mc is:
Code:
//Added this part for flash mx 2004-- but I am using flash MX ( 6 )
onClipEvent (load) {
percent = 0;
}
onClipEvent (enterFrame) {
loading = _parent.getBytesLoaded();
total = _parent.getBytesTotal();
percent -= (percent-((loading/total)*100))*.25;
// changed int() to Math.floor because int is deprecated
per = Math.floor(percent);
percentage = per+"%";
loadBar._width = Math.floor(per*4.58);
if (percent>99) {
// 99% is not as cool as 100%
percentage ="100%";
// this line is moving the mask over the preload bar
// so that the bar goes away when done
// it's calling a whole other tween function
preloadMask.tween("_width",0,.7,"easeOutExpo");
// this line sets a timeout to wait for
// the above tween to finish
// before calling gotoAndPlay(2)
goOpen.setTimeout("goOpen", 800, 1);
//clean up
delete this.onEnterFrame;
}
}
It might be easier for you to see this in action to see what it is doing. If you go to http://www.dstripe.com/site
I am developing still, so pardon the mess and lack of preload for the main swf.
In any case- click on "etc" It is the fourth word down under web, print, identity. Then play around with the buttons that come up to the bottom right-- Sometimes when you click one it will load all the way to 100%, sometimes it stops loading at a lower percentage. I have placed some text fields in the loaded swfs so you can see the final percentage as well as the final width of the loadbar. 99% is the highest that the percentage will go. If they all work perfectly for you the first time, click one again. Why does it sometimes stop the loading process at 97% or 82% or 16% or whatever? Is there away to get around this and make sure the load bar goes all the way to 100% and across the screen each time?
Thanks so much for having a look! This one is driving me nuts!
View Replies !
View Related
Any Netstream Gurus?
Any help is greatly appreciated.
this is what my site does. Using netstream a I am loading external flvs into
my flash movie. Loading is working fine. I've used a tutorial meant for
loading one movie at runtime and have been modifying it while trying to
learn. What is NOT working....
There is a buffering clip that runs when a flv is loaded. I can only get it
to work for the first movie that loads since this was the way it was written
for the tutorial. Once it dissappears after the first movie is playing it
doesn't return and show buffering for the others, which I need it to do.
The buffering clip needs to be invisible until the first button is pressed
to load the movie. Tried setting its visibilty to "false" to start.
Cant seem to get the movie to unload and clear the stage once it is done
playing. Tried ns.close();
and Last,,,what is the easiest way to trigger an event on the main timeline
from the flv timeline? I need to have a new menu appear at the end of the
flv's. Is there a end stream command or something?
Thanks so much obviously this is new to me. Below is the code I am tyring to
work with.
URL is www.amazingwebs.com/flinch/flinchfinal.html under construction.
stop();
//SET UP CONNECTION
var nc:NetConnection = new NetConnection();
nc.connect (null);
var ns:NetStream = new NetStream(nc);
theVideo.attachVideo(ns);
//BUFFERING
ns.setBufferTime(15);
//SHOW BUFFERING IMAGE
this.bufferclip._visible = false; //trying to have
ns.onStatus =function(info) {
if(info.code == "NetStream.Buffer.Full") {
bufferclip._visible = false;
}
if(info.code == "NetStream.Buffer.Empty") {
bufferclip._visible = true;
}
}
//assign buttons
//BASE JUMP BUTTONS
this.baseJump_btn.onPress = function () {
ns.play("
View Replies !
View Related
|