See Related Forum Messages: Follow the Links Below to View Complete Thread
Detect Object Type
How can I detect the object type of an object referenced by a variable? I would like write a function to pass in "myVar" and have it return "listbox."
Thanks,
Rachel
Detect Browser Type From Within Flash?
Is there a way to detect the browser type (IE vs. Gecko) from within Flash? Do I use JavaScript to determine support for object and embed tags and then pass it back to Flash or is there a way within with ActionScript that will determine which browser the swf is playing in? (plugin type vs. Active X object perhaps?)
Fancy Box Type Moving Graphic Type Cool Efect But Im To Dumb Type Thingy
i am tring to make a box thinky simaler to the one on www.starvingeyes.com but cant even work out how to start it. is there anyone who can point me in the right direction or to a tutorial ?
the box has a graphic inside a grided box the sections of the graphic fade in and out as the mouse goes over them and displays random sections when the user is not moving the mouse over the box
i did find java tutorials for this effect but would much preffer it to come from flash as java is a bugger to get working on some machines
Any way thanks in advance for any help
Steven Green one_mad_punk@yahoo.co.uk
New To Components, Can I Detect If One Component Contains Another?
I've got a draggable pane on my main timeline. I've created an input text box which I have inserted into my draggable pane. I need to modify some of the script for the draggable pane so it can detect if it contains this text box. I'm not sure how to do this though. Anyone have any ideas? Thanks.
Can I Detect Clicks On The Calendar Component?
is it possible to detect when the user clicks the buttons built into the calendar component? for example, I want to know when they click the button to advance the calendar to the next or previous month.
How Can A Component Detect It's Own Index Change?
If I have a component (A) based on a Canvas container, and it's index changes due to another component (B) being added to the same parent container as component "A", how can I have component "A" listen for it's own change in index?
I have tried listening for the IndexChangedEvent.CHANGE but to no avail.
Manipulating Type Inside A Component
I am wondering if it is possible to manipulate type inside a component. I am using this component called tableMaker and they type comes in blurry. I would like to be able to apply leading and make the type anti-aliased for readability. Is that possible? Where should I look? The component does not have those as parameters, but I am wondering if there was a way to do it anyway.
Thanks a lot!
Component Type Resizing For Movieclips?
Ok so here's what I'm trying to do...
I want to have a movieclip that I can resize, but only certain parts will resize, kinda like how all the components in flash resize, if you were to resize a scrollbar or something, the scrollbar would stay the same, it would just have the actual bar that it lies on get bigger.
The reason i want to do this is so that i can dynamically resize stuff using actionscript without having to worry about things getting distorted.
so if you have any ideas or leads (I dont mind reading, just want some answers) then please post help or links to documents.
Thanks!
[F8] Cant Type Inside Text Input Component
Hey if you go to the contacts page on the link below youll notice you cant type in the form fields. Why isnt it working?
http://www.spaodesigns.com/Boardriders/
Also here is my .fla
http://www.spaodesigns.com/Boardriders/Contact.fla
Cant Type Inside Text Input Component
Hey if you go to the contacts page on the link below youll notice you cant type in the form fields. Why isnt it working?
http://www.spaodesigns.com/Boardriders/
Also here is my .fla
http://www.spaodesigns.com/Boardriders/Contact.fla
Difference Between Button Component And Creating A New Button Type
I'm using this sample code to send/receive data when a button is clicked. It works with a Button Component but not with a button I create. Any ideas while?
Code:
var submitListener:Object = new Object();
submitListener.click = function(evt:Object) {
var result_lv:LoadVars = new LoadVars();
result_lv.onLoad = function(success:Boolean) {
if (success) {
trace("content = "+result_lv.content);
} else {
trace("Error connecting to server.");
}
};
var send_lv:LoadVars = new LoadVars();
send_lv.file = "bios.html";
send_lv.sendAndLoad("http://[url]/press/content/talk_w_flash.php", result_lv, "POST");
};
mc_menu.submit_button.addEventListener("click", submitListener);
Thanks,
Pete
Antialias Type For Text In Text Area Component?
Can I set the anti alias type for text in a text area component? I have the components on the stage with the appropriate instance names related to those in the code. This code is what I have so far but I cant figure out a way to change the anti alias type for the text entered in the text area control:
Code:
var pformat:TextFormat = new TextFormat(new TrebuchetMS().fontName);
//var pformat:TextFormat = new TextFormat();
pformat.font = "Trebuchet MS";
pformat.size = 12;
name_txt.setStyle("embedFonts", true);
email_txt.setStyle("embedFonts", true);
message_txt.setStyle("embedFonts", true);
//message_txt.antiAliasType = AntiAliasType.ADVANCED;
name_txt.setStyle("textFormat", pformat); //text input
email_txt.setStyle("textFormat", pformat); //text input
message_txt.setStyle("textFormat", pformat); //text area
Implicit Coercion Of A Value Of Type String To An Unrelated Type Function
Hi there
Why I can't use an "eval" function (i am not sure this is the right terminology) inside addEventListener (I put in yellow) ?
for (i=1;i<10;i++) {
var constructFunction1:String;
var constructFunction2:String;
constructFunction1="choix3"+i+"Handler";
constructFunction2="choix3"+i+"HandlerClick";
MovieClip(this["choix"+i]).addEventListener(MouseEvent.MOUSE_OVER,constructFunction);
Then error in the compiler:
1067: Implicit coercion of a value of type String to an unrelated type Function.
Pixel/Bitmap Vs True Type/Open Type Fonts
I'm new to flash and I've been getting conflicting advice on which type of fonts to use. I've done several searches in the forms and I'm still just as puzzled so I've decided to start my own discussion on the subject. So here we go:
1) Are Pixel and bitmap fonts the same type of font?
2) Which is better to use True Type or Pixel (bitmap) fonts and where and/or why
Please help this newbie to flash and jump in with your opinion, experiences, etc.
Thanks
Making A String Type Into A Number Type
The title is probably misleading and because Im new to flash and coding this is probably a very simple problem. What I am trying to do is make a function in which I give the name of an instance, it adds the ._alpha and then have the function take the instance and have the instance go from being visible to invisible.
The following is the code that I have developed.
function dealpha(dename:Number):Void{
dealpha = (dename) ++ (._alpha);
for(i=0;i<100;i++){
dealpha -=1;};
};
dealpha(mc_mc);
The error that I get when I compile the file is this
Syntax error.
dealpha = (dename) ++ (._alpha);
Total ActionScript Errors: 1 Reported Errors: 1
I appreciate any help that I can get with this code.
Compile Type Check For Object Type
I used Flex Builder 3 to compile my actionscript. I have a question regarding the compile type check for type Object. I have set my compiler to strict mode, but it does not seem to detect this compile type error:
var o:Object = new Object();
o.foo(); //this should generate compile type error because foo() is not method inside Object, but flex builder is just silent.
But if I try this
var s:String = new String();
s.foo(); //flex build flag this as error
flex builder correctly detects the reference error.
I can't understand the reason for the different behavior for the Object type versus the String type. Can anyone help to explain the reason for this?
Thanks.
Speed Of My Button Component Versus Adobe Component
I've been happily creating my button component and things have been going well until I got to the point of creating the mouse down state.
I've modeled the structure of my components very similar to the Adobe supplied components, but I notice my component is not as attentive to mouse events as the Adobe components. I can click my mouse over one of my buttons fast enough that the button doesn't register the click.
But no matter how fast I click the Adobe button, it always registers the clip.
Is the speed difference the fact that my button doesn't use the Component shim? I plan to either use a shim or convert the component itself into a compiled clip, but for development purposes, I thought it best to reference the UIcomponent source.
I would appreciate your thoughts,
Thanks, Jennifer
AS3 Component Instantiation With Dynamic Variable Component File Name
Hello! I am passing some variables from my server to a Flex application. One of these is the name of an MXML component that will be opened in a pop up. Since I am doing this dynamically is there a way to set up an AS3 variable so that say (in pseudocode):
ActionScript Code:
// serverSideVariables['mxml_component'] = "Dialog"
var myClassNameVar:String = serverSideVariables['mxml_component'];
// then I want to do something like this:
// in static code this would look like: var myClassToInstantiante:Dialog = new Dialog();
var myClassToInstantiante:myClassName = new myClassName();
Is this possible?? Thanks!
Checkbox Component To Toggle ComboBox Component
I've got a script that dynamically generates a grid of checkboxes and combo boxes. I'm trying write a handler to toggle the Combo boxes on or off when a user clicks on the corresponding checkbox. To do this, I add a property called "bound_to" when duplicating the checkboxes. The "bound_to" property contains the instance name of the combo box that I want the checkbox to control. So here's my onChange handler:
Code:
function toggleComboBox(component) {
trace(component._name+" has been selected ");
trace("bound to "+ eval(component.bound_to));
if (eval(component.bound_to).getEnabled == true) {
trace("enabled must be true for the target");
eval(component.bound_to).setEnabled(false);
} else {
trace("enabled is false for the target");
eval(component.bound_to).setEnabled(true);
}
}
My trace actions show that the correct instance names are saved correctly and this function works to enable the combo boxes, but it won't disable them. The problem is with the IF statement I think. It always returns false so I can only toggle the combo boxes on, but not off again. Is my syntax wrong or am I doing this the wrong way?
Component Themes - Changing Button Component
I am creating a custom theme, or skin, for my components and I have figured out how to edit most pieces but the most used is the most elusive.
Does anyone know how to edit the look of the button when creating a new theme?
I am finding that you have to edit the ClassObject but Macromedia's help is very confusing, they talk aobut creating a button dynamically then about the ClassObject but don't put all the directions in one place.
Maybe someone knows a good tutorial
Thanks
Newbie Needs Component Help (Input Text Component)
Very easy i am sure.
I have a input text component on my stage. When it is CHANGED I want to move to the frame specified. IE 4 frames in target movie.
When I put 4 into the text box, I want my actionscript to go
x = this.text;
this.parent.targetswf.goToFrame(x);
x = "";
Only problem is I cant seem to use the on Change event? It says I need to use an InstanceName.AddListener. Can someone explain this to me as I couldn't find any help regarding this ?
Thanks
MCM
Changing The Color Of A Component Inside A Component?
I've been going over these docs
http://livedocs.adobe.com/flash/mx20...3.html#3148563
http://livedocs.adobe.com/flash/mx20...=00002960.html
http://livedocs.adobe.com/flash/mx20...=00002096.html
and I've been able to customize my List component like
mp3list.setStyle("color", 0xFFFFFF);
But I cannot get change the UIScrollBar or Button components. I've tried several things
Code:
_global.styles.mp3list.Button.setStyle("backgroundColor", 0x0000FF);
_global.styles.Button.setStyle("backgroundColor", 0x0000FF);
Nothing is working
Datefield Component And Combo List Component
Hello All,
Im creating a form for a booking system. When the user chooses the date and submits. The booking gets emailed to a specific address. Im using the datefield component and combolist component. in flash. I usually use PHP to push data from a text field and email. But i'm stuck here, because the datefield and combolist is not a text field. Can anyone please help me.
I wanna email the data from the fields to an email address. Im new in flash. Can anyone please help me.
Component Inspector For Custom Component Questions
Hi --
I am wondering if it is possible to make the component inspector somewhat
dynamic for use with a custom component. For example, I have a component
where the user can choose to have a value set automatically or the user can
have it set manually and enter a range for this value in two component
parameters. Is it possible to hide to parameters in the component inspector
when a third parameter is set to TRUE and to show those two when the third
is set to FALSE?
Thanks
Rich
Datefield Component And Combo List Component
Hello All,
Im creating a form for a booking system. When the user chooses the date and submits. The booking gets emailed to a specific address. Im using the datefield component and combolist component. in flash. I usually use PHP to push data from a text field and email. But i'm stuck here, because the datefield and combolist is not a text field. Can anyone please help me.
I wanna email the data from the fields to an email address. Im new in flash. Can anyone please help me.
Loading Component Inside Scrollpane Component
Hello,
Can anyone help me out in adding a scrollpane on to the screen through actionscript and after that adding any component inside the added scrollpane component.
Thanks in advance.
[Component] Targeting Flash 6 ScrollPane Component
Hey All,
Been a while... hopefully somebody can provide some insight into what I am missing here.
I have a Flash 6 ScrollPane - yes, I know it's old, but it is also easy to do custom skinning. I had data loading into it from the library by using createEmptyMovieClip and then attachMovie to grab an MC from the library.
This all worked fine until I had to place the ScrollPane into a MC in the library, dynamically attach it to the stage and then assign the content. Now I can only get my content MC to display on top of the ScrollPane, not in it. Here is a sample:
ActionScript Code:
function showPop(popType) {
popContainer = _root.createEmptyMovieClip("popWindow_mc", 350);
popWindow = popContainer.attachMovie("pop", "pop_mc", 1);
popWindow.pop_sp.boundingBox_mc._visible = false;
popScrollClip = popWindow.createEmptyMovieClip("scrollClip_mc", 400);
popScrollContent = popScrollClip.attachMovie("scrollMC_disclaimer", "scrollContent_mc", 1);
popWindow.pop_sp.setScrollContent(popScrollClip);
};
"pop" is the linkage name of the MC that contains the ScrollPane and "scrollMC_disclaimer" is the linkage name of the MC that is the content to be scrolled.
Any ideas as to what I am missing? Any help is greatly appreciated. Thanks in advance!
To Detect Or Not
Here's my dilemma. I want to start a MC once another moving MC reaches a certain position. I tried detecting the _y position of the moving MC through a button action. (press button, if (_y > 20) goto) Simple right? Well, it doesn't work. Now I'm wondering if it doesn't work because the action is attached to a button. Or if I should use collision detection. Any advise from all those flash guru's out there on the best way to do this.
I'm willing to send out the fla if necessary.
-Casper
How To Detect The
Speed = ( _level0.getBytesLoaded()/ 1024 ) / (getTimer() / 1000)
isn't working or not showing the correct speed
How To Detect
HI everyone,
I have made a form and wann to check valid data i.e if alpanumeric value is req. user cannot enter numeric value and vice versa. I found no inbuilt fn. in flash which could detect whther the entered value is string or numeric.Now how should i check this ..pls. help
MX Detect
How are you detecting MX player. Is their a componet that I just didn't see at MM site.
Detect Key
Hello,
i have a menu with 3 options: "1", "2", "3".
i want to detect when key 1, 2 or 3 is pressed. When it's pressed i want variable Answer to be equal to the pressed key. If another key is pressed so it will keep waiting for a valid answer.
Thanks,
Miguel
Key Detect
Hello,
i have this code to check if the Key 1 is Pressed:
Key.addListener(Key);
Key.onKeyDown = function(){
var dwn = String.fromCharCode(this.getAscii());
if (dwn.length) this.broadcastMessage("onKey"+dwn+"Down");
}
Key.onKeyUp = function(){
var up = String.fromCharCode(this.getAscii());
if (up.length) this.broadcastMessage("onKey"+up+"Up");
}
Key.addListener(this);
this.onKey1Down = function(){
trace("1");
}
However i also wanted to make it work with keys such as Enter, Esc and Space. Can somebody tell me how can i that using this code?
Thanks,
Miguel
Key Detect
Hello,
i have the following code to detect if the keys 1, 2, 3, Enter, Space and Escape are pressed:
keyListener = new Object();
keyListener.onKeyDown = function() {
if (Key.getCode() == Key.SPACE) {
trace("SPACE");
} else if (Key.getCode() == Key.ENTER) {
trace("ENTER");
} else if (Key.getCode() == Key.ESCAPE) {
trace("ESCAPE");
} else if (Key.getCode() == 49) {
trace("1");
} else if (Key.getCode() == 50) {
trace("2");
} else if (Key.getCode() == 51) {
trace("3");
}
};
Key.addListener(KeyListener);
Everything works fine, except the ENTER and ESCAPE key.
Could u help me? Why the code doesn't work with these 2 keys?
Thanks,
Miguel
Detect Help Please...
I saved this-
Quote:
<j,hvj,vSCRIPT LANGUAGE=JavaScript1.1>
<!--
var MM_contentVersion = 6;
var plugin = (navigator.mimeTypes && navigator.mimeTypes["application/x-shockwave-flash"]) ? navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin : 0;
if ( plugin ) {
var words = navigator.plugins["Shockwave Flash"].description.split(" ");
for (var i = 0; i < words.length; ++i)
{
if (isNaN(parseInt(words[i])))
continue;
var MM_PluginVersion = words[i];
}
var MM_FlashCanPlay = MM_PluginVersion >= MM_contentVersion;
}
else if (navigator.userAgent && navigator.userAgent.indexOf("MSIE")>=0
&& (navigator.appVersion.indexOf("Win") != -1)) {
document.write('<SCR' + 'IPT LANGUAGE=VBScript>
'); //FS hide this from IE4.5 Mac by splitting the tag
document.write('on error resume next
');
document.write('MM_FlashCanPlay = ( IsObject(CreateObject("ShockwaveFlash.ShockwaveFla sh." & MM_contentVersion)))
');
document.write('</SCR' + 'IPT>
');
}
if ( MM_FlashCanPlay ) {
window.location.replace("http://www.MYFLASHURL.htm");
} else{
window.location.replace("http://www.MYNONFLASHURL.htm");
}
//-->
</SCRIPT khglgh>
...ok I copied and pasted that in word processor and put my URLS in, then saved it as an HTML file and opened it in my windows explorer, and all it showed was the writing that is the whole file HELP
First Run Detect
I have a program that is a presentation with two parts an intro and the content. The client wants to be able not to show a skip intro button until the user has sat thru it once. Is this possible? Can someone send me some code samples? I am a dabbler not an expert and have a very basic knowledge of actionscript.
Thanks
P
Detect Swf Name
Is there a way for a swf file to detect its name?
I'm building an XML loading Flash program. I want to instruct the users to name their XML file the same thing they name the SWF files.
When the SWF file loads the XML it should look to see what its name is then load an XML file with the same name.xml
Make sense? Can it be done?
Thanks.
_t
Detect URL
What I'm trying to do is detect the url I am currently at and load an external image depending on that.
This is how I'm loading the image:
container.loadMovie("images/1.jpg");
And what I want I'm trying to figure out is:
if url == XX.pp
- container.loadMovie("images/1.jpg");
elseif
container.loadMovie("images/2.jpg");
any idea?
Detect FLV End?
I have an FLV playback component, how can I detect in AS3 when the video is finished playing?
Detect URL
I know how to get the URL (Movie.url) of the swf in question, but my question is: how to get the main URL if the swf is inside an iFrame or frame.
I know how to use javascript to get the parent window URL, but I have to do this without javascript.
Thanks.
PDF Detect
Hi,
I want to link a button for a PDF document, in a CD project.
1. Should I use 'getURL' ?? or anyother different command. The 'getURL' doesn't work
2. What is the code for detecting, if PDF is present in the users computer, else it should install from the CD (assuming, I give the Acrobat Reader in the CD)
Thanks
Nice Day!!
Detect Url
is that any way to detect a url for a flash swf start in a diferent frame....
i mean i“ve got a flash inside a html, if the url is http://www.something.com/index.htm to start in frame called home. (just with actionscript)
thank“s very much
Alex
Detect When Not On Swf
I need some information here please.
I have created a slider bar to select a scene to play. The scene selection works fine, however I noticed the following scenario. If the user clicks and drags the selector and drags the mouse off of the swf area (does not matter if they release the button or not) )and then moves back into the swf area the slider will continue to follow the mouse and the user must click to reactivate the settings. So the question is how exactly do I detect when either A. the user leaves the swf area or B. Enters into the swf area (but not have this continuously firing off)?
|