Flash 8 Not Recognizing Fonts
I'm experiencing difficulties with Flash 8 not recognizing the majority of a font family.Its strange because Photoshop & Illustrator recognize them & display them just fine.The fonts involved my project include:HelveticaHelvetica CompressedHelvetica CondensedHelvetica BlackHelvetica LightHelvetica Extra CompressedHelvetica LT StdHelvetica NeueHelvetica Ultra CompressedOf this list, Flash 8 is only recognizing:HelveticaHelvetica LT StdHelvetica NeueSo at this point I'm having to literally type EVERYTHING out in Illustrator, export swfs, and import them into Flash.This is obviously time consuming and makes simple text changes a pain.I'm leaning towards the fact that this is a corrupt font issue, yet these fonts are available in every other software I've tried them in.Has anyone else experienced this issue?Any thoughts??Thank you!!!-eric
Adobe > Flash General Discussion
Posted on: 07/07/2006 01:46:58 PM
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Flash Not Recognizing Fonts?
I have 10 variations of a font that I'm using for a Flash project. 6 of these are a true type font, and the other 4 have a big red "a" on them, and when I see the font it calls them a "type1" font. Never heard of that.
My problem is that Flash is only recognizing 5 variations of the font. 4 of them are true type fonts, the other 1 is a "type1" font.
Any ideas on how to make them all visible?
Thanks,
Brian
Recognizing Fonts Under Common Files
I have stored all fonts under:
Program Files >> Common Files >> Adobe >> Fonts
All my Adobe Applicaitons read these fonts from this folder. So, I do not
have to load the fonts into the system fonts folder.
Is there a way to get Flash to read fonts from this folder?
I'm using Flash 8.
Thanks.
[F8] Flash Not Recognizing My .FLA... HELP
i know this is a longshot, but i gotta ask...
I was working on one of my websites, and Flash pooped out on me for some reason (probably cause my cpu is about 1 day older than dirt), but i got the Debug/Close message, chose Close, then when i reopen Flash, and try to open the .FLA i was working on (which was a pretty intensive site), i get a "Unexpected file format" error...
does anyone have any clue of what i could even try to do to fix it??
even my latest backup is a week old and missing TONS of work...
TIA.
Recognizing If Someone Has Flash Installed?
I am building a web site for an advertising/marketing comapany and they want a flash banner and navigation at the top of the page. They also want a HTML-only version for some of their clients.
They suggested that I build a 'splash' page to offer a link to the flash and html pages.
However, I do not like that idea and was wondering if there is a script I can put on the main page to redirect them if a flash player is not found on their compter? That way clients can go straight to the main page, and if they can't view the flash navigation bar, it will re-direct them to the HTML pages.
Is what I am trying to accomplish possible? Are there any other solutions?
Thanks
Sean S.
Desperate For Help, Flash Not Recognizing OnSoundComplete
I have a project I'm working on, a basic mp3 player. My problem is that the onSoundComplete event is never triggered. What it was doing when it was working was calling the playSong() function which starts a song, I commented that out and simply told it to write some text on the event, and it is just never triggered.
Here is the entire page of AS, it's not that long. Any help is greatly appreciated. Everything is working except for the onSoundComplete.
Edit: I wrote this in Flash Proffesional 8, and publishing it for Flash Player 7.
Code:
//Setup the sound object
var sObject:Sound = new Sound();
sObject.setVolume(75);
//Create an array that holds all our songs
var saUrl:Array = new Array();
var saTitle:Array = new Array();
var saSongID:Array = new Array();
var saImage:Array = new Array();
var saUserID:Array = new Array();
var saArtist:Array = new Array();
//Currently Playing Song
var sCurrentlyPlaying:Number = -1;
//Position of the music
var sPosition:Number;
//Length of the song
var sDuration:Number;
//Load the xml file
var xml:XML = new XML();
xml.ignoreWhite = true;
xml.onLoad = function()
{
var nodes:Array = this.firstChild.childNodes;
for(var i=0;i<nodes.length;i++)
{
saUrl.push(nodes[i].attributes.songurl);
saTitle.push(nodes[i].attributes.songtitle);
saSongID.push(nodes[i].attributes.songid);
saImage.push(nodes[i].attributes.songimage);
saUserID.push(nodes[i].attributes.userid);
saArtist.push(nodes[i].attributes.songartist);
//Check to see if this song is the selected song
if (playNowSong == nodes[i].attributes.song_id)
{
sCurrentlyPlaying = i - 1;
}
var songNumber:Number = i + 1;
}
playSong();
};
xml.load("http://www.website.com/music/mp3_xml.php");
//Play the mp3 file
function playSong():Void
{
sObject = new Sound();
sPosition = 0;
//Check to see if we are at the end of our list
if(sCurrentlyPlaying >= saUrl.length - 1)
{
sCurrentlyPlaying = 0;
}
else
{
sCurrentlyPlaying++;
}
if(saUrl[sCurrentlyPlaying] != undefined)
{
//Load the new song and set the title
sObject.loadSound(saUrl[sCurrentlyPlaying], true);
csTitle_txt.html = true;
csTitle_txt.htmlText = "<b>::Playing</b> <i>" + saTitle[sCurrentlyPlaying] + "</i>";
//Load the album art
_level0.albumArt_ldr.contentPath = saImage[sCurrentlyPlaying];
//Reset our volume button
vMute_mc.gotoAndStop(1);
//Finally update our play list
var varsObject = new LoadVars();
varsObject.id = saSongID[sCurrentlyPlaying];
varsObject.state = "play";
varsObject.sendAndLoad("http://www.website.com/music/update_played.php",varsObject,"POST");
//Start the meter bar
_level0.meter_mc.gotoAndStop(5);
}
};
sObject.onSoundComplete = function()
{
csTitle_txt.htmlText = "finished";
//_level0.meter_mc.gotoAndStop(1);
//playSong();
};
albumArt_ldr.onRelease = function()
{
getURL("http://www.website.com/community/profile.php?p_id=" + saUserID, "_blank");
};
Flash Recognizing Latin Characters
Hi
I'm having problems using a flash formulary using PHP. When the information comes in the email, it modifies the latin characters like "á,â,í,ç".
Does anyone know a command in actionscript that can fix this problem? I need to change the encoding... or may the problem is in the PHP?
very thanks
Alexandre Horbach
Brazil
Recognizing An Updated Flash File?
I'm having a problem. Everytime I update my .swf file and upload it to my server (overriding the previous .swf file) when I go back to the web page, it doesn't recognize that an updated .swf file (with the same name) is there. It will instead show the outdated version one till I delete my history and cookies, etc. Is there a way to do this so that when people load the site, they see the latest version? I use a preloader as well.
Any help would be great, thanks!
Flash Movie Not Recognizing Php-passed Variable - Help
OK, flashers. I need a master flash guru to help with a particularly sticky dilemma. My problem involves passing variables back and forth between flash and a php script that I have running.
Basically, the crux of the problem is that while I can LOAD variables into the flash movie using a button with the following actionscript attatched to it:
on (release) {
loadVariablesNum ("../includes/case-analyser.php", 0, "POST");
}
the script in question (case-analyser.php) is just a small script containing this:
<?
print "&_root.goFade=left&_root.testvar=passed ok&loading=no";
?>
Soo... When I export the movie and click the button, the variable "left" appears in the text field called goFade on the root level just fine, because it's loaded in from the PHP. Fine and dandy. HOWEVER, I can't do anything else WITH it. I have a bunch of scripts which are set so that if (_root.goFade == left) then certain things will happen, only they don't. (I have some buttons in the flash movie iteslf that set this variable to 'left' and they work just fine) Also I have another variable reading the length of that text field. It doesn't seem to register a new integer when the variable is loaded... basically it's like the variable appears on the screen but doesn't REALLY enter the movie at all. Or at least flash can't read it.
I've tried creating little controller movie clips that just constantly refresh and check the field for new data - but nothing seems to be working. Does ANYONE know why I should be able to see the variable in the text field of my flash movie, but have it NOT affect the movie like a regular variable? I'm completely baffled.
Flash Button Recognizing Html Page
I asked a similar question before, but now have come across another problem. I have Flash navigation that contains 5 buttons, each with an off state colored red and an on state colored yellow. This navigation is placed on each html page and each of these buttons link to a unique html page. I need these Flash navigation buttons to recognize what html page they're on so the on state is active when on a particular page. So, when the user is on the Contact Us page, the Contact us button needs to stay yellow and the rest remain red. Any ideas?
Flash CS3 Debugger Not Recognizing Keyboard Input
I am trying to debug a piece of code involving a keystroke. While debugging, when I hit the key the first time, the breakpoint is triggered. But after the breakpoint, the debugger simply ignores any other keystrokes. I'm trying to see what happens when the key is pressed a second time so you can see why this is frustrating me.
I'm running Flash CS3 on an intel iMac. The program is written in AS3.
Is this a known issue? Are there any workarounds?
Thanks in advance!
Jeremy
Recognizing Earlier Flash Players In Flash 5
howdy,
i would like to find out what flash player version my visitors have so that i can tell them to update to flash 5 if neccessary.
it seems that people without flash completely get the download prompt, but those with flash 4 or earlier get and see nothing... no likey.
please help or advise, am i totally confused?
much appreciated, thanks
quazi
Flash Fonts And Server Side Fonts
Hi,
I'm creating an application where users upload their images with flash and edit them. We are placing text over the images, and we allow the users to choose the fonts in which they write them.
The co-ordinates are saved to the application database and the server side code dynamically writes the text on top of the images.
I know in order for the server side application to write in the selected font it must be installed in the server. I am wondering what my limitations on fonts that appear in flash are ?
How can I increase the number of fonts that will function on both the flash application and the server side application? The application is being developed in as 2.0, but could be moved to 3.0 if this helps.
Thanks very much for any assistance!
mike123
As Not Recognizing A Mc
I'm finally doing my first AS3 project after lots of AS2. I was given a .fla by the graphic artist with a timeline full of graphics and movieclips, etc., but no AS other than some stop() functions. I'll write some classes soon, but for the moment, I'm working on the timeline.
There's a movieclip on the timeline to which I need to register an event listener. I gave the movieclip a name "div". But when I run the movie, I get the following error:
1120: Access of undefined property div.
I get this error for any movieclip that was already present on the timeline when I received the .fla if I try to reference it with Actionscript in any way, even including a trace() function. If I convert one of these symbol types to a Button, then AS properly recognizes them. But then I lose the functionality of those MCs.
If I create a new movieclip with the tool palette and put it on the stage, I can do what I want with it in AS without the errors.
It's like Actionscript can't see the preexisting movieclips, even though they have instance names.
Why would this be?
Recognizing Color
I have buttons to make an object("guy") turn different colors. Now I'm having trouble figuring out an action to find out what color it is and then play a frame if it is that color on a certain frame. can anyone help. it is probably simple I just dont know.
Recognizing Variables
I've been trying to get a conditional script to recognize the appropriate variable to follow in the script. Would their be an error in the syntax or in setting the variable vaolues that would prevent the script from being understood.
The script seems to be skipping the first questions variable altogether. Please help straighten me out.
[F8] Recognizing DoubleClick
Hi Buddies,
Is there any way to get the mouse double click event ? I want to trigger a function when the mouse double clicked over a Movieclip... or on the stage...
Not Recognizing XML File
I have a page that rotates through a series of static graphics with an animated sequence between each static image. I did not design this and am now having to make a duplicate copy of this with new colors in the animation and a different XML file to draw the images and titles from. You can see the working version here:
Working Version
I have gone into the action script where the XML file name is specified. I have changed the name to the new XML file name. I re-export the swf file and despite the XML file being in the same location as the original XML file, this simple change seems to break the animation and it freezes just before putting up the first information from the new XML file.
Non-Working Version
Actionscript is not my strong suit. I have gone through and compared the code and I can't find anything that would explain this problem. If anyone has any pointers on what might be causing this, I would be extremely greatful to hear from you.
Regards,
Andy
Need Some Pattern Recognizing Help..
Hey all,
Again, I ran into trouble making tetris. Please take a look at the swf attached. None of the controls work yet - press the blue button to start/pause.
Take a look at it, and you'll see that some blocks go through others (which isn't supposed to happen). The blocks are managed into arrays of "yes" or "no". If the blocks below the current moving tetris block are "no", then that current tetris block will continue moving down. If "yes", it will become purple and initiate a new tetris block.
Now, please feel free to browse through the fla to see the structure. Test the movie in Flash and look at the check "yes" or "no" process with the traced commands.
Something is seriously wrong, and I don't know what. There seems to be a pattern of the blocks that go through others, but I can't find it out. (the swf may need to be run 2 or 3 times before a bug appears).
Thanks for your time!
Need Some Pattern Recognizing Help..
Hey all,
Again, I ran into trouble making tetris. Please take a look at the swf attached. None of the controls work yet - press the blue button to start/pause.
Take a look at it, and you'll see that some blocks go through others (which isn't supposed to happen). The blocks are managed into arrays of "yes" or "no". If the blocks below the current moving tetris block are "no", then that current tetris block will continue moving down. If "yes", it will become purple and initiate a new tetris block.
Now, please feel free to browse through the fla to see the structure. Test the movie in Flash and look at the check "yes" or "no" process with the traced commands.
Something is seriously wrong, and I don't know what. There seems to be a pattern of the blocks that go through others, but I can't find it out. (the swf may need to be run 2 or 3 times before a bug appears).
Thanks for your time!
Recognizing Variables
When I load variables from a text file into my Flash movie, it works properly. But when I try to set up "If" conditions based upon the variables, it fails to read them correctly and I have to manually type the variables in.
Is there any way to fix this? All help is much appreciated.
Recognizing When An External Swf Is Loaded
How do I get the root movie to recognize when an external swf loaded into a target mc has finished loading?
My conditional statement seems to only be able to recognize the target mc, not the external swf.
if (_root.target._framesloaded >= _root.target._totalframes) {
_root.gotoAndPlay(26);
}
Thanks much!
Recognizing An External Swf Has Loaded
How do I get the root movie to recognize when an external swf loaded into a target mc has finished loading?
My conditional statement seems to only be able to recognize the target mc, not the external swf.
if (_root.target._framesloaded >= _root.target._totalframes) {
_root.gotoAndPlay(26);
}
Thanks much!
Recognizing Input Text
i have a game that ive made...... and there are multiples levels.
on the bigging screen i have an input text box with a button beside it . i want it so that when you put in the right password and click the button beside it.. it will go to a certain level(scene).
anyone know what i could do?
thanks
-striker
Recognizing Imported Variables
Hi all,
I've got a list of links that are imported from a text file via php.
The text file is formatted like this / &_level0.text1=Flashkit&_level0.link1=www.flashkit .com& /
It loads into the flash movie just fine and I can see that it is loaded because the dynamic text fields "text1" and "link1" display the proper text.
I use this code to import the names and urls of the links.
loadVariables(pathToLinksData+"?cacheKiller="+getT imer(), this, "POST");
I pass a variable at the end of the text file like this > /:Status="Done" < and in the fla there is a Dynamic text field called /:Status with the instance name StatusInstance.text (that's the only way so far that I can get flash to recognize that there is something in it).
My problem is counting them. If I manually enter the text in the fla it works fine, but If I import the values, flash thinks the value of "_level0.link1" is null or empty.
Here is the count code. It's a function.
if (StatusInstance.text == "Done") {
linkcount = 1;
countLinks();
}
function countLinks() {
while (linkcount>0) {
templink = eval ("_level0.link"+linkcount);
if (templink==null) {
/:total = linkcount-1;
break;
}
linkcount++;
}
}
Again, this works great if the variable values are not imported. I need it to work with variables and values dynamically loaded but flash can't see that "_level0.link1" is NOT empty.
whew. I dunno.
Loading And Recognizing Variables
Something is wrong here. But I don't know what.
I'm loading a text file like this
this.loadVariables("vis.txt");
the contents of the file will ultimately be many variables that will change but for now it is:
&Vis=1
I have a movie on the main timeline with Instance name: Vvisible1
then the code on frame 12 is:
if (Vis = 1) {
with (Vvisible1) {
gotoAndStop("on");
}
} else {
with (Vvisible1) {
gotoAndStop("off");
}
}
I change the variable in the text file and it doesn't change the frame to off. It's always on.
Please help.
Recognizing Htrm In An External .txt?
here is what I have
a movieclip instance name "content_updates" without quotes
inside that movie I have an empty dyanmic text field. var=text
and i have a text document
Code:
text=<p align="center">hello</p><p align="center">there</p>
what actionscript do i need on that movie clip to load that text properly (formatted)?
Recognizing MC's Frame (I Guess...)
Hi all!
Here's my problem: I have a MC on stage called cp. Inside the MC there's a button that shoud activate the MC on the first click and deactivate it on the second click. Basically the MC has a very simple animation of some square going down and stops when it reaches a certain frame (which has a stop(); action on it) and when the user clicks the button for a second time the square goes up. Obviously, the first frame of the MC also has a stop(); action on it. I tried to use the following code but it didn't work, there was no animation whatsoever:
code:
on (release) {
if (_root.cp._currentframe=1) {
gotoAndPlay ("_root.cp", 2);
}
else {
gotoAndPlay ("_root.cp", 32);
}
}
Any ideas how to make this thing work?
Thank you for your help!
Array Not Recognizing Objects
I have a code to create an array, then fill it with objects c1,c2,c3,c4,c5.......,cN.
objectcount = 14
for (myarray=new Array(objectcount), objectnumber=0; objectnumber<objectcount; objectnumber++) {
myarray[objectnumber] = ("c"+(objectnumber+1));
}
that seemed to work just fine. I used trace() and found the array to contain c1 through c14. btw, c1 through cN are movie clips.
then i have a code to change _x and _y for each object in the array.
for (i=0; i<objectcount; i++) {
myarray[i]._x = somenumber;
myarray[i]._y = someothernumber;
}
the behaviour of my movie and a trace action i tried made it evident that my code was unable to set the _x and _y properties on my array objects. a trace action asking for the _x coordinate of one of my objects returned blank.
trace("the _x value is " + myarray[5]._x)
that returned the _x value is
It seems as though it is treating my objects as something other than movieclips.
help please
[cs3] IE Not Recognizing Stop(); On Frame 1
I'm creating an ad that I want to publish to player v6. It has a stop action on frame 1. Firefox recognizes this and stops the movie, however IE just pauses and then plays. If I publish as v8 or 9, the problem disappears, but I really need to make this work with 6. Any suggestions? -mike
Recognizing A Word In A Sentence
hey all...
i need a script thar recognizes a specific word in a sentence.
lets say i have an input text area asking the visitors to answer a specific question. the question is "how are you". The visitor may answer "fine thanks" or just "fine" (or maybe something else). I want to recognize if the answer that is written in the input text area include the word "fine", and if so, do something in the movie when pressed the accept button (so the script must work on a button).
I must solve this with the variable method, because the rest of the movie works with xml, and i don't want to mix it up.
i worked it up with the folloving variable method, but it just works if only the word "fine" is written in the text field. I need smt. similar to this.
Code:
on (release) {
if (this.input_text_field=="fine") {
this.the_movie_clip.gotoAndStop(10);
}
}
any help will be appriciated...
Object Not Recognizing A MouseEvent
Alright, I made a scrollbar class. It creates a background rectangle, and a bar rectangle. If I add MOUSE_DOWN event to the whole MC it recognizes it, but if I add it to the rectangle, it doesn't. here's my code (I deleted some code so you can see easier):
Code:
package com.bizzark{
//import stuff here...
public class Scroller extends MovieClip {
private var rect:Rectangle;
private var slider:Shape = new Shape();
private var bg:Shape = new Shape();
public var sliderObject:Object;
private var slider_tween:Tween = new Tween(slider, "y", Elastic.easeInOut, slider.y, bg.height, 3, true);
function Scroller(){
slider.graphics.beginFill(0xFFC133, 1);
slider.graphics.drawRect(0, 0, 10, 60); // x, y, width, height
slider.graphics.endFill();
bg.graphics.beginFill(0xCCCCCC, 1);
bg.graphics.drawRect(0, 0, 10, 241); // x, y, width, height
bg.graphics.endFill();
addChild(bg);
addChild(slider);
}
private function positionMessage(e:Event) {
//taken out...
}
function moveIn(obj:Object, t) {
slider.addEventListener(MouseEvent.MOUSE_DOWN, sliderDown); // THIS DOESN'T WORK
addEventListener(MouseEvent.MOUSE_DOWN, sliderDown); // THIS WORKS
slider.addEventListener("enterFrame", positionMessage);
addEventListener(MouseEvent.MOUSE_UP, sliderUp);
addEventListener(Event.RESIZE, resizeEvent);
addEventListener("enterFrame", watchPos);
checkNeed();
}
function sliderDown(e:Event) {
trace("DOWN");
}
///etc etc...
}
}
[CS3] HELP: Recognizing User Inputs
I've done some basic Flash work, but I just started into programming in Flash and I'm already fairly frustrated. That being said, I just am really looking for some help with (I think) a pretty basic concept: taking user inputs from an input text box and going to a certain frame based on their inputs. It sounded so simple when I started, but for some reason Flash doesn't seem to be recognizing anything I input into my text box.
When I say I need help, I mean I need to know how to not only code what I need, but how to set up the properties of the text box and allow it to read my inputs.
Basically I need to evaluate a user input of up to 3 numbers, in this case, their age. Based on their answer, the timeline will skip to a certain frame. So far, I think I've determined that using a switch/case statement would be best and I pretty much know how to use that... but I cannot for the life of me get Flash to recognize the number I enter and use that in the statement.
This is what I have so far:
an input box (age_txt)
when a user clicks a button (submit_btn) it should run something like this code:
num = age_txt;
switch (num) {
case 20:
gotoAndPlay(26); break ;
case 40:
gotoAndPlay(27); break ;
case 60:
gotoAndPlay(28); break ;
default:
gotoAndPlay(29);
}
The hang-up seems to be in getting the input recognized. Please help!
Thanks,
Brandon
Recognizing Drawn Letters
What could be the easiest / best way of recognizing which shape a user draws? I'm making a game for kids and they are supposed to draw letters by dragging the mouse, like I, E, A, O and the scandinavian ones too, like Å, Ö.
Now I have a method where I have a transparent movieclip that's shaped like the real thing, only 10 px wide, and every time the user's mousedrag leaves that area I record that as an error. I also calculate the length of the drawing and check that the drawing starts and stops around the right places.
It's fairly accurate, but it's not working with letters that can't be drawn with just one line, like A or E.
I guess it wouldn't be that hard to modify it for that - but before I start it would be nice to hear if there's some better suggestions.
Thanks!
Recognizing A Loaded Movieclip....
What I'm trying to do is load a movieclip into another movieclip. I have a preloader set up that analyzes the load (the movieclip being loaded into) movieclips content and then displays the appropriate number. What I can't figure out is a way to hide this preloader once the load movieclip is completely loaded. I have used "===" in the past to compare total vs. bytes loaded, but this method seems to be hit and miss. Any hints?
Thanks in advance!
-Brock
FTP & IE Not Recognizing Latest Version
Hello,
Uploading my flash portfolio to my host. And anybody that has already looked at an older version of the site (including myself!) still gets the older site. I have erased my cache, my computer clock is correct. I open IE delete cache and type in URL and it goes to a version of my homepage that no longer exists. Doing my head in. - Cal
Hit Counter Not Recognizing Sessions
I have a hit counter in Flash that works, but you can reload all day long, and it continues to add +1.
Below is the code I am using. Any insight on how to make this only record unique viewers, it would be greatly appreciated.
I am calling a .php file into flash,
PHP Code:
<?php
$count = file_get_contents("count.txt");
$count = explode("=", $count);
$count[1] = $count[1]+1;
$file = fopen("count.txt", "w+");
fwrite($file, "count=".$count[1]);
fclose($file);
print "count=".$count[1];
?>
Textfile:
count=0
Page 2 - Recognizing Variables
i hate to ask, but do you think you could zip your 'bare bones' .fla and .txt files and upload it? it's prolly easier to understand what's going on (for me)... and btw:
in your text file it should be :
&boo=carnival
that should work.. but like i said. upload if you could
thanks,
bret
Trivia Game Not Recognizing Commands
I'm building a "Who wants to be a millionaire" type game and I have to use keycodes instead of the mouse for selecting answers, advancing the question, etc. It works perfectly at the beginning....you hit the space bar to move from the "home" screen to the first question. You hit A, B, C or D as your choice of answers and that answer is highlighted. You hit "Enter" to see if you are correct or not.
The problem is that that's where it stops! I would like for you to then hit the space bar and continue to the next question until you get to question 4 where, if you're answer is correct, it's going to play a little movie clip, and if you're wrong, the game will start over. When everything was on the first frame, the space bar worked. I'm thinking that the commands for the space bar need to somehow become a function? When you jump to different frames, it just doesn't recognize the space bar commands anymore? Please help....I have about 1 week to figure this out and get it done! I can send my .fla file to someone if they can help me, but it seems that I can't get it small enough to upload!
Thanks!
Drawing Lines And Recognizing Shapes [CS3]
Hi everyone,
So I'm really new to flash, and need some help with a couple of things. I'm trying to create something where you connect together different stars and they create constellations, which then light up and say the name of the constellation when you have all the stars connected. Like a galactic connect-the-dots. Except I need some help with the coding of it. I've got my star graphics as buttons. I need to know how to draw a straight line, starting on the star button where you clicked it (How would I code it so that the line starts from the specific x/y position of the button? I don't want to go through every star and input each position, so i was wondering if there is some action to take the position of an asset and start from there), a straight line to the cursor, and then connect it to another star, if it is the correct one. If not, the line disappears. Thats easily done with an if/then statement, I think I can figure that one out myself. Seems fairly simple... Click a star, a (straight) line that is snapped to the button is drawn with the cursor and snaps to another star if it is in that particular constellation.
Also how would I make something happen once all of the stars are connected?
I have found some scripts online to draw lines with actionscript using your mouse cursor, but I can't find one that describes how to draw a straight line, starting with where you clicked and going straight to your mouse cursor.
Thanks guys, I'm sure I'll get the hang of this eventually!
Recognizing Start/end Of A User Interaction
Hi, I've to trap the beginning and the end of delivery of a FLV content (i.e. those on YouTube ) from a network point of view without control of server and client (it's not an interception activity... I'm not interested in the content itself).
It would be interesting to trap the user's stop/pause too, but I noticed using Ethereal/Wireshark that no signalling goes back-and-forth; probably it's possible to trap the "HTTP 200 OK" to assume the beginning of the stream but nothing more (probably due to the progressive download/buffering technology).
Have you any idea/help ?
Thanks a lot
Recognizing Filled Input Fields
Hello.
Is there a way for Actionscript (2.0) to understand when an input field has been filled, or hit a certain limit? I want a mc to pop up when an input field has been filled out completely (hitting the maximum number of characters for that field).
I tested out charCount but it seems to just tally the potential maximum characters in that field, instead of actual content being typed in.
Thanks for any help in the right direction. =-)
Edit: What I have so far is a simple if staement with a trace to test it, with JEntry being the instance name of the input field.
if (this.JEntry.text.length == 280); {
trace (JEntry.text.length);
}
Edited: 11/28/2007 at 11:03:34 AM by Deggz
Recognizing Key Presses Without A Mouse Click
My program beings with a frame with a "play" button on it. Once he "play" button is clicked the user is taken to the second frame to play a game. Control for the game is done via key presses. The control works well; I'm able to move the sprites and so forth. However, my problem is after the user clicks "play" and is taken to the second frame the game will not recognize key presses until the user has clicked the applet again. How do I get the game to recognize key presses automatically after the user has clicked "play"?
Here is the code I use in the second frame to listen for key presses:
Attach Code
stage.addEventListener(KeyboardEvent.KEY_DOWN, fnKeyPress)
function fnKeyPress(event:KeyboardEvent):void{
if (event.keyCode == 38){
monster.speed++;
if (monster.speed > 8){
monster.speed = 8;
}
}
if (event.keyCode == 40){
monster.speed--;
if (monster.speed < -3){
monster.speed = -3;
}
}
if (event.keyCode == 37) {
monster.dir--;
if (monster.dir < NORTH){
monster.dir = NORTHWEST;
}
}
if (event.keyCode == 39) {
monster.dir++;
if (monster.dir > NORTHWEST){
monster.dir = NORTH;
}
}
if (event.keyCode == 32){
flame.x = monster.x;
flame.y = monster.y;
flame.dir = monster.dir
flame.speed = monster.speed + 10;
turn(flame);
fnPlaySound(theFireball);
}
}
Function Not Recognizing Array Objects
Hi !!!!
I have made an array with three mc's I have on the stage. They run through a tween, but when the onMotionFinished function is called the array information is not parsed.
Why ?
Code:
import flash.filters.BlurFilter;
import mx.transitions.Tween;
import mx.transitions.easing.*;
var my_arr:Array = new Array();
my_arr.push({name:mc_1, x:050, y:100, duration: 20});
my_arr.push({name:mc_2, x:150, y:175, duration: 100});
my_arr.push({name:mc_3, x:250, y:225, duration: 40});
for (i=0; i<3; i++)
{
var tween_1:Object = new Tween(my_arr[i].name, "_y", Elastic.easeOut, my_arr[i].y, my_arr[i].y+100, my_arr[i].duration, false);
tween_1.onMotionFinished = function():Void
{
trace(my_arr[i].name);
var tween_2:Object = new Tween(my_arr[i].name, "_y", Elastic.easeOut, my_arr[i].y+100, my_arr[i].y-100, 50, false);
trace("2");
}
}
Thanks
Ferran
Recognizing Specific Keys In KeyboardEvent
Hey guys, I just joined the forum because I'm having trouble with a project. I want to have certain keys on a keyboard correspond to a trumpet movie clip on the stage. I've gotten to the point where the valve goes down if you press any key on the keyboard, but I want it to only work if you press a specific key. I know that this was pretty simple in AS2 with the Key.isDown function, but I'm looking for a way to do it with AS3. Here's the code that I have so far-
function reportKeyDown(event:KeyboardEvent):void
{
valve1_mc.gotoAndStop("down");
}
stage.addEventListener(KeyboardEvent.KEY_DOWN, reportKeyDown);
function reportKeyUp(event:KeyboardEvent):void
{
valve1_mc.gotoAndStop("up");
}
stage.addEventListener(KeyboardEvent.KEY_UP, reportKeyUp);
Thanks for your help!
Setting And Recognizing Variables Internally
I hope I explain this coherently... a little new to Flash.
I have a movie, within that movie I have a frame action that says
if(var=="1"){
gotoNextFrame();
}
in another movie that is a child of that movie, I set var="1" based on a rollOver. Problem is that it doesn't seem that var is getting picked up back in the parent movie. I tried _root.var="1" and _parent.var="1" to no avail.
are variables scoped to the movie that sets them? Is there a way to make a variable global?
I think there is something pretty basic here that I am missing.
any advice is appreciated.
Recognizing Valid Text File Variables
what i'm trying to do is be able to allow a user to specify a text file containing variables through an input box, and flash be able to default to variables if the text file is not found. for instance, if a user input "file.txt", and there was no such file, then flash could display a 'file not found' or whatever. what i currently have on a button
is similar to this:
on(release){
filename = inputBox;
input = (inputBox + ".txt");
if(input == ".txt"){
var1 = x;
var2 = x2;
var3 = x3;
gotoAndPlay("wherever");
}else{
_root.loadVariables(input, _root);
gotoAndPlay("wherever");
}
}
i basically need a: if (file != true) kinda thing.
thanks in advance
Code For Recognizing When The Stage Is Growing Or Shrinking. . .
Hi There,
I'm trying figure out how I can set a boolean depending on wheter or not the stage width is decreasing or increasing. I have a stagelistener that is executing some code in it, but am unsure as to how I can go about doing this.
I am thinking that I need a variable that stores a "previous" state of the stage, and compare that to a "new" state of a stage. Problem is how can I do this with the listener?
Thanks!
Laz.
Tween Class Not Recognizing Array Values [f8]
Hi. In AS2, I'm trying to use the tween class with an array, but it doesn't seem to be accepting the references. Here's the code:
code:
//Add Drive Mask
var NewDriveMaskInstance:MovieClip = this.attachMovie("drive mask", "mc_driveMask" + i, getNextHighestDepth());
NewDriveMaskInstance._x = aDMStartingX[i];
NewDriveMaskInstance._y = YValue;
//Animate the Drive Mask
trace(aDMStartingX[i]); // traces 980 correctly
trace(aDMEndingX[i]); // traces 910 correctly
trace(aDMYards[i]); // traces 7 correctly
var tempdrivemask:Object = new Tween(NewDriveMaskInstance, "_x", null, aDMStartingX[i], aDMEndingX[i], aDMYards[i], false);
NewDriveLineInstance.setMask(tempdrivemask);
It's the second to last line (the one beginning "var tempdrivemask:Object . . ." that's not working, specifically, the three references to array values just after the null.
I've tried assigning the values of the array references to temporary variables and referencing the temp variables instead, but that didn't work, either.
It does work if I just hard code the numbers into the tween, and it also works if I declare temporary variables and assign them hard values.
It does not work if I declare temporary variables and assign them values by referencing the array values
Any ideas? Any help would be greatly appreciated. Fairly new at this stuff.
|