Mixing A For Loop With Text Fileds
Ok this is what I am doing, I am creating a remake of the grand theft auto game when it was on ps1, but I am doing it more on the side missions of grand theft auto 3.
So what I want to do is have a loop which every time you selected a car for the mission you get a lovely message stating what number car you have selected, this is what i have so far
var Text:TextsField varTexts:Array=newArray(textinfo1,textinfo2,textin fo3,textinfo4,textinfo5,textinfo6)
var textinfo1:Object = {xpos:150, ypos:150}; var textinfo2:Object = {xpos:150, ypos:150}; var textinfo3:Object = {xpos:150, ypos:150}; var textinfo4:Object = {xpos:150, ypos:150}; var textinfo5:Object = {xpos:150, ypos:150}; var textinfo6:Object = {xpos:150, ypos:150};
var NumOfText:Number = 6;
function OutputText(){
for(var i:uint = 0; i <NumOfText; i++){
Text = new TextsField Text.name = 'text_'+i Text.x = Texts[i].xpos Text.y = Texts[i].ypos Text.text = 'you have chosen car'+i trace(Text.name) addChild(Text)
};
};
OutputText()
Help is needed
ActionScript.org Forums > ActionScript Forums Group > ActionScript 3.0
Posted on: 05-23-2008, 12:00 PM
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Formatting HTML Text Fileds
I have been having problems when using the <a:hover> in HTML text. But what I thought was a StyleSheet issue has worked out to be a textField autoSize issue.
This is what im doing:Loading CSS formatted text using PHP
Loading the CSS
Creating the new TextField
Formatting the TextField
Displaying the TextField
When I use the following TextField formatting and I roll over an <a> link my text likes to jump around:
ActionScript Code:
with(TextField)
{
width = 280;
height = 10
x = 0;
y = 40;
wordWrap = true;
multiline = true
selectable = false
embedFonts = true;
styleSheet = FORMAT_CSS
htmlText = "<p>some text<a herf="www....">link name</a> some more text</p>";
antiAliasType = AntiAliasType.ADVANCED
autoSize = TextFieldAutoSize.LEFT
}
The text jumps?
But when I use:
ActionScript Code:
with(TextField)
{
width = 280;
height = 10
x = 0;
y = 40;
wordWrap = true;
multiline = true
selectable = false
embedFonts = true;
styleSheet = FORMAT_CSS
htmlText = "<p>some text<a herf="www....">link name</a> some more text</p>";
antiAliasType = AntiAliasType.ADVANCED
autoSize = TextFieldAutoSize.CENTER
}
(my <p> formatting = align = "left")
Everything is fine.
Has anyone come accross this problem before, or is it just my text that just likes to dance around the screen?
Thanks
Chris
Downloadable MP3's In Dynamic Text Fileds' Link?
i'm coming across a problem ... the music on this site should be downloadable by right clicking the links but this doesn't appear to be the case. when i right click an mp3 link i get "open", "open in new window" & "copy link" as options and that's it - not any other options: "save target as", which is the only way i know to actually get music on to my computer from a site.
site .. under "audio files"
http://www.darsombra.com
is there a way to actually download the music?
the links are loaded into a dynamic text field from a text file.. thanks.
Dynamic Text Fileds || Mac - Safari - Not Rendering
I was curious as to see if anyone knew about the problem with prior versions of (Mac) Safari not rendering dynamic text fields. I know that as a developer I should not be responsible for all of a clients, clients. To have updated versions of Safari, but is there any way around this problem.
The only solution that i could think of is to backdate the compiled version of flash (although i have not done this yet).
Creating Dynamic Buttons And Text Fileds..
Im having some trouble creating buttons from an xml file ive loaded in...
What i need it to do is create a button (movieclip with a onRollOver funciton) for every item that is in the XML file, ive tried this in the For loop but i cant get it to work..
Also is it possible to duplicate a text field and populate this each time with a field from the xml file as im having some difficulties targeting the name of the duplicate field?! hope that makes sense, ive included my code below...
any ideas?!??
var arrImages:Array = new Array();
var info:Array = new Array();
var link:Array = new Array();
var buttonName:Array = new Array();
var panel:Array = new Array();
var numberLoaded = 0;
var totalNumber = 0;
var IMAGE_PATH = "gallery/";
gallery_xml = new XML();
gallery_xml.ignoreWhite = true;
gallery_xml.onLoad = function(success) {
if (success) {
//trace('homebanner.xml loaded. Contents are: '+this.toString());
createAdvert(gallery_xml);
}
};
gallery_xml.load('homebanner.xml');
// This is the function that will be called when
// our XML document is loaded succesfully
function createAdvert(xmlAd) {
// xmlAd is now a reference to the XML
// object where our information is stored
for (var n = 0; n<xmlAd.firstChild.childNodes.length; n++) {
arrImages[n] = xmlAd.firstChild.childNodes[n].firstChild.firstChild.nodeValue;
//image = xmlAd.firstChild.childNodes[n].firstChild.firstChild.nodeValue;
info[n] = xmlAd.firstChild.childNodes[n].firstChild.nextSibling.firstChild.nodeValue;
link[n] = xmlAd.firstChild.childNodes[n].firstChild.nextSibling.nextSibling.firstChild.nod eValue;
panel[n] = xmlAd.firstChild.childNodes[n].firstChild.nextSibling.nextSibling.nextSibling.fi rstChild.nodeValue + n;
}
for (i=0; i<xmlAd.firstChild.childNodes.length; i++)
{
// load them into the containerMc
containerMc.imgHold.createEmptyMovieClip("imgHold" +i,containerMc.imgHold.getNextHighestDepth());
img_mc = containerMc.imgHold["imgHold"+i];
//load images in from array
img_mc.loadMovie(IMAGE_PATH + arrImages[i]);
//Set images up side by side
containerMc.imgHold["imgHold"+i]._x = containerMc.imgHold["imgHold"+(i-1)]._x + 350;
//Create Cross
containerMc.cross.attachMovie("cross", "cross"+i, containerMc.cross.getNextHighestDepth())
cross_mc = containerMc.cross["cross"+i];
containerMc.cross["cross"+i]._x = containerMc.cross["cross"+(i-1)]._x + 350;;
//Create Panel
containerMc.infoPanel.attachMovie("panel", "panel"+i, containerMc.infoPanel.getNextHighestDepth())
panel_mc = containerMc.infoPanel["panel"+i];
containerMc.infoPanel["panel"+i]._x = containerMc.infoPanel["panel"+(i-1)]._x + 350;
containerMc.infoPanel["panel"+i]._name = "panel" + i;
containerMc.infoPanel.panel[i].title = "test entry";
//trace("panel is " + panel[i] + " info is " + info[i])
//Create border line
containerMc.borderLine.attachMovie("border", "border"+i, containerMc.borderLine.getNextHighestDepth())
border_mc = containerMc.borderLine["border"+i];
containerMc.borderLine["border"+i]._x = containerMc.borderLine["border"+(i-1)]._x + 350;
//Create Button
containerMc.button.attachMovie("button", "button"+i, containerMc.button.getNextHighestDepth())
button_mc = containerMc.button["button"+i];
containerMc.button["button"+i]._x = containerMc.infoPanel["panel"+(i-1)]._x + 350;
trace(containerMc.button["button"+i]._x)
trace("button value is " + button_mc);
containerMc.button["button"+i]._name = "button_press" + i;
trace(button_mc._name);
}
}
Making Dynamic Selection To Text Fileds
Dynamic text field selections
Here's the dealio,
I am trying to create dynamic selections of textfields. My current ideas for code is this
Quote:
newSel= setInterval(select, 1);
function select() {
Selection.setFocus("txtField");
Selection.setSelection(beginingOfFirstVisibleLine, endOfLastVisibleLine);
}
Does anyone know if there is a predefined properties in MX or MX2004 that will allow me to do this?
Input Text, Verify No Empty Fileds
Can't understand this:
I have input text fields on the stage. Their var names in text properties are called (Surname, Fno, contactNo, QueryDetail) with no instance names. On the script below I am checking to see that the fields are not empty when submitting, if so it must goto frame6 and stop if it's not goto frame2 and stop. But for some reason it submits the values as blank to the dbase and goto frame2. Am I missing something or must I clear the text fields beforeentering the frame? Thanks...
on (release) {
if(Surname == "" && Fno == "" && contactNo == "" && QueryDetails == "") {
gotoAndStop(6);
}else{
loadVariables("http://blabla/flash.php", this, "POST");
gotoAndStop(2);
}
}
You don't need eyes to see just the vision because there are always more ways and different answers to what we are used to...
Mixing Vars And Text In Dynamic Text Fields..
Hi,
My preloader has a little percentage feature/dynamic textfield so it will show say 10%, 25% etc.
My code:
_root.loadedpercentage.text = Math.round((sofar/total)*100)+"%";
does not work. Doh!
It just shows the value of the percentage eg 10, 25 but the % character does not appear.
I really dont like dynamic textfields cos they dont like me. Can someone tell me whats wrong?
Cheers.
Steven.
Mixing A Button With Some Text
hi folks,
I have imported a Button from the common Library onto the stage, specifically it's under Buttons->Ovals-Ovals Buttons(blue), I edit it, added a layer on top of other layers, added an instance of dynamic text in this layer. this instance has a name myLabel.
now from the main timeline, i have the following actionscript:
trace(b.myLabel); //a is the instance name of the oval button
it is undefined.
however when I do:
for(var i in b){
trace([i,b[i]]);
}
the following is printed:
tabIndex,undefined
getDepth,[type Function]
enabled,true
useHandCursor,true
instance2,_level0.b.instance2
instance1,_level0.b.instance1
specifically instance2 correspond to the dynamic text which I gave a name "myLabel".
what's going on?? how can I use the instance name myLabel to reference the dynamic text correctly? I do not want to use b.instance2 because this name is obviously dynamically generated by flash. But I don't understand why flash is not using the instance name that I gave to the dynamic text.
please help!
see this sample file for a test run:
http://www.box.net/public/kpx9c11beh
thanks
Mixing Pixel Fonts With AA Text
First off, let me explain that I am not a designer, so I lack the natural ability that some of you display. I know that I will never achieve the level of perfection that others do. Flash is a personal interest that I find enjoyable and challenging.
I've been working on a rehash of my personal website http://www.jeffreycostello.com/beginnings.htm .It is NOWHERE NEAR complete, but I am trying to get feedback before I get too far into it. After getting a couple of replies to my site check about using pixel fonts, I decided to find out what they were and how to use them. I am mostly pleased with the results, as it has cleaned up the text in the blogviewer and the "future guestbook" considerably.
Using the Pixel Fonts has created another problem, though. I always thought that it was wrong to mix fonts on a site (maybe different sizes or colors of the same font, but not entirely different fonts.) It seems distracting to the eye... and IMHO, looks like an error on the designer's part. The problem is that most pixel fonts only come in one size. I have not seen any that are available in an array of sizes that could be used for an entire site. Plus, my site just does not feel like a "techy" site. The whole thesis behind my redesign was to implement more technology without having a high tech look.
Is it possible to mix pixel and AA text without affecting the continuity of the site? Specifically, can I use AA text in titles and navigation but use pixel fonts for content? I'd really love some feedback on this topic from those in the know.
Thank You (in advance)
Problem Mixing Dynamic And Static Text
I have a movie that has a dynamic text box on frame one and two. It loads in some text from a Flash Var and is constantly updated. It was working perfectly.
Now I have added a static text box to frame two of the move and when the movie goes from frame one to frame 2 the text in the dynamic text box disappears. I pretty much figured out that it's the presence of the static text box that is the problem but I can't figure out why. I'm guessing it has something to do with fonts but have no idea. I'm using the same font for both and when I change the font of the static text box to something else the dynamic one starts working again..
Mixing <b> And <font> Tags In Html Text
I have a dynamic text field using arial font embedded. Dummy italic and bold text fields have been placed off screen - the text field is showing up as it should when I use those tags. However, if I want to throw a <font color> tag in there, it doesn't work if I have a <b> or <i> in the same text field. If I have the <font color> tag on its own, it works ok.
Basically, I'm after doing something like this within htmlText : red italic and blue bold text in the same line.
Any suggestions how to get this working properly?
Thanks.
Jason
Mixing Arial And Webdings Fonts In The Same Dynamic Text.
I'm building a stock ticker in Flash where I have to display some symbols using webdings for up or down. The rest is Arial font. I've tried everything. Creating css, using font tags, textformat etc... webdings always shows as a roman chars, not symbols. The only way I could display was embedding the font in the text field, but then, I can't display roman chars.
How can I mix them both?
Thank you in advanced,
Notsozen
Reset All Text Fileds To ""
Another schoolboy grade question from me I'm afraid...
I just want to reset all text fields within a movie clip to "".
I've got this;
Code:
var child:TextField;
for (var i:uint=0; i < thisMC.numChildren; i++){
child = thisMC.getChildAt(i);
child.text = "";
}
But of course they aren't all Text Objects so I get an error like;
Code:
Type Coercion failed: cannot convert flash.display::Shape@39fa8c9 to flash.text.TextField.
Is there a way to just select children of a specific type maybe?
Thank you kind people!
Multiplying Ten Inout Fileds
Using Flash MX 2004
I have ten nput feilds in a row.
inv_yr1, inv_yr2, inv_yr3 up to inv_yr10
A person can fill in the first filed and
then calculates the second field as:
inv_yr2 = 1.1* inv_yr1
the third field as
inv_yr3 = 1.1* inv_yr2
I can do this simply enough, the only issue is they dont have to fill in the first field, they could start it at inv_yr5 and any fields prior to that will be left blank or = 0 . My efforts just aren't working out.
Someone needed with superior brain power to mine please.
Flash[5] AttachMovie : Dynamcally Populate Fileds
Hello,
I created a script that dynamically import then populate several text fields manually placed on the stage. This code execute fine.
Now I wish to dynamically attach the text fields.
The problems is the attached fields don't populate -- they remain empty.
The trace confirms that the dynamic fields are being created.
The field ceration code appear below.
Thank You
iaustin
//INT
_root.fcreatefield();
loadVariables("test.txt", field1, "POST");//all
loadVariables("test2.txt", field2, "POST");//all
//create fields called from fcount
function fcreatefield(){
for(i=0; i<=arSplit.length; i++){
yposition += + _root["field"+i]._y+40;//space vert distance of fields
_root.attachMovie("field","field" + i,i);
_root["field"+i]._y = yposition;
trace("field"+i);
}
}
Mixing 3d And 2d
Hi,
I have Swift 3D and Flash MX 2004 Pro.
I want to make a 3D character in Swift, then animate him in flash drinking water.
Any ideas how to do that?
Thanks from a newbie.
jimjj
Mixing AS 1.0 And AS 2.0?
Hi, I wasn't sure where to post this but just after a bit of advice really. I have inherited an old website written in as1. I have added some stuff to it and want to include some code that isn't supported in as1. The thing is the site is made of about 20 swfs. Basically I want to know if I have to convert all these swfs to AS2 or can I just modify the one i need the code in? It seems to be working ok locally but my gutt feel tells me mixing it up isn't a good idea. Anyone any experience of this?
Thanks
MP3 Mixing
Hi!
This is not a question for this forum but anyway.. Im woring on flash app which allows mixing of two or more mp3s. What I need is a .Net activeX component which is able to do mixing of mp3 files (one over another) and produces a new mp3 file.
Im moe a Flash than a .Net developer so I dont have any idea where to search for it..
So.. if anyone knows for this kind of component, please let me know!
thanks!
Mixing AS2 And AS#
So currently my game company is using AS2. We have a shell.swf that loads in all of our games. The shell is written in AS2 like all of our other stuff. Some of our games we have contracted others to make. Those other people are converting to AS3. Can our AS2 shell still be able to load AS3 swfs? Or does EVERYTHING have ot be in AS3 or AS2 for it to work?
Thanks!
Kyle
Mixing ACS 2.0 And 3.0
Hey, i have made my flash website in Actionscript 3.0 i wonder if i can in someway put some ACS 2.0 into it?
I made this preloader with the tutorial on GLA but it diden't work, its probley becuse of that the website is in Actionscript 3.0 and not 2.0.
My question is, how can i mix ACS 2.0 and 3.0 together? Or update ACS 2.0 to 3.0 by a program or a website?
Thanks for any kind of help.
[F8] Mixing Letters
I'm trying to build a function that can pull a word from an array and mix all the letter up in it randomly. (i.e. one, neo, eno, etc). So far I was just using a random number generator to choose a number 0 through the length of the string and then using an array to keep track of which numbers I've used and then just waiting for the random function to hit all the char indexes in the string before stopping. I'm sure there is an easier way to do this. Does anyone have any suggestions, my code currently resembles below:
Code:
// prebuilt stage object are a button called "btn" and a textbox called "myBox"
var myString:String = new String("john"); // the string to mix up
var usedChars:Array = new Array(); // the used Character array
var counter:Number = new Number(); // position counter - track letters used
btn.onPress = function() {
onEnterFrame = function () { // using onEnterFrame for cont. run
if (_root.counter<_root.myString.length) {
scrambleWords();
} else {
//delete this.onEnterFrame;
}
};
};
function randRange(min:Number, max:Number):Number {
var randomNum:Number = Math.floor(Math.random()*(max-min+1))+min;
return randomNum;
}
function scrambleWords() {
for (i=0; i<_root.myString.length; i++) {
var myNum = _root.randRange(0, _root.myString.length-1);
for (h=0; h<_root.myString.length; h++) {
if (_root.usedChars[h] != myNum) {
trace(usedChars + " : " + myNum + " : " + counter);
_root.counter++;
myBox.text += _root.myString.charAt(myNum);
_root.usedChars[h] = myNum;
} else {
trace("number already exists");
}
}
}
}
Thanks for any help or advice.
[F8] Color Mixing
I'm rather new to advanced flash. What I'm trying to do is take one base color, after you click on this base color, 15 different colors will show up. When you pick one of the 15 other colors that appear, it will mix that color with the base color that was selected.
First, is this possible?
Second, is there something that might already be floating around, and if not, where is a good place to start looking to create this?
Thanks!!
Mixing Streams Together
It is my understanding that the only way to have an application in which multiple streams are allowed to play at the same time (for example, a simple audio conferencing app) is to have each client subscribe to each of the individual streams. I'm wondering if, on the other hand, it would be possible to have each client publish its own stream, then combine all the streams at the server and publish just one "combined" stream where all the audio is mixed together--sort of what a telephone switch would normally do. This would make it possible to, for example, maintain a fixed bandwidth requirement for each user as opposed to have the bandwidth required by each user grow arithmetically with the number of users in the conference.
Any thoughts?
Thanks!
Audio Mixing
Hey everbody I have here a challenging question. I am looking to build a Audo Mixer / Editer (Similar to Audacity). I am wondering what would be the best stratgey, does Flash offer any built in audio editing tools, or any clases in Actionscript I could write to mess with the physical audio? I have heard of LoopLabs wich looks amazing, offer multi-channel audio mixing. Have you guys seen anything out there like what I am searching for, should I even start with flash or is there annother platform I should start with? Your input would be much appreciated!
Mixing As3 And As2 Objects
I'd just like to check something. When I was trying out a bit of as3, I tried having as3 objects, but as2 code on the timeline, so I'm guessing that you can't nest or load as3 objects inside as2 movieclips because it probably treats everything like it's as2, so as3 objects don't work..
But does it work the other way around? To have as3 objects nesting as2 "objects" or loading as2 swfs?
Or is it either-either, no mixing whatsoever?
Mixing Flash With Vb.net
hi i'm trying to use flash to create some buttons in a vb.net program and was trying to follow seifer tim's flash in vb tutorial but i'm using vb.net and flash mx pro 2004.
mx pro 04 can publish swf's but vb.net does not have a shockwave flash component. anyone have any ideas on how i can get a flash component into vb.net?
Mixing AS And Flex In CS3
Hi,
I have done a project on AS3 in Flash CS3 which is using:
- library items with class linkage
- timeline instances
- a lot of as3 classes (inherited from linkage)
Now I need to add some user interface elements such as dialog boxes, alert messages etc. which I found Flex can easily provide me.
The actual question is - can I simply import Flex libraries in Flash CS3 by adding class paths and use functionality from actionscript files? If no, what is the correct way of adding Flex assets into my existing CS3 project? I don't really want to leave Flash because I like animation/visualisation/drawing tools in CS3.
Mixing Flash With Vb.net
hi i'm trying to use flash to create some buttons in a vb.net program and was trying to follow seifer tim's flash in vb tutorial but i'm using vb.net and flash mx pro 2004.
mx pro 04 can publish swf's but vb.net does not have a shockwave flash component. anyone have any ideas on how i can get a flash component into vb.net?
Mixing Studio
Hi everyone,
I am a final year student at university. I am wondering if anyone can help me. I am making a mixing studio but I'm having problems with the scripting. I have got alot of help from my tutors and friend but I have hit a brick wall. can any one help with this.
The section that i am having problems is a double click section. there is abug in it somewhere but i can't find it.
ActionScript Code:
_global.loopnum = 6;
_global.sync = 1;
var soundArray = ["s1", "s2", "s3", "s4", "s5", "s6", "s19", "s20", "s21", "s22", "s23", "s24", "s7", "s8", "s9", "s10", "s11", "s12", "s13", "s14", "s15", "s16", "s17", "s18"];
var sndObjArray = [];
var sndMCarray = [];
var stageObjArray = [0, 0, 0, 0, 0, 0];
var ActivestageObjArray = [];
var soundCycleArray = [0, 0, 0, 0, 0, 0];
var i = 1;
while (i <= loopnum)
{
CurrentLoop = SoundContainer.createEmptyMovieClip("loop" + i, i);
sndMCarray[i - 1] = CurrentLoop;
x = new Sound(sndMCarray[i - 1]);
x.attachSound(soundArray[i - 1]);
x.start(0, 999);
x.setVolume(0);
sndObjArray[i - 1] = x;
trace("objArr" + sndObjArray[i - 1]);
trace(sndMCarray[i - 1]);
i++;
} // end while
function initPalette()
{
var _l1 = 1;
while (_l1 <= loopnum)
{
palette["p" + _l1].id = _l1;
palette["p" + _l1].gotoAndStop(_l1 + 1);
palette["p" + _l1].trackAsMenu = true;
palette["p" + _l1].onPress = spawn;
trace("init done " + ["p" + _l1]);
_l1++;
} // end while
} // End of the function
function spawn()
{
var _l1 = this;
clipCount++;
var _l2 = "clip" + clipCount;
holder.attachMovie("clip", _l2, clipCount, {id: _l1.id, soundCycle: soundCycleArray[_l1.id - 1]});
stageObjArray[_l1.id - 1] = _l2;
trace(stageObjArray);
palette["p" + _l1.id]._visible = 0;
trace("id " + _l1.id);
_root.InstructionFader.play();
} // End of the function
function SoundDisc()
{
var _l1 = this;
_l1.trackAsMenu = true;
holder["clip" + clipCount].gotoAndStop(_l1.id + 6 * _l1.soundCycle);
_l1.drag();
_l1.onMouseMove = drag;
_l1.onRelease = _l1.onReleaseOutside = dropSpawn;
} // End of the function
function drag()
{
var _l1 = this;
var _l2 = _root;
if (_l1.hitTest(_l2.boundryclip))
{
} // end if
_l1._x = _l2._xmouse + 17;
_l1._y = _l2._ymouse + 10;
Pan = Math.round(_l1._x / 2.500000) - 100;
Vol = 100 - Math.abs(Math.round(_l1._y) / 4);
sndObjArray[_l1.id - 1].setPan(Pan);
if (Vol < 0)
{
Vol = 0;
} // end if
trace("vol " + vol);
sndObjArray[_l1.id - 1].setVolume(Vol);
updateAfterEvent();
} // End of the function
function dropSpawn()
{
var _l1 = this;
trace("dropSpawn");
delete _l1["onMouseMove"];
_l1.onPress = startMove;
_l1.onRelease = _l1.onReleaseOutside = dropMove;
} // End of the function
function startMove()
{
var _l1 = this;
_l1.onMouseMove = drag;
_l1.initDepth = _l1.getDepth();
_l1.swapDepths(9999);
} // End of the function
function ChangeGenre(set)
{
var _l1 = 1;
while (_l1 <= 6)
{
Cycle = set;
soundCycleArray[_l1 - 1] = Cycle;
holder[stageObjArray[_l1 - 1]].soundCycle = Cycle;
holder[stageObjArray[_l1 - 1]].gotoAndStop(_l1 + 6 * Cycle);
trace("Cycle" + Cycle);
var _l3 = _l1 + 6 * Cycle - 1;
trace("nxt sound pos: " + _l3);
sndObjArray[_l1 - 1].stop();
palette["p" + _l1].gotoAndStop(_l1 + 6 * Cycle + 1);
if (sync)
{
trace("sync");
var x = new Sound(sndMCarray[_l1 - 1]);
x.attachSound(soundArray[_l3]);
sndObjArray[_l1 - 1] = x;
var _l2 = 1;
while (_l2 <= loopnum)
{
sndObjArray[_l2 - 1].stop();
sndObjArray[_l2 - 1].start(0, 999);
trace("restarted " + _l2);
_l2++;
} // end while
}
else
{
trace("NO! sync");
var x = new Sound(sndMCarray[_l1 - 1]);
x.attachSound(soundArray[_l3]);
x.start(0, 999);
sndObjArray[_l1 - 1] = x;
} // end if
_l1++;
} // end while
} // End of the function
function dropMove()
{
var _l2 = this;
if (Mouse.doubleClick())
{
trace("double");
_l2.soundCycle++;
if (_l2.soundCycle == 4)
{
_l2.soundCycle = 0;
} // end if
soundCycleArray[_l2.id - 1] = _l2.soundCycle;
trace("id" + _l2.id);
holder[stageObjArray[_l2.id - 1]].gotoAndStop(_l2.id + 6 * _l2.soundCycle);
trace("soundCycle" + _l2.soundCycle);
var NxtSound = _l2.id + 6 * _l2.soundCycle - 1;
trace("nxt sound pos: " + NxtSound);
sndObjArray[_l2.id - 1].stop();
if (sync)
{
trace("sync");
var _l3 = new Sound(sndMCarray[_l2.id - 1]);
_l3.attachSound(soundArray[NxtSound]);
vol = 100 - Math.abs(Math.round(_l2._y) / 4);
_l3.setVolume(vol);
sndObjArray[_l2.id - 1] = _l3;
var _l1 = 1;
while (_l1 <= loopnum)
{
sndObjArray[_l1 - 1].stop();
sndObjArray[_l1 - 1].start(0, 999);
trace("restarted " + _l1);
_l1++;
} // end while
}
else
{
trace("NO! sync");
_l3 = new Sound(sndMCarray[_l2.id - 1]);
_l3.attachSound(soundArray[NxtSound]);
_l3.start(0, 999);
vol = 100 - Math.abs(Math.round(_l2._y) / 4);
_l3.setVolume(vol);
sndObjArray[_l2.id - 1] = _l3;
} // end if
}
else
{
trace("single");
} // end if
delete _l2["onMouseMove"];
_l2.swapDepths(_l2.initDepth);
if (_l2.hitTest(_root.palette))
{
palette["p" + _l2.id].gotoAndStop(_l2.id + 6 * _l2.soundCycle + 1);
palette["p" + _l2.id]._visible = 1;
sndObjArray[_l2.id - 1].setVolume(0);
stageObjArray[_l2.id - 1] = 0;
removeMovieClip(_l2);
} // end if
} // End of the function
Mouse.doubleClick = function (clickSpeed)
{
var _l1 = clickSpeed;
if (!_l1)
{
_l1 = 500;
} // end if
if (Mouse.lastclick - Mouse.lastclick == getTimer() + _l1 > 0)
{
} // end if
true;
return(true);
};
SoundDisc.prototype = new MovieClip();
Object.registerClass("clip", SoundDisc);
SoundDisc.prototype.drag = drag;
Any help would be much appreciated.
Thanking you
Irishcrew
Mixing Methodologies.
I just "finished" a project where I use perl to preprocess the log/data files from a system monitoring application into a flash digestable form, then use flash to display the results....But that is not what this is about
In this example, I have used an array iterator, a framer, my engine and loadVariables to accomplish the task.
The array iterator contains a list of files. Althought I don't individually load the files, i do use the iterator to tell me which variable to use to display the data. (I wrote the perl to load all the log data to one file that loadVariables assigns values to).
The engine is used to build the data one row at a time for slower processor machines that might choke in an all-at-once scenario.
The framer provides a convienient storage for attaching movieclips to. I had originally thought it would be cool to fade in / fade out as data is assembled, but for this project I think it is more use full to not do that. I should mention that since my box is a 1.6 g, I go ahead and build everything before I display it so it looks like I am flipping through data pages.
As usual, everything you would need to build and run the fla is on my site (I even included the perl processing code -- you won't be able to run it because of a TSCN::Wildargs..)
I tried working with mose listeners and translating screen coordinates into time blocks, but I found this style of programming a bit round-about so what I do is give each mc and identity and invisible button that updates the time label to be the value of that identity.. much more straight forward I think. (I should also say that I abhor hitTest.. which I need to cooperate with the listener method).
Anway.. for what it is worth.
http://www.nebulouscore.com/examples...1DisplayE.html (fla and others too).
Mixing Javascript With Flash
I'm trying to get Flash to open a "chromeless window" within my site but cannot figure out the proper action. In my index page the code for opening it would be:
<A HREF="#" onclick="mywin001=openIT('index2.htm',760,450,null ,null,'mywin001',5,true,true,true);return false">Enter</A>
Is there anyway to have Flash do that with the press of a button within a Flash movie embedded on the index page
I tried using this actionscript on the button like it would be on the page but to no avail:
on (release) {
getURL("#" onclick="mywin001=openIT('index2.htm',760,450,null ,null,'mywin001',5,true,true,true);return false");
}
I am using Flash MX.
Sound Mixing Problems
I am creating a random mixer, I have a stage with 5 coloured balls in the centre. I have created 5 sounds. The idea is when you click a ball It begins travelling in a random direction until it hits a wall (around the edge of the stage) then it bounces back in at a random angle.
Also, when you click a ball, a sound loop starts. As the ball travels around in it's randomness, the co-ordinates of the ball control the volume and pan of the sound. Top of the stage: full volumes, bottom of the stage: 0 volume, far left stage: full left pan, far right stage: full right pan, and everycombination in between.
The idea is when the sound is in a position you like, you click on it and it stops, in-turn the sound holds the current volume and pan.
I have this working great for 1 sound and one ball. However once you introduce a second ball there are problems.
I have named the sounds, sound1, sound2, sound3, etc.
each ball calls setPan and setVolume of the corresponding sound.
eg. ball3 contains the code:
_root.sound3.setVolume(100-(this._y/4));
However, when I trace the getPan() and getVolume() of all the sounds after starting only one ball in motion, it shows that all the sounds pans and volumes are being determined by the one ball.
this is an example from my trace:
1 vol : 69
1 pan : 4
2 vol : 69
2 pan : 4
3 vol : 69
3 pan : 4
What is the problem here? Can flash only handle one volume or pan setting?
All help is really appreciated. I'm completely at a loss.
Mixing HTML With A Flash Nav Bar?
I've got my portfolio site up, but some of the feedback has been that it takes too long to load. So, maybe my possible employers are getting turned off by it. I was thinking of leaving the opening animation, and just making all the sub-pages HTML with a Flash Nav Bar. So, how can I leave the nav bar on the top of the screen with HTML under it?
Here's my site: Lanny.Lanman.com
I have Flash and DreamWeaver available for me to use. Where do I begin here? Do I make a separate Flash movie for the sub-pages and stick that in a frame on top? If so, then how do I work out the targets and such so that what is clicked in the Flash menu affects the HTML?
Thanks for any help.
Mixing Html And Flash... Help
Hey guys!
This is my first time posting here. I really need help for something.
I was put in charge of making my school's website. this also includes the page that all the computers in the school load as a default when opening safari or internet explorer. They wanted this page designed in flash, so I did it. Now, im normally a photoshop and painter nut, so this was the first time i had tackled anything to large in flash.
i made a large, 3 windowed movie-type thing that has little animations all over it, blinking and stuff. now. I put it into html, and now I want to overlay windows, or Iframes on top of the places that i made blankl on my flash layout, so i can put a quicktime movie into there.
am I being clear enough? hm.. basically i have the flash movie, and i want to know how to put a quicktime video into it of our school announcements, through html. is it possible to put div layers that go on TOP of the flash movie?
*edit* Heres the page im working on:
http://www.ocdsb.edu.on.ca/SWILweb/intro.html
as you can see the white windows are the iframes. i moved them to the edges so you can see them. I want them to be on TOP of the blanks that i left in flash so i can put quicktime movies onto them.
Cake Mixing Game Help
Heh, Im such a n00b when it comes to writing my own code xD I want to make a cake mixing game. You drag and drop up to 3 ingredients into a pot and if you get the right combinations then it goes to a frame with a cake on it. I could probably write the code myself if someone could steer me in the right direction
Oh, and I have flash MX ;-; I should be getting CS3 soon though
Mixing HTML And Flash
Hi there,
Some months ago I made a website with dropdown menus by using Fireworks' popup menu tool, which wrote Javascript. The present site is at www.eleceng.adelaide.edu.au. I want to achieve the same menu functionality using Flash. I've got the code for the menu itself written (with a lot of help I must add), but now need to link it to the buttons on this page. The site must remain a HTML site with the Flash only called when the buttons are clicked, and invisible the rest of the time. Obviously it would be a piece of cake in a full Flash site. It's probably child's play for most of you experts but I'm still a bit of a novice!
So I guess there are three issues:
1) What's the code to launch the Flash movie? I.e. <a href="#" onclick="????"></a>
2) How do I ensure the movie is positioned correctly on the page when launched?
3) How do I ensure the stage size does not interfere with the html layout and that the stage itself does not overlay any other page elements, only the items on the stage? A large stage with a transparent background on a separate layer seems the obvious solution but a transparent stage does not appear to be an option in Flash 8 (unless I'm missing something), and I understand Flash + layers / divs is a bit risky.
Finally, I'd like to have this runnable on as old a version of Flash as possible so if you're able to help, please advise which solutions are going to hit problems with older players (I ask that as some of our XP machines somehow seemed to have Flash 4 installed!)
Thanks in anticipation for any help you can offer!
Regards,
Greg
P.S. A couple of acceptable alternatives would be to:
1) Include the main buttons in the Flash rather than the HTML
2) Include the whole menu bar in the Flash
These would get around points 1 and 2 how to call the movie from HTML, but not point 3. I'd prefer to avoid these but if they're the only way it could be done.
Mixing Publishing Resolutions
I have developed a website comprised of many Flash files published at 610x420 pixels. I now wish to publish new additions to the site at 860x588. However, when display an 860x588 file and then jump back to a 610x420 published file, the 610x420 file now displays at 860x588 - which distorts its fonts, etc., even through the flash created html file that calls the swf file is still set to 610x420. Should not the resolution display of a swf file be the resolution that its html file is set to? It seems that once I display an 860x588 file, that resolution carries over to all the other files. Any thoughts on how to correct this - thus allowing me to mix together files of two different resolutions?
Thanks,
Ray
Video Streaming Mixing
Hello!
I want have a live broadcast (like web TV) using Flash Media Server. I taking video right from digital camera. My question is how i can put over this video stream some image (channel logo) or another video stream (for example breaking news line on the bottom)? What i need for this?
Thanks
Mixing 2 Tuts Problems, Swf In Swf
I'm trying to mix two tuts in one movie. They are:
1) http://www.kirupa.com/developer/mx/photogallery.htm (a photo gallery w/ forward-back buttons) FARM.swf
2) http://www.kirupa.com/developer/mx/p...transition.htm (a front for the photo gallery w/ a preloader & buttons) PHOTOS.swf
I'm creating a page so that users can access different photo albums with one interface. My idea is to use #2 (photos.swf) as the main movie with multiple buttons that load an swf (such as farm.swf - the actual album). So far it's working in that the first image is loaded when I click the button to load the movie, but my forward/back buttons are chopped off. What I think is happening is that the first image from the movie is being loaded and not the actual swf movie itself. Is there some rule that prevents an swf that uses actionscript to load into another swf that is also using actionscript? Do I need to just abandon this whole idea?
Thanks
Pam
Mixing 2 Tuts Problems, Swf In Swf
I'm trying to mix two tuts in one movie. They are:
1) http://www.kirupa.com/developer/mx/photogallery.htm (a photo gallery w/ forward-back buttons) FARM.swf
2) http://www.kirupa.com/developer/mx/p...transition.htm (a front for the photo gallery w/ a preloader & buttons) PHOTOS.swf
I'm creating a page so that users can access different photo albums with one interface. My idea is to use #2 (photos.swf) as the main movie with multiple buttons that load an swf (such as farm.swf - the actual album). So far it's working in that the first image is loaded when I click the button to load the movie, but my forward/back buttons are chopped off. What I think is happening is that the first image from the movie is being loaded and not the actual swf movie itself. Is there some rule that prevents an swf that uses actionscript to load into another swf that is also using actionscript? Do I need to just abandon this whole idea?
Thanks
Pam
Mixing/fading Loops With ActionScript
Hi...
I'm having a problem transitioning two loops smoothly.
Here is the scenario:
The piece I'm working on is a presentation and runs from start to finish with no interactivity. I have imported two separate .wav files that are short drum beats of no more than 30 frames each. For the first minute I have the first loop going and then I want the pace to change and have the new loop fade in while the old loop fades out.
The problem is that when you assign the "Fade Out" property to the loop it fades out the tail end of the drum beat for every time it plays. I want it to fade out only after the 10th loop.
All the actionscript I've seen to fade out/fade in are button related... on(release) etc... Is there a simple script that will do this regardless of interactivity that just tells Flash how long to play the loop and when to fade it out?
Appreciate it if anyone has some advice.
Thanks.
Online Mixing Decks Needed
We are looking for someone to create us an online mixing site of some kind like this http://www.truegarage.com/mixing/recordstore.htm
We need to be able to add new songs etc and change layout and graphics as necessary.
We are offering cash, hosting space, credits on site – in fact just name what you want in return and we will do the best to sort you something out.
Please this is a genuine offer and only reply if you know you can do it!
More work will come from this project!
Cheers
The Fluent Motion Team
Online Mixing Decks Needed
We are looking for someone to create us an online mixing site of some kind like this http://www.truegarage.com/mixing/recordstore.htm
We need to be able to add new songs etc and change layout and graphics as necessary.
We are offering cash, hosting space, credits on site – in fact just name what you want in return and we will do the best to sort you something out.
Please this is a genuine offer and only reply if you know you can do it!
More work will come from this project!
Cheers
The Fluent Motion Team
Additive Color Mixing - Please Help ASAP
I'm trying to write a flash animation by tomorrow to mix Red, Green, and Blue circles like light. I have three circles on the stage, one red, one green, and one blue...when the red and blue overlap, I want the overlapped area to be magenta, when red and green overlap I want the overlapped area to be yellow, and when blue and green overlap I want the overlapped area to by Cyan. Any advice on how to do this??? a little snippet of code on how to get the overlap effect would be great. I can drag the circles around no problem, but need to get the color effect.
Movie Clips Mixing Up When Publishing
I'm working on a sliding puzzle. Each piece is a move clip, one small part of the picture that's broken a part.
Please take a look at it: some of the movie clips place them selves in new positions - why is this?
I've tried different pictures, different formats.
Anybody seen anything like this?
Who Can Help Me Mixing These Two Pieces Of Code In Flash5?
Hi all,
I want to blend two scripts into one:
A preloader script + a script where the MC is being faded to 0% alpha.
I want to combine them so that when the percentage reaches <99%, the preloader MC (preloader) is being faded to alpha 0%.
code:
onClipEvent (enterFrame) {
if (this._alpha>=1) {
this._alpha = this._alpha -= 10;
}
}
but because of the IF statement of the alpha fade script, I can't really implement it correctly in the if (percent>99) { action. I want it where I now have the _visible property.
And if it would be possible, I would like the '_root.content.gotoAndPlay(3);' line to wait untill _root.coverover.preloader.alpha = 0; (so that would be another IF statement)...
So how to I mix all this into one working actionscript???? Hope someone can help me
code:
onClipEvent (enterFrame) {
loading = _root.content.getBytesLoaded();
total = _root.content.getBytesTotal();
percent -= (percent-((loading/total)*100))*.25;
per = int(percent);
percentage = per+"%";
loadBar._width = per;
if (percent>99) {
_root.coverover.preloader._visible = 0;
_root.content.gotoAndPlay(3);
}
}
Drag And Drop Mixing Studio
Need help with something and I know you all love helping me out when I get into a sticky situation. I am final year at university and I have design a mixing desk with the use of drag and drop. I am trying to design a timeline and drag the music from a library beside the timeline and place it anywhere on the timeline. when the play head moves over the sound then it will play. I would be greatful if any one could inform me of tutorial that I could complete or if they know how to do this please help me.
Thanking you
Irishcrew
Mixing Sounds And Exporting To MP3/WAV In Runtime
Hello - this my first post here.
I'm creating a simple "groovebox" flash app, that lets the user create their own songs by mixing (simultaneously playing) a number of looped sounds as various "patterns", and then arrange and repeat these patterns to make a final song
I also want to let the user save this as as an mp3.
Is there a way (during runtime) to mix several, simultaneously playing sound objects into one and export/save that as an mp3 or wav etc ?
I don't really want to us Direct Sound as:
1) i don't know how, and
2) Mac users won't be able to use it.
But if it's my only choice then where do i find out about using it in flash?
Any guidance much apperciated, Thanks,
Peter (BuddhaBoy)
|