Actionscript 3.0 :: Creating Simple Component - Can't Get The Default Parameters "loaded" In The Class ?

Mar 18, 2010

I want to create a simple component in as3, cs4. There are 2 problems I cant solve:

1.)I can't get the default parameters "loaded" in the class for the component so lets say if I have w = 10 in the parameters how can I refer to it in the code?

2.) How can I get the tool with which I can set which corner of the component should stay the same : it looks like this in the default

flash button component
theLinesTool.png (11.82 KiB) Viewed 290 times

View 2 Replies


Similar Posts:


Flash :: Setting Default Parameters In A Class?

Apr 16, 2011

quick question:Is there a better way to do this?

public class ribbon extends Sprite {
private var fallAmount,taper;
public function ribbon(FallAmount=50,Taper=0.2){
fallAmount=FallAmount;
taper=Taper;
}

View 2 Replies

AS3 :: Class - Creating A Class With Multiple And Optional Parameters?

May 18, 2010

I'm creating a slideshow where each slide can have:- a video or a still- 1 audio track or many (up to 3)- 1 button or many (up to 3)I was thinking that each slide can be it's own object, and then I would pass the video, audio, buttons, etc., into it as parameters:

package
{
import flash.media.Video;

[code].....

View 2 Replies

ActionScript 3.0 :: Pass Parameters To A Function In Main Class From Loaded SWF?

Aug 15, 2011

I've got a main.as that loads SWF to the stage. the loaded SWF seppoused to pass a link to the main.as and trigger a javascript function to popUp that photo from that link.

I know there are two ways:
 
((root as MovieClip).parent.parent as Object).somefunction(parameters);
 
and to dispatch an event. inorder to pass parameters throug the event i need to extend it with another class.
 
isnt the (root as... )  more efficient if all i need is to pass a link?

View 7 Replies

ActionScript 3.0 :: Functions As Default Parameters?

Feb 11, 2009

I'm trying to set up some default parameters that are functions.

ActionScript Code:
public function makeButton(buttonUp:Function, buttonOver:Function = this.defaultButtonOver, buttonDown:Function = this.defaultButtonDown, buttonOut:Function = this.defaultButtonOut) {

[code].....

View 2 Replies

ActionScript 2.0 :: Set Default Values For The Parameters Of A Function?

Aug 12, 2010

How can I set default values for the parameters of a function in AS2? I am trying the common way but it doesn't work...

Code:
private function myFunction (param1:Number = 3,
param2:String = "a string",
param3:Boolean = false, etc ....):Void
{
....
}

View 2 Replies

Put Scroll Of Tree Component In Left Side Of Component Or Creating A Custom Scrollbar For Tree Component

May 20, 2009

is there any way to put scroll of tree component in left side of component or creating a custom scrollbar for tree component

View 13 Replies

ActionScript 3.0 :: Set A Default Value For A Class Parameter Of Type Class?

Feb 2, 2010

I'm working on an accordion component and I was thinking that it'd be cool if I could write a very basic one and then set it up so that it would be possible to pass in any kind of container class and child class so long as they subclassed a particular parent or implemented an interface (haven't really gotten that far yet).

What I've noticed though is that I can't setup a default class for my constructor parameter. For example I'd like to do this:

Code:
public function DropDownList(containerClass:Class = ContainerSprite, childClass:Class = ChildSprite)
However it gives me the following error:
1047: Parameter initializer unknown or is not a compile-time constant.

[Code]....

View 4 Replies

ActionScript 3.0 :: Accessing Function On Sub Class Via Default Class

Oct 6, 2010

I'm trying to do this,

Code:
Main.instance.subClassFunction();

instance is a public static variable on the default class, Main. I can do Main.instance.defaultClassFunction() with no problems at all, I use it to access functions and variables from within other classes. Is it possible to use this method to call a function on the subclass, currently I have to do this,

[Code]...

View 4 Replies

IDE :: What Is The Default Component Label Font

Jan 14, 2009

what the default label font that flash uses when you add a component? Ive searched around Im trying ti match it as it looks much better than other fonts?

View 3 Replies

ActionScript 2.0 :: Sound Muted As Default On FLV Component

Jan 9, 2009

I have a custom Flash Video Player and I have the play and mute button as controls. Currently my player has the sound on, I want to set it as muted by default.

This should also show my mutebutton as on as a visual cue. The only line of code I am using for the mute button is this

myVideo.muteButton = mute_btn; // which is just telling the flv component which button needs to act as the mute button

Using Flash CS3 , Actionscript 2.0

I got extremely two easy lines of code that I put in my action Frame 1 which fixed everything.

myVideo.volume = 0;
myVideo._uiMgr._isMuted = true;

myVideo is the name of my FLVPlayback component

View 8 Replies

AS3 :: Flash - Extending Default ScrollBar Component

Jun 24, 2010

I'd like to adjust the width of the default ScrollBar that appears inside of a Flash ComboBox. From my research on various forums, it seems like the best approach would be to subclass fl.controls.ScrollBar, which I've tried doing here:

package helpers {
import fl.controls.ScrollBar;
public class CustomScroller extends fl.controls.ScrollBar {

[Code].....

Then, in my library, I've taken the "ScrollBar" movie clip that appears upon initial creation of a ComboBox and changed the base class to "helpers.CustomScroller". I've got three ComboBox instances on the stage; however, none of them are showing anything but the default width, nor am I seeing the output from the trace() statement in my constructor.

View 2 Replies

Flex :: Default Sorting Within OLAPDataGrid Component

Oct 7, 2010

I'm trying to provide some default sorting within the OLAPDataGrid component in Flex. There appears to be a dataCompareFunction on OLAPAttribute, but nothing I do seems to actually trigger calls to that method. Any suggestions around using this method or any others to provide sorting of the dimensions on OLAPDataGrid?

View 2 Replies

Flex :: Passing Parameters To Component?

Apr 20, 2010

I've got 2 files, my Application and a custom component. In my component I have a httpservice and a string named _requestUrl that is bindable. The httpservice uses this.

<mx:HTTPService id="srv"
url="{_requestUrl}"
result="parseHttpResult(event)"

[Code].....

View 1 Replies

ActionScript 3.0 :: Setting Parameters Of A Component?

Mar 12, 2009

I'm trying to dynamically set some parameters of a component using AS3. The component has a parameter named "imagePath". I want to set this to a variable named "pathVar" This is where i'm at.

Code:
var pathVar
pathVar="images/folder1"
imagePath=pathVar

This clearly isn't working.

View 1 Replies

ActionScript 2.0 :: Custom Component Parameters?

Oct 4, 2010

I'm trying to figure out how to set a custom button component's parameters dynamically using actionscript. Can't seem to find any documentation on this. My custom button component has parameters named "Item ID", "Item Name", and "Item Price".

View 1 Replies

Actionscript 3.0 :: Creating Function With Optional Parameters

Jan 19, 2012

I want to create some functions similar to how GreenSock's tweening class works.With the optional parameters by name in brackets. {}[code]I get this error: "Parameter initializer unknown or is not a compile-time constant."Pretty sure it's the "Parameter initializer unknown", but I don't know what to do about it.

View 8 Replies

ActionScript 3.0 :: Make A Default Selection In A List Component?

Feb 27, 2011

I need that when the list appears is shows a selected cell, I tried this but didnīt worked: list.isItemSelected(0)=true;

View 1 Replies

Flex :: Fcreate HBox Component With Default Values

Dec 7, 2009

I want to create an HBox component; for example HLBox that behaves exactly like an HBox but has as default width and height 100%.

View 1 Replies

IDE :: Toggle On/off A Checkbox Component With ENTER Instead Of The Default SPACEBAR?

Jun 17, 2009

how do i toggle on/off a checkbox component with ENTER instead of the default SPACEBAR? so ENTER key is the key to toggle..

View 2 Replies

ActionScript 3.0 :: Adding Component Parameters / Properties?

Feb 17, 2009

I've exhausted searches looking for how to add properties to the component properties panel for a custom AS2 and AS3 components.This Adobe Livedoc suggests using Inspectable tags before variables:[URL]I've also tried adding the components via the Component Definition dialog in the library.Both methods work in that they produce an .swc, but neither adds the properties into the Component Properties.

View 1 Replies

ActionScript 2.0 :: Custom Component And Parameters(inspectable)?

Nov 19, 2007

I have made a SWC that works as it should but im trying to add in a userdefined parameter

Code:
class blah{
var myparameter

[code]....

View 1 Replies

Actionscript 3 :: Setting A Default Skin For A Custom Component In Flex 4?

Aug 18, 2010

How do you set the default value of skinClass for a custom component in Flex? I've extended the DropDownList with my custom component, but I would like to specify a default skin to go with it instead of always setting the skinClass value for each instance.

View 1 Replies

Actionscript 3 :: Select Multiple Items As Default In List Component?

Feb 3, 2012

I set my list to allow multiple selection. But when I load data in my list, I want to set a few items as selected. Normally you can set only one item selected by using list.selectedIndex. It only accepts int. How can I set multiple items as selected?

View 2 Replies

ActionScript 2.0 :: Set A Default Date (day Month Year) To A DateField Component?

Sep 3, 2010

how can I set a default date (day month year) to a dateField component?

I want to load date from a xml file, and show it on the component, and ofcourse, let the user change it...

View 2 Replies

ActionScript 2.0 :: FLVPlayback - Setting Path In Component Parameters

Oct 4, 2011

I have a video which has an flvplayback inside. I have been using it for others flv. But with these 3 flv, when I set the path in the component parameters, flash shuts down. I have used aftereffects, media encoder to convert them from mov and avi to flv.

View 0 Replies

ActionScript 1/2 :: Passing Video Into Flv Playback Component With Extra Parameters?

Mar 9, 2010

I've been given a video url that I want to pull into an the flvplayback component. The url for the video I've been given is:The problem is when I set the contentPath with the above url the component won't load the video with the extra parameters ?var_log=102|441100001-1|- added as it says the path must end with .flvI am asumming that the video provider needs this extra var/parameter to be called in order to track the number of video requests, in which case I will need to keep this in.

View 2 Replies

Flex :: Send Parameters From A Component To Main MXML Application

Aug 8, 2011

I would like to send variables or parameters from Component to Main (MXML) Application. Like my component is FileUpload.mxml and would like to forward the uploaded file details from FileUpload.mxml to Main.mxml.

I tried the following procedure :

com:FileUpload id="fp"

to get the reference for the FileUpload component, however, I am unable to get the variables from the FileUpload.mxml file.

View 1 Replies

Flash :: Creating Varying Number Of Parameters In An Object By Dynamically Assigning Their Name?

Aug 4, 2011

How would I write a procedure that would build this array such that I could choose as many parameter names such as KBP? I wanted?

public var expenses:ArrayCollection = new ArrayCollection([
{Impact:"A", KBP1:1, KBP2:0, KBP3:0, KBP4:0 },
{Impact:"B", KBP1:0, KBP2:0, KBP3:0, KBP4:0 },
{Impact:"C", KBP1:0, KBP2:2, KBP3:3, KBP4:0 },
[Code]....

View 2 Replies

Asp.net :: Creating A Static Drawing Whose Dimensions Get Changed Based On Parameters Supplied

Jan 20, 2012

I want to create an static drawing (say any animals like giraffe) using some points, lines, drawing etc. Now i want to update the drawing by passing the parameters say height of his legs, its width or its color.The parameters are supplied from the web page. The image will be a 2D image.I am searching on which technology should i implement this for more than 10 hours but cannot find any perfect solution.Right now i am thinking i can use Adobe flash in which i can do some programming to create an drawing and change the drawing by passing the parameters to a Flash file, i think we can pass it when we embed an flv.

View 2 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved