undefined method rotatedGradientMatrix?
I don't understand what I'm doing wrong. I have a UIComponent and wanted to create a roundRect using a rotatedGradientMatrix. According to the documentation, there should be a horizontal, vertical gradient, rotation matrix. For some reason, I get an error:
1180: call to a method may be undefined rotatedGradientMatrix.
HM...
UIComponent not a sub-class of ProgrammaticSkin... so not.
Click Show methods inherited in docs and you will see all the methods and properties. This method is protected by ProgrammaticSkin.
Tags: Flex
Similar Questions
-
1180: call to undefined method possible
Hello
I'm coding in Flash CS4. I have a movie flv on the timeline, with a few different AS3 commands to stop. I want to be able to click on the button "continue_mc" and move to a structure later in film_mc (the mc with the FLV on the timeline). However, I get the error "1180: call to undefined method possible film_mc" I have the instance of the mc marked with 'film_mc' and the actual flv itself is called something different, so there is no confusion there. Any idea what is the problem?
While I am - is it better to say "film_mc (905)" or "film_mc.currentFrame = 905"(si je dis film_mc.currentFrame = 905, j'obtiens une erreur 1059 disant que la propriété est en lecture seule-alors peut-être mon problème est avec le fichier flv?) ".
Thanks for your help.
This is my code:
import flash.events.Event;
hallScene_mc.visible = false;
officeScene_mc.visible = false;
doorScene_mc.visible = false;
function interactiveScene(e:Event):void {}
if (film_mc (905)) {}
hallScene_mc.visible = true;
}
if (film_mc (1736)) {}
officeScene_mc.visible = true;
}
if (film_mc (1928)) {}
doorScene_mc.visible = true;
}
}
continue_mc.addEventListener (MouseEvent.CLICK, continueFilm);
function continueFilm(e:MouseEvent):void {}
if (hallScene_mc.visible = true) {}
film_mc.gotoAndPlay (906);
}
if (officeScene_mc.visible = true) {}
film_mc.gotoAndPlay (1773);
}
if (doorScene_mc.visible = true) {}
film_mc.gotoAndPlay (1929);
}
}
Hi again...
If (hallScene_mc.visible = true)
{
film_mc.gotoAndPlay (906);
}
You are wrong here: Watch how you do your test. The above code is trying to "assign" the Boolean 'true' to
visible... This is the correct way:
If (hallScene_mc. Visible is true)
{
film_mc.gotoAndPlay (906);
}
And here we are again:
function interactiveScene(e:Event):void {}
If (film_mc (905)) {}
hallScene_mc.visible = true;
}
Correct way:
function InteractiveScene(e:Event):void
{
if(film_mc.currentFrame == 905)
{
hallScene_mc.visible = true;
}
}
If you want to compare two values, use "is".
Use '=' to assign values...
Best regards
Peter
-
Hello
Recently I had to replace my computer with a new one. Always running on XP, I got the old primary HDD as secondary in the new. MEASURE with WAMP worked very well in the earlier version of the system where as with the variation on I entered a series of questions.
Here are the details of the version:
The old Wamp version details:
Wamp2.0
phpMyAdmin2.11.6
apache2.2.8
PHP5.2.6
A new:
Wamp2.0
phpmyadmin3.2.0.1
Apache2.2.11
PHP5.3.0MEASURE - 1.0.1.
Now all my previous MEASURE used files as well as the new shows the error:
Fatal error: Call to undefined method tNG_fields::tNG_fields() in C:\wamp\www\quote\includes\tng\tNG_insert.class.php on line 30
I checked the configuration of PHP and extensions in comparison to the former. They seems to be okay.
No idea what caused this chaos?
Thank you
Jay
I had exactly the same problem, has nothing to do with your appz that have to do with the new version of php 5.3, I did a test where I have installed two versions of php 5.3 and 5.2.9 when I switched to 5.2.9 it worked as soon I went to 5.3 I got the error, what looks like uninstall is not compatiable with 5.3 or more.
-
1180: call to a possibly undefined method... Perhaps?
I have buttons, that when you click on the will to instantiate in one of 3 video clips in a clip.
For example, it works fine:
b_IF_4G5_TOP.addEventListener (MouseEvent.CLICK, b_IF_4G5_TOP_add);
function b_IF_4G5_TOP_add(event:MouseEvent):void
{
var b:MovieClip = new IF_4G5_TOP();
b.Name = "IF_4G5_TOP";
layout.substrate.addChild (b);
}
but this is not:
p_conn_h.addEventListener (MouseEvent.CLICK, p_conn_h_add);
function p_conn_h_add(event:MouseEvent):void
{
var b:MovieClip = new PC_H(); <-this line generates this error: 1180: call to a method may be undefined PC_H.
b.Name = "p_conn";
layout.connectors.addChild (b);
}
Which is strange, because as you can see in the first example, I did not 'define' var b:MovieClip = new IF_4G5_TOP();
The two objects exist in the library, film clips, both targets and objects are named instruments and exists.
Am I missing something obvious? Thanks in advance for your help.
Check the name of movieclip PC_H gave as the name of the link, if yes, then check you gave no name for the same movieclip instance. If so remove the name of the instance.
or try to change the name of movieclip,
var b:MovieClip = new PC_H();
-
GotoSlide WidgetFactory undefined method?
I'm building a widget using the factory API 5.0 widget.
I call "gotoSlide (5);" and get:
1180: call to a method may be undefined gotoSlide
I have widgetfactory import. StaticWidget and it shows the method in blue (code indicators), but does not compile without error.
I tried inside a conditional statement (if that) (isCaptivat5), but still will not compile without error and accidents widget in Captivate.
Is there some other issue I'm dominant?
Hi merobertsjr,
The gotoSlide() method has been added to WidgetFactory until version 5.1 (the one just after 5.0).
Do you think you can download the latest version, set up, and then see if that solved the problem?
Here is the download link: http://code.google.com/p/widgetfactory/downloads/list
-
'Play' and «prevFrame» undefined methods
After having cleaned my project by launching another project and import files in there, I get the following errors:
The path location type Resource Description
1061: call to a method maybe not defined play through a reference with static type flash.display:DisplayObject. COMITwBT.mxml/COMITwBT/src/line 55 Flex problemAlso
.. prevFrame-method .undefined...Where am I wrong?
Thank you.
The object is of type a DisplayObject and not a MovieClip
-
undefined method addEventlistener
ERROR ON LINE 10 AND 11
1061: call to a method may be undefined
addEventlistener through a reference with static
type FunButton.
package
{
import flash.display.MovieClip;
import flash.events.MouseEvent;
/public class FunButton extends MovieClip
{
public void FunButton)
{
this.addEventlistener (MouseEvent.ROLL_OVER, grow);
this.addEventlistener (MouseEvent.ROLL_OUT, shrink);
}
private function grow (event: MouseEvent): void
{
this.scaleX = 1.5;
this.scaleY = 1.5;
}
private function shrink (event: MouseEvent): void
{
this.scaleX = 1;
this.scaleY = 1;
}
}
}
use:
addEventListener
-
I'm new to the class files, so I need a basic example/explanation.
I have a main.mxml file, and my class load just a list at startup.
Now, I want to change status with a radiobuttongroup so that my list will display the optional data. I understood the basics of the radioButtonGroupand how it works.
How do I instantiate the radioButtonGroup so that I can use it?
Here's what the code looks like in the main.mxml:
<! [CDATA]
import classes. OpenDBAsync;
import mx.controls.Alert;
myDB:File private var;
[Bindable]
myDBclass:OpenDBAsync private var;
private function init (): void
{
myDBclass = new OpenDBAsync();
}
protected function modeSelectRBG_changeHandler(event:Event):void
{
If (modeSelectRBG.selectedValue is "authorState")
{
OpenDBAsync.authorStateLoadAuthors ();
} else {
OpenDBAsync.titleStateLoadTitles ();
}
}
]]>
I get error 1061: call to a method may not set %s through a reference with static type class.
Thank you
Kristin
You must use the name of the instance to call the methods of the class
myDBclass.authorStateLoadAuthors ();
and
myDBclass.titleStateLoadTitles ();
You can only use the class name when calling static methods
-
tests from ant: undefined method runWithFlexUnit4Runner?
Hi all!
I am trying to automate the AIR tests that work successfully via Adobe Flash Builder 4.
I get the following error:
Error: Call to a runWithFlexUnit4Runner method maybe not defined through a reference with static type flexunit.flexui:FlexUnitTestRunnerUI.
[mxmlc]
[mxmlc] testRunner.runWithFlexUnit4Runner (currentRunTestSuite (), "unit_tests");
When I run the tests from command line via: own package of the Ant - v.The part of the responsible build.xml that is:
<name ='test' target depends on"compile"> =
<!-run FlexUnit tests and publish reports->
<mxmlc
file ="${test.src.loc}/FlexUnitApplication.mxml"
output ="${bin.loc}/FlexUnitApplication.swf."
ActionScript-file-encoding ="UTF-8"
Keep-generated-actionscript ="true"
incremental ="false"
>
<load-config filename ="${FLEX_HOME}/frameworks/flex-config.xml"/ >
<source-path-element path ="${FLEX_HOME} / frameworks"/ >
<compile .source-path-element path ="${test.src.loc}"/ >
<compile .include-libraries = dir"${lib.loc}" append ="true">
<include name ="pb3dlib.swc" / >
<include name ='airframework.swc' / >
<include name ='airglobal.swc' / >
<include name ="airspark.swc" / >
<include name ="applicationupdater_ui3.swc" / >
<include name ="automation_airspark.swc" / >
<include name ="automation_spark.swc" / >
<include name ="flexunit_0.9.swc" / >
<include name ="flexunit-aircilistener - 4.1.0.swc ' / >
<include name ="flexunit-cilistener - 4.1.0.swc ' / >
<include name ="core-flexunit-flex - 4.0.0.2 - sdk3.5.0.12683.swc ' / >
<include name ="core-flexunit-flex - 4.1.0.swc ' / >
<include name ="flexunit-uilistener - 4.1.0.swc ' / >
<include name ="flexunitextended.swc" / >
<include name ="hamcrest - 1.0.2.swc ' / >
<include name ='spark.swc' / >
<include name ="utilities.swc" / >
<include name ="flexunit.swc" / >
<include name ="FlexUnitOptional.swc" / >
<include name ="FlexUnitTestRunner_rb.swc" / >
< / > compile .include-libraries
< /mxmlc>
What CFC should I include?
Thank you
Andreea-
Andreea,
Created by Flash Builder tests are fine, it's really just the main file of the application they create. They ship the source, so it is difficult to change it.
However, you can do something as in this example:
<>
"xmlns:MX ="http://www.adobe.com/2006/mxml"
creationComplete = "runMe ()" > "
Import compilationSuite.SuitesToRun;
Import org.flexunit.listeners.CIListener;
Import org.flexunit.runner.FlexUnitCore;
Import org.flexunit.runner.notification.async.XMLListener;
private var core: FlexUnitCore;
public function runMe (): void {}
base = new FlexUnitCore();
Put this line in if you want to write the XML code on the disk for use in reports or a CI Server
core.addListener (new CIListener());
Leaving it allows to display the results in Flash Builder, so if it is open
Otherwise, it will just fail and go. The name in quotes below is the name of your project
core.addListener (new XMLListener ("unit_tests"));
Finally transfer you want to run to the core.run () method. This could be the result of your currentRunTestSuite() of the
previous code that you pasted
Core.Run (compilationSuite.SuitesToRun);
}
]]>
-
Undefined Method?...
I am creating this program that allows a person to choose a way to display categories, or by level or by alphabetical order and for some reason I'm any
We get an error with my percentageToLevel method. Here is the code:
Declare variables for use of the main class
var typeIn:String;
var type: int;Add a mouse listener to respond to a button click
enter_btn.addEventListener (MouseEvent.CLICK, onClick);To respond to button click function.
function onClick(event:MouseEvent):void {}
typeIn = typeIn_txt.text;
type = parseInt (typeIn);If (type == 1) {}
percentageToAlpha();
} Else if (type == 2) {}
percentageToLevel();
}
Percentage of conversion to Alpha function
function percentageToAlpha (): void {}var gradeIn:String;
Category: number var;
var alphaGrade:String;gradeIn = gradeIn_txt.text;
rank = Number (gradeIn);If {(grade < 50)
alphaGrade = 'F';
} else if ((grade > = 50) & & (grade < = 52)) {}
alphaGrade = "D -";
} else if ((grade > = 53) & & (grade < = 56)) {}
alphaGrade = "D";
} else if ((grade > = 57) & & (grade < = 59)) {}
alphaGrade = "D +";
} else if ((grade > = 60) & & (grade < = 62)) {}
alphaGrade = "C -";
} else if ((grade > = 63) & & (grade < = 66)) {}
alphaGrade = 'C ';
} else if ((grade > = 67) & & (grade < = 69)) {}
alphaGrade = "C +";
} else if ((grade > = 70) & & (grade < = 72)) {}
alphaGrade = 'B -';
} else if ((grade > = 73) & & (grade < = 76)) {}
alphaGrade = 'B ';.
} else if ((grade > = 77) & & (grade < = 79)) {}
alphaGrade = ' B + ';
} else if ((grade > = 80) & & (grade < = 84)) {}
alphaGrade = 'A-';
} else if ((grade > = 85) & & (grade < = 89)) {}
alphaGrade = "A";
} else if ((grade > = 90) & & (grade < = 100)) {}
alphaGrade = ' A + ';
} else {}
alphaGrade = ' error - invalid mark, try again! ';
}output_txt. Text = quality + "% ="+ alphaGrade; ".
Percentage of conversion to the level function
function percentageToLevel (): void {}var gradeIn:String;
Category: number var;
var levelGrade:String;gradeIn = gradeIn_txt.text;
rank = Number (gradeIn);If {(grade < 50)
levelGrade = 'R '.
} else if ((grade > = 50) & & (grade < = 52)) {}
levelGrade = "L1 -";
} else if ((grade > = 53) & & (grade < = 56)) {}
levelGrade = "L1";
} else if ((grade > = 57) & & (grade < = 59)) {}
levelGrade = "L1 +";
} else if ((grade > = 60) & & (grade < = 62)) {}
levelGrade = "L2 -";
} else if ((grade > = 63) & & (grade < = 66)) {}
levelGrade = 'L2 ';
} else if ((grade > = 67) & & (grade < = 69)) {}
levelGrade = ' L2 + ";
} else if ((grade > = 70) & & (grade < = 72)) {}
levelGrade = "L3 -";
} else if ((grade > = 73) & & (grade < = 76)) {}
levelGrade = "L3";
} else if ((grade > = 77) & & (grade < = 79)) {}
levelGrade = "L3 +";
} else if ((grade > = 80) & & (grade < = 84)) {}
levelGrade = "L4 -";
} else if ((grade > = 85) & & (grade < = 89)) {}
levelGrade = "L4;
} else if ((grade > = 90) & & (rank > = 100)) {}
levelGrade = ' L4 + ";
} else {}
levelGrade = ' error - invalid mark, try again! ';
}
output_txt. Text = quality + "% ="+ levelGrade; ".}
}
}If anyone can tell me what I need to fix it would be great, thanks!
Your code has nesting named functions... a bad practice that can lead to problems you encounter. If you just take each function and code separate entities that you should be fine... You could simplify all enormously but for now just make it work.
Declare variables for use of the main class
var typeIn:String;
var type: int;Add a mouse listener to respond to a button click
enter_btn.addEventListener (MouseEvent.CLICK, onClick);To respond to button click function.
function onClick(event:MouseEvent):void {}
typeIn = typeIn_txt.text;
type = parseInt (typeIn);If (type == 1) {}
percentageToAlpha();
} Else if (type == 2) {}
percentageToLevel();
}}
Percentage of conversion to Alpha function
function percentageToAlpha (): void {}var gradeIn:String;
Category: number var;
var alphaGrade:String;gradeIn = gradeIn_txt.text;
rank = Number (gradeIn);If (rank< 50)="">
alphaGrade = 'F';
} else if ((grade > = 50) & (grade)<=52))>=52))>
alphaGrade = "D -";
} else if ((grade > = 53) & (grade)<=56))>=56))>
alphaGrade = "D";
} else if ((grade > = 57) & (grade)<=59))>=59))>
alphaGrade = "D +";
} else if ((grade > = 60) & (grade)<=62))>=62))>
alphaGrade = "C -";
} else if ((grade > = 63) & (grade)<=66))>=66))>
alphaGrade = 'C ';
} else if ((grade > = 67) & (grade)<=69))>=69))>
alphaGrade = "C +";
} else if ((grade > = 70) & (grade)<=72))>=72))>
alphaGrade = 'B -';
} else if ((grade > = 73) & (grade)<=76))>=76))>
alphaGrade = 'B ';.
} else if ((grade > = 77) & (grade)<=79))>=79))>
alphaGrade = ' B + ';
} else if ((grade > = 80) & (grade)<=84))>=84))>
alphaGrade = 'A-';
} else if ((grade > = 85) & (grade)<=89))>=89))>
alphaGrade = "A";
} else if ((grade > = 90) & (grade)<=100))>=100))>
alphaGrade = ' A + ';
} else {}
alphaGrade = ' error - invalid mark, try again! ';
}output_txt. Text = quality + "% ="+ alphaGrade; ".
}
Percentage of conversion to the level function
function percentageToLevel (): void {}var gradeIn:String;
Category: number var;
var levelGrade:String;gradeIn = gradeIn_txt.text;
rank = Number (gradeIn);If (rank< 50)="">
levelGrade = 'R '.
} else if ((grade > = 50) & (grade)<=52))>=52))>
levelGrade = "L1 -";
} else if ((grade > = 53) & (grade)<=56))>=56))>
levelGrade = "L1";
} else if ((grade > = 57) & (grade)<=59))>=59))>
levelGrade = "L1 +";
} else if ((grade > = 60) & (grade)<=62))>=62))>
levelGrade = "L2 -";
} else if ((grade > = 63) & (grade)<=66))>=66))>
levelGrade = 'L2 ';
} else if ((grade > = 67) & (grade)<=69))>=69))>
levelGrade = ' L2 + ";
} else if ((grade > = 70) & (grade)<=72))>=72))>
levelGrade = "L3 -";
} else if ((grade > = 73) & (grade)<=76))>=76))>
levelGrade = "L3";
} else if ((grade > = 77) & (grade)<=79))>=79))>
levelGrade = "L3 +";
} else if ((grade > = 80) & (grade)<=84))>=84))>
levelGrade = "L4 -";
} else if ((grade > = 85) & (grade)<=89))>=89))>
levelGrade = "L4;
} ElseIf ((grade > = 90) & (rank > = 100)) {}
levelGrade = ' L4 + ";
} else {}
levelGrade = ' error - invalid mark, try again! ';
}
output_txt. Text = quality + "% ="+ levelGrade; ".}
-
error: undefined method in a class of static type
Hi I'm trying to do good to know OOP: using classes to separate game logic.
I have different classes. My Main.as asks the hero to return horizontally. This code is required to Hero.as
I'll post all the code but to highlight the areas concerned.
MAIN.as (code problem is highlighted resources - occurs down the end of this class)
package
{
import flash.display.MovieClip;
import flash.media.Sound;
import flash.media.SoundChannel;
import flash.events.MouseEvent;
import flash.display.Sprite;
import flash.events.Event;
SerializableAttribute public class Main extends Sprite
{
public var keyboard_input:Keys;
public var hero = new hero
private var energyHit:Boolean = false;
private var enemy: enemy = new Enemy();
private var myVect:Vector. < MovieClip > = new Vector. < MovieClip > (5, true);
private var tmpMc:MovieClip;
private var soundChannel:SoundChannel = new SoundChannel();
private var helicoperSound:Sound = new HelicopterSound();
public void Main()
{
addEventListener (Event.ADDED_TO_STAGE, init);
}
private void init(evt:Event=null):void
{
hero.scaleX =. 25;
hero.scaleY =. 25;
addChild (hero);
Hero.init ();
var keyboard_sprite = new Sprite();
addChild (keyboard_sprite);
keyboard_input = new Keys (keyboard_sprite);
Add enemies
for (var i: int = 0; i < 5; i ++)
{
enemy enemy new =
Enemy.x = Math.Random () * stage.stageWidth;
myVect [i] = enemy;
addChild (enemy);
enemy.cacheAsBitmap = true;
}
start the sound helicopter
soundChannel = helicoperSound.play (0,999);
stage.addEventListener (Event.ENTER_FRAME, on_enter_frame);
}
public void on_enter_frame(event:Event)
{
If (keyboard_input.is_left ())
{
Hero.apply_force (-1, 0);
Hero.flipHeroRight (hero);
}
If (keyboard_input.is_right ())
{
Hero.apply_force (1.0);
Hero.flipHeroRight (hero);
}
If (keyboard_input.is_up ())
{
Hero.apply_force (0, -1);
}
If (keyboard_input.is_down ())
{
Hero.apply_force (0,1);
}
Code of collisions;
If (wall.hitTestObject (hero))
{
trace ("hit");
Power.y = energy.y
this.addChild (food); Need a Boolean or he keeps hitting in the same canvas * /.
}
for (var i: int = 0; i < 5; i ++)
{
tmpMc = myVect [i];
tmpMc.y += 1;
If (tmpMc.hitTestObject (Hero))
{
trace ("hero shot");
}
}
}
public function endGame (): void
{
stage.removeEventListener (Event.ENTER_FRAME, on_enter_frame);
}
}
}
Class HERO.as (code problem highlighted at the bottom)
package
{
import flash.display.Sprite;
import flash.events.Event;
import flash.display.MovieClip;
SerializableAttribute public class Hero extends Sprite
{
private var x_speed:Number;
private var y_speed:Number;
private var power: Number;
private var friction: Number;
private var gravity: Number;
public void Hero()
{
addEventListener (Event.ENTER_FRAME, movement);
}
private void movement(e:Event)
{
x += x_speed;
y += y_speed;
rotation += x_speed; Gerry. Remove rotation on objects no ball.
y_speed += gravity;
x_speed * = friction;
y_speed * = friction;
No need to check for the edges of the screen here.
/ * If (> 500 x | x < 0 |) y > 400 | is < 0) {}
init();
}*/
}
public void apply_force (x_force, y_force)
{
x_speed += (x_force * power);
y_speed += (y_force * power);
}
public void init)
{
gravity = 0.1;
power = 0.66;
friction = 0.99;
x_speed = 0;
y_speed = 0;
x = 250;
y = 200;
}
public void flipHeroRight (mc)
{
mc.gotoAndStop (2);
}
public void flipHeroLeft (mc)
{
mc.gotoAndStop (1);
}
}
}
Shouldn't have: Hero.flipHeroRight (hero);
be: hero.flipHeroRight (hero);
Hero is a class, not an object. Hero is an instance of the class
-
error "call to a possibly undefined method '.
I worked my way through the tutorials in the book 'Flash game University' of Gary Rosenzweig. Working on the game's tutorial "paddle ball", I changed the name of the file in 'PaddleBall.fla' to 'MyPaddleBall.fla' and changed the .as file name and the definition of class as a result. After that, I get the error above when you call the initialization function ("startPaddleBall()" "") the target for the .as file is set correctly. I tried to use the original file to test it; It compiles fine as long as it's called "Paddle", but as soon as I change the name of "MyPaddleBall" (or something else), it breaks. I commented all the code and replaced it with an instruction trace inside the startPaddleBall() function to see if there was something else causing the problem, but I got the same result. When all the other features are removed, the file still works, but only when called "paddle".
Any help would be appreciated, thanks.
-Mark
What code you have in the fla to import the class? The PaddleBall.as file is referred to as the document of the file class (look at the properties panel)?
-
Calling methods of custom class?
Here's what I have:
src\MainApp.mxml src\components\engine\Posts.as
In Posts.as, there is a public service "addPost().
In the MainApp.mxml I specified:
import components.engine.Posts;
However when I try to use "addPost()' as a Manager for a button click, Flex says:
"1180: Call to a possibly undefined method addPost"
Can someone tell me why? Thanks in advance.
In this case that you need an instance of positions not statix function
-Sent from my Palm Pre
April 22, 2010 16:20, RandomReado <[email protected]> wrote:
I see what you mean. I just changed addPost() to:
public static void addPost(id:Number):void
{
}
Then in the click handler:
Posts.addPost (1)
It seemed to work. However, inside the method addPost is a call to the HTTPService and I have a result and error handler, both point to private methods insode the Posts.as file. When I applied the static method of the addPost() method, Flex says he could no longer see the Manager methods, all of which were two private. When I made them static error disappeared.
Do you know why this is?
-
Cannot access the itemrenderer methods
Hello guys, I have this custom with an element of rendering components
<mx:TileList xmlns:mx="http://www.adobe.com/2006/mxml" xmlns:mgs="componentes.*"> <mx:itemRenderer> <mx:Component> <mx:HBox xmlns:mx="http://www.adobe.com/2006/mxml" paddingBottom="0" paddingTop="0" width="100%"> <mx:Script> <![CDATA[ public function get cyclesValue():uint { return cycles.value; } public function set cyclesValue(repeat:uint):void { cycles.value=repeat; } ]]> </mx:Script> <mx:VBox width="225" verticalScrollPolicy="off" horizontalScrollPolicy="off"> <mx:Label text="Video: {data.nombreVideo}" /> <mx:Label text="Sonido: {data.nombreSonido}" /> </mx:VBox> <mx:VBox width="45" height="100%" horizontalAlign="center"> <mx:Label text="Repetir" fontFamily="Verdana" fontSize="10" fontWeight="bold"/> <mx:NumericStepper width="45" minimum="0" value="1" maxChars="2" maximum="99" id="cycles"/> </mx:VBox> </mx:HBox> </mx:Component> </mx:itemRenderer> </mx:TileList>
Arrises them problem when I want to call the methods within the component, my main actionscript, like this file:
private function up():void { var item:IListItemRenderer = playlist.indexToItemRenderer(playlist.selectedIndex); item.cyclesValue(item.cyclesValue()+1); } private function down():void { var item:IListItemRenderer = playlist.indexToItemRenderer(playlist.selectedIndex); item.cyclesValue(item.cyclesValue()-1); }
This arrises this error
1061: Call to a possibly undefined method cyclesValue through a reference with static type mx.controls.listClasses:IListItemRenderer
Any ideas on what I m doing wrong here?
Thank you very much!
You use the set for cyclesValue method incorrectly.
Try:
item.cyclesValue = miniaturas.getItemAt(playlist.selectedIndex).ciclos;
-
How to call a method of itemRenderer
Hello
I need to call a method when the click on an HBox in DataGrid. However, when I try to call the method on click Control HBox property, an error appears stating "call to a goToAlertTab possibly undefined method." I duly defined this method within the tag < mx:Script >. Here is the code example. Is someone can you please tell me what is the problem?
< mx:DataGridColumn headerText = "Alerts" dataField = "alert" >
< mx:itemRenderer >
< mx:Component >
< mx:HBox horizontalGap = "2" horizontalAlign = "center" click = "goToAlertTab ()" >
< mx:Canvas height = "100%" backgroundColor = "Red" alpha = "0.8".
Width = "{Data.Alert.Critical}" toolTip = "{" criticism:'+ data.alert.critical "}" > "
< mx:Label text = "" / >
< / mx:Canvas >
< mx:Canvas height = "100%" backgroundColor = "0xff6600" width = "{data.alert.error}" toolTip = "{'Error:'+ data .alert .error}" > "
< mx:Label text = "" / >
< / mx:Canvas >
< mx:Canvas height = "100%" backgroundColor = "Yellow" alpha = "0.8".
Width = "{Data.Alert.Warning}" toolTip = "{'Warning:'+ data .alert .warning}" > "
< mx:Label text = "" / >
< / mx:Canvas >
< / mx:HBox >
< / mx:Component >
< / mx:itemRenderer >
< / mx:DataGridColumn >It is obvious that it is very difficult to go throw your hierarhy to change tab, event dispatching easier.
It http://www.adobe.com/devnet/flex/articles/itemrenderers_pt1.html is a good example on the distribution of the itemRenderer events handling them.
Can be also useful that you can use to navigate through the application. Read the docs to learn more about them.
Maybe you are looking for
-
Hello, I am running Windows 10 64-bit Edition-Standard-Core family, previously windows 8.1 I could uninstall Beats by uninstalling the Realtek drivers, and then by reinstalling drivers realtek generic on their site, I was able to replace the Panel of
-
Satellite 4090XCDT - Compact Flash adapt
Could someone please explain to me how I could go about adding a card adapter compact flash to this computer instead of using the hard drive? I'm in the middle of an Amiga project with the same idea but the Toshiba puzzled me: I can count the 44 pins
-
Locate the Windows 7 product key
I sent my HP Pavilion laptop in for warranty repair last year my Windows product key sticker has been removed. I had a failure of hard drive once more and having to reinstall Windows. I have the 64-bit disk installed in the factory, but can not find
-
This has happened recently. I have no idea why.
-
'put in cartridge' with the warning light.
mp360 printer shows 'put in cartridge' with warning light. The cartridges are in. Will print once, then stop. Had the head cleaned and it printed fine nozzle boss, tried to print a page of the same alarm.