Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    Flash




Flex Tabbing In Flash Created Code



Hello everyone,I have an XML driven website template ive been coding for a few months in Flash, no timeline or library involved, its 100% pure Actionscript 3.0 classes.I wanted to add a shopping cart feature and realised this would be much better/easier coded within Flex, this plus Flex Builder is much better for coding Actionscript, i decided to convert it to a Flex project.Now, after 5 minutes i had everything working perfectly (so i thought..) by just creating a UIComponent, manualy creating a new instance of my document class, and adding it to the UIComponent in an addedToStage event handler.Like i said, everything works perfectly... appart from all my carefully coded keyboard navigation has gone! Pressing the TAB key just bypasses the entire swf and goes back to the browser, if however i add a flex control like a button, the TAB key gives me focus on that control and then when i press TAB it goes back out again as if the rest of the swf is not there.I've searched the forums and google for hours with no luck, any help is very much appreciated...



KirupaForum > Flash > ActionScript 3.0
Posted on: 11-21-2008, 01:44 PM


View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread

Using Flex Created Swc File In CS4
Hi,
I have a bunch of AS3 code that is in a Flex 3 SWC project. I would like to use some of these libraries in a Flash CS4 project. is this possible? If so how?

Flex URLLoader - Loading XML Created With PHP
in my flex app, i am gathering data to display from an XML file


Code:
private function loadXml():void {
var loader:URLLoader = new URLLoader();
loader.addEventListener(Event.COMPLETE, onXmlLoaded);
loader.load(new URLRequest("thefile.xml"));
}
this works just fine...but when I want the XML file to be generated through PHP (so changing the above file to thefile.php, it doesn't work anymore.

and the issue is not in my PHP code as it properly outputs in XML format.

im guessing URLRequest & URLLoader arent meant for dynamic XML files?
any thoughts?

thanks!

.net Created Webservice Call By Flex
Hello friends,
i am new in flex so tell me how the .net web service call in to flex.

Flex Compiled Code Within Flash Authoring
I've come up with a solution to use Flex (mxmlc) compiled code within the Flash Authoring environment.

If you're interested you can read more here:
http://labs.qi-ideas.com/2007/12/25/...e-within-flash

Yours, Sander

Flex Reconnect Flex To Debugger Flash Player
I upgraded my OS (OSX) and Flex seems to have lost its connection to the the Debugger version of my Flash Player. I don't see an easy way to re-establish the connection. I've already directed the OS to open all .swfs in the debugger version of the player.

How To Run Flex Code.
Can anybody please tell me how to code and run a flex code. I am completely new to this language. I am looking for a video chat application. is it possible to do it in flex. I have made text chat application in PHP and JSP but is it possible to add flex code for video chat to be embedded in it.

Please help me.

Mandar

[Flex/AS3] Code Best Practice
Hi all,

I have coded AS2 applications with FMX2004 earlier with Zinc and now wanted to try my hand at the shiny new Flex 2.0.1 and AS3 combination.

I am really not very confident in the approach I am using (or have seen others) to interfacing the view (mxml) with the model (AS3). I recently looked at ReviewTube by Joe Berkovitz and kinda confused by his approach.

In short for every component in his view mxml he would have a local <mx:Script> that would point to a singleton service instance that would do the actual work.


Code:
<mx:Button label="Register" click="register()"/>

Code:
<mx:Script>
<![CDATA[
import com.joeberkovitz.reviewtube.services.Components;

private function register():void
{
Components.instance.controller.register(usernameInput.text, passwordInput.text, emailInput.text,
descriptionInput.text);
}
I was more used to having an AS class extend MovieClip or other components and all controller actions happened in that AS which is much cleaner.

Here if the controller changes all mxml files also need to change. Is there any way that an MXML component can be directly linked to AS? More like:


Code:
<mx:Button id="linkedBtn" click="com.controller.ClickHandler.linkClicked()"/>
Would the linkClicked need to be a static method? Thats ok but while compiling the com.controller... gives me a compilation error.

Please advice.

Thanks,
Cruiser

Code Error With Flex ?
hi all

i have been trying to use flex 3 with flash CS3 in papervision but i had a problem why i don't know

the code :
Code:

package {
   import flash.display.Sprite;
   import flash.events.Event;
   
   import org.papervision3d.cameras.Camera3D;
   import org.papervision3d.materials.ColorMaterial;
   import org.papervision3d.objects.Plane;
   import org.papervision3d.scenes.Scene3D;

   public class asFlex extends Sprite
   {
      public function asFlex()
      {
         var sp:Sprite = new Sprite();
         this.addChild(sp);
         sp.x = stage.stageWidth * 0.5;
         sp.y = stage.stageHeight * 0.5;
         
         var scene:Scene3D = new Scene3D(sp);
         var camera:Camera3D = new Camera3D();
         var p:Plane = new Plane(new ColorMaterial(0x000000),200,200);
         scene.addChild(p);
         scene.renderCamera(camera);
         
         addEventListener(Event.ENTER_FRAME,go);
         
         private function go(e:Event):void{
            p.rotationY += 5;
         }
         
         }
      }
   }



i think i made it right but i have this error why i don't know !!!!!!!!!!!!!!
error :
Code:

1013: The private attribute may be used only on class property definitions.

this error goes when i delete the event listener and it's function

[Flex] Creating A Flash SWF And Using It In My Flex Project?
Hi there,

I recently got the demo for txeff and i was messing around with it. Quite cool, id consider a purchase but over 100 notes for some text effects is a scandal in my own meaningless opinion.

Anyways it had me wondering about something else. For example lets take a new Flash CS3 file containg a dynamic textField instance called "tF".

Is it possible to embed the SWF into a Flex project and dynamically populate the textFields propery?


Code:
[Embed(source="/assets/textFieldThing.swf")]
public var EmbeddedTextFieldThing:Class;

var myNewTextField:Sprite = new EmbeddedTextFieldThing() as Sprite;
//PS. Just wondered, can this be also done as Sprite(new EmbeddedTextFieldThing())? and what way is correct?

myNextTextField.tF.text = "I am trying to display this text in the embedded SWF".
addChild(myNewTextField);



This dont seem to work, it was worth a try though. Can anyone else give me some knowledge if this is possible or not. I find myself often using the API in flex when i could save alot of time in Flash IDE.

Cheers

[FLASH+FLEX] Call A Method In A Flex Swf From As3
Hello

here it is:
i have a flex file with methods inside and some as3 swf
The idea is to load the flex file in as3 swf, and when flex file is loaded, call a method from the flex file

here is the code process

Code:
var _loader:Loader = new Loader();
var flexAppli:URLRequest = new URLRequest("flexfile.swf");
_loader.contentLoaderInfo.addEventListener(Event.INIT, onLoadInit);
_loader.load(flexAppli);
and

Code:

private function onLoadInit(event:Event):void
{
var loader:Loader = Loader(event.target.loader);
var newSprite:MovieClip = new MovieClip();
newSprite.name = "LeFlexCharge";
newSprite.addChild(loader.content);
addChild(newSprite);
setChildIndex(newSprite, 0);
// here the method call
newSprite.mymethod(); //dont work
}
The problem is : when calling the mymethod from flex file, it does not work

So i did a trace on all elements in as3 file and i get an object like this
_MyFlexAppli_mx_managers_SystemManager

First question : What's this ?
Second Question : How to call my method ?

Thx for yr help
tofu

Code For UI Connector In Flex (Arrow)
Hi All,

I am searching code for UI connector in flex (Arrow), using this smart connector I want to connect dynamically two or more UI components (like Circle, Rectangle, etc...) if you know the any Library or code, please reply this post.

Thanks and Regards,
Pradeep Shinde

Flex Can You Spot The Error With This Code?
This one caught me off guard. Here I was, happily coding a wrapper for a little animated gif handler, and I got nailed by this. I spent about 20 minutes trying to figure out what was going on. I'm sure you guys will spot it instantly. The error message was no help at all.

main.as
ActionScript Code:
package
{
import flash.display.Sprite;

import gif.Gif;

[SWF(frameRate="63")]
public class main extends Sprite
{
public function main():void
{
var gif:Gif = new Gif();
stage.addChild(gif);
gif.play();
}
}
}



gif/Gif.as
ActionScript Code:
package gif
{
import flash.display.Sprite;

public class Gif extends Sprite
{
public function Gif():void
{
graphics.beginFill(0xFFFFFF);
graphics.drawRect(0, 0, 50, 50);
graphics.endFill();
}

public function play():void
{
//
}
}
}



And the error message from the flex compiler..

Code:
C:flexdevelopmentugtestmain.as(14): col: 8 Error: Call to a possibly undefined method play.

gif.play();
^

Code On MC's Created With CreateEmptyMovieClip
Is there any way to put code on an mc created with createEmptyMovieClip?

Embedding Assets In Flex W/ Custom Classes -> No Timeline Code?
Hi,

I am embedding assets from a library by putting the embed tag right in front of my class definition. That way I can publish from flex and still have the graphics etc. that I create in the library.

However, timeline code in those assets is ignored (even simple stops).

Does anyone know if there is a solution to this problem?


ActionScript Code:
[Embed(source="../assets/swf/Library.swf", symbol="com.blablabla.TellAFriendBox")]
    public class TellAFriendBox extends MovieClip

Any help is appreciated.

jt

Add A User Created Symbol With Code?
I'm sure it's easy but can't do it. Please help.

Thanks.

***ahhhhh, found it. Spoke to soon.

XML Code Not Parsing In Dynamically Created Textfield
Hi all

I've scoured the net looking for a solution to this but no luck so far even though I'm sure I'm just overlooking something small.

Basically I've built a XML driven news page. The xml has been marked up with HTML. When I pull the nodevalue into the dynamically generated textfield the HTML info isn't being rendered.

The inclusion or exclusion of a UIscrollbar component seems to have no influence.

any ideas?

here's the text code. You can also see the attached zip which contains a fla and the XML

ActionScript Code:
case "entrytext" :
                    var t = mc.createTextField("input_txt", mc.getNextHighestDepth(), 0, newsStartYPos+40, newsWidth, 170);
                    t._x =(i *moviesSpacing)+spaceBetweenNews;
                    t.border = false;
                    t.wordWrap = true;
                    t.embedFonts = true;
                    t.html = true;
                    t.htmlText = iChild.firstChild.nodeValue;
                    trace(iChild.firstChild.nodeValue);
                    t.setTextFormat(my_fmt);
                    var k = mc.createClassObject(mx.controls.UIScrollBar, "my_sb"+i, mc.getNextHighestDepth());
                    k.setScrollTarget(t);
                    k.setSize(16, t._height);
                    k.move(t._x + t._width, t._y);

Applying Code To Dynamically Created Mc's Onthefly
I'm wondering if there is a way to apply a set of actionscript to a new dynamically created movieclip, as if the movieclip had actionscript written on it, i.e.


ActionScript Code:
on(rollOver)
{
     do stuff;
}
on(rollOut)
{
     do more stuff;
}


So I'd like that script to be applied to the newly created mc. Is this possible?

[MX04] Simple Code, But In Which Order Are Objects Created ?
Hi,

I have a really simple example but as simple as it is, it does not work (I am using MX 2004).

I create a movie clip in the library. It has got two layers:
1. a small black square, initially 10x10
2. an action layer with the following code:

Code:
stop();

function setHeight(h:Number)
{
trace("setHeight");
this._height = h;
}

function setWidth(w:Number)
{
trace("setWidth");
this._width = w;
}
I dragged the movie clip on the stage and named it blackSquareMC.
The following code works fine:

Code:
_level0.blackSquareMC._width = 100;
while this does not have any effect:

Code:
_level0.blackSquareMC.setWidth(100);
It seems the function is never called. I suspect it is due to how objects are created in Flash.

Could anyone help me with the basis, please ?
Many thanks,
Kz.

How Do I Remove Dynamically Created Movie Clips From The Stage Using Code
Hi,

I have some code that generates thumbnails based on a variable called maxThumbnail. The problem I am having is that once the thumbnails are created, i cannot remove them so the code can run again to create a new set of thumnails in the same place.

Heres the code

for (var i = 1; i <= maxThumbnail; i++)
{
newThumbnail = this.attachMovie ("thumbnail", "thumb" + i, i);
}

My current solution is to add an empty keyframe after the frame where the holding movie clip is. I then just play the timeline to remove and reload the holding movie clip. Is there a way of doing this dynamically. I would imagine it would be something along the lines of

removeMovieClip(_root.thumbailholder)
loadMovieClip(_root.thumbailholder)

Problem Embedding Fonts In Dynamically-created (code-only) TextField
I've done some other AS3 code-only text fields before, but I think I'm missing something here. With the code shown below, my text shows up, and seems to have the right font embedded in it, but when I uncomment the line that sets the embedFonts property of the TextField to true, all the text disappears. Here's the code section (constructor function) where it happens:


Code:
public function Pflio() {
txt1.color = 0xFFFFFF;
txt2.color = 0xFFFFFF;
txt3.color = 0xFF0000;
txt1.size = txt2.size = txt3.size = _typeSize;
txt1.font = 'Myriad Pro Bold';

for (var i = 0; i < 9; i++) {
grid[i] = new TextField();
//grid[i].embedFonts = true;
grid[i].defaultTextFormat = txt1;
grid[i].text = chars[i];
grid[i].width = 50;
grid[i].height = 50;
grid[i].selectable = false;
addChild(grid[i]);
}
}


I've embedded the font with the Class name 'MyriadProBold,' and there's more code to import packages, declare class properties, set up the TextFormat object, etc., but hopefully what's shown above will let you spot what's wrong, if anything.

Tabbing In Flash 5
just had a response for flash mx, but for some rubbish reason i need it to be flash 5 (sorry everyone)
so what was it.....
Im trying to build a form at the moment. usual stuff : name, address, email. a few ticky boxes - you get the idea. In fact ive built it, but as a default it tabs through the boxes from left to right and then down (as you'ld read a page). Is there anyway of tabbing down in columns, or even getting it to tab to the place of your choice? Any help or pointers would be wicked ... like is there an ascii reference to the tab key that i could use... i dunno,
thanks loads,
DUNCAN

Tabbing In Flash
hey, i was just wondering if anyone knew if it was possible to set a tab index for movie clips with images inside or does it only work with dynamic text? Cheers.

How Do I Eliminate Tabbing In Flash?
I have run into a small problem with this website I am working on. The website is build entirely in flash. When ever a page is loaded, if you press the tab key it highlights the first item on the page that has an ActionScript leading it to a different URL or to load the next .swf file. If you keep pressing the tab key, it works it's way from top to bottom stopping at every item with ActionScript. On my contact page, I have a formmail form built into flash and this becomes a problem because when you tab through the form it jumps over to the other ActionScript items. Does anyone out there know a way to make the ActionScript links tab free or how to fix this problem? Thanks!

Here us the URL of the site so you can see what is happening:
http://www.tucsonwebsitedesign.com

Flash Form/ Tabbing
Hi,
i have a Form in a scroller, and when I tab through the fields, I would like the form to scroll along as I am tabbing down through the form. Does anyone know if there is a way to do this?

Thanks in advance,
Mike

Tabbing With Forms In Flash 8
I have a flash form that is inside an swf that is sitting in a container on the main stage. When I tab between the input boxes of the form, it also tabs between the buttons on the parent movie. Is there a way to fix this? I just want it to tab like a regular form in html. Thanks in advance!

Tabbing On Focus Flash
Hi Guy's,

Again sorry to be a pain but I am trying to figure out 2 things with regards to setting the focus on a form in flash. Firstly I would like the focus to go directly to the first object on the form yet it doesn't, and I am not sure how to solve this issue.

Secondly I named the instance names of the inoutfields and in actionscript put this. Now because I have used the UI Components Combo box I aint sure hot to apply the tabbing order for this any clues?

pad1.tabIndex = 1;

I would be so grateful guys, thanks.

Tabbing On Focus Flash
Hi Guy's,

Again sorry to be a pain but I am trying to figure out 2 things with regards to setting the focus on a form in flash. Firstly I would like the focus to go directly to the first object on the form yet it doesn't, and I am not sure how to solve this issue.

Secondly I named the instance names of the inoutfields and in actionscript put this. Now because I have used the UI Components Combo box I aint sure hot to apply the tabbing order for this any clues?

pad1.tabIndex = 1;

I would be so grateful guys, thanks.

Tabbing Between Input Boxes In Flash
I have a table in Flash containing input boxes and menu buttons in a top bar. I'd like to allow the user to tab along to each input box in order, but at the moment the tabbing order is random and also flips up to the menu buttons. Is there any way I can control this? Cheers...

Tabbing Order Of Flash MX Forms
Please can someone help me to arrange the order of my 'input' boxes? When I try to 'Tab' through them with my keyboard Tab key, the order is all over the place!

I have tried to use the arrange command but to no avail!

Any tips people, client is getting very shirty about it...help!

Tabbing Between Fields In A Flash Form
is there a way to set which input field the 'tab' button will jump to next?

i've got two separate forms next to each other and instead of completing one form, then moving to the next, 'tabbing' between input fields keeps jumping between the two forms.

Tabbing Problem In Flash Player 9
Using Flash Player 8,0,24,0 in IE 6 and FireFox 1.5, hitting the tab key caused the insertion bar to move from field to field in the Flash Player screen.

After upgrading to Flash Player 9,0,28,0 tabbing no longer works.

This has been confirmed by four other users. I can't find a way to report this problem to Adobe. For us its serious.

Two questions:

1) has anyone else seen this problem?

2) how to communicate this with Adobe?

thanks,

Terry

Tabbing Issue With Flash Form
Hello all,

I have built a flash form in a .swf that loads into my main.swf file. The form functions properly except one thing...

Normally when useing the net and filling in forms one uses the tab key to move to the next field. In flash, and in my form when you have typed in one field and you "tab" it goes to the nearest button on the stage. This can is pretty frustrating as then you have to grab the mouse and manually pick you field.

http://www.emakmafu.com/start/

if you click on "contact" and then "newsletter" yuyou can see the problem.

Is there a way of cureing this? or is this in the nature of flash.

Thanks for any help in advance

All the best

Henry

Flash Menu Tabbing Issue: How To Be Rid Of It?
Hello, SitePoint enthusiasts.

I whould appreciate if anyone suggested a piece of ActionScript that I could use in the following situation. I have an almost complete web site in which there is a lightweight navigation menu in Flash that I produced and became quite fond of: it has a message pane on the left and several image buttons on the right, each symbolic of the section it points to. When a visitor mouses over any of the buttons, a message is displayed in the pane, reading a summary of the particular section. When they release the button, they are taken to the appropriate web page within the site.

Despite the accessibility issues that this might present, I have used a snippet of JavaScript for links all over the site to remove the rectangular focus from them, which to me seems rather unsightly. This, naturally, disables tabbing through links, which is something I am willing to sacrifice for the sake of avoiding those annoying lines around links.

The one undesirable effect is that, when a visitor presses the tab key, they are not moving from one link to another in the document, but are only highlighting the first of the image buttons in the Flash menu. If they press Enter, the button is activated and opens a web page it points to. If they press tab again, they can highlight the second button but it is the first one again that has the yellow focus border and it alone can be activated by pressing enter. Pressing tab again gets them no further: no other button in the menu is highlighted. The result is: the first of several buttons can be highlighted and activated, the second only highlighted, the rest of buttons neither highlighted nor activated. I should like them to be insensitive to tabbing if any way possible; if not, it would be much better for them all to be able to receive focus and be activated. So, either nothing should happen (preferably), or everything should be regular, but not in this mixed state.

What should I do to remedy this relatively small inconvenience? Is there an action that would cause them on keypress <tab> (I forget the syntax here) to do nothing, or activate correctly, one and all? I should really appreciate your help. Thank you for your patience, as the explanation may appear slightly too detailed, but I hope that including all the details I think relevant might be of some consequence.

Flash Email Form Tabbing Problem?
Hi. I'm having a problem with an email form. I am loading a movie inside another movie that is my flash form. When entering data I am unable to tab between fields without tabbing through the whole website. Is there any way to limit the tab function to just the form movie? Are there any action script commands I can use to at least make the return key move between fields?

Thanks. To see what I mean please visit the following page:

http://www.riehlevents.com/flash/index.html

Click on 'Contacts' then 'Business Contact Form'


Scott

Tabbing Won't Start Until I Click On The Embedded Flash
I have a page with the link and the embedded swf.
I set the cursor to the first textfield by the click on the link.
But I can't use TAB in the flash until I click on the activeX.

Can you tell me how can I initiate the tabbing without a click on the activeX?









Attach Code

Flash code:

this.createTextField("field1", 1, 10, 10, 200, 20);
field1.type = "input";
field1.border = true;
field1.background = false;
field1.password = false;
field1.multiline = false;
field1.html = false;
field1.embedFonts = false;
field1.selectable = true;
field1.wordWrap = false;
field1.mouseWheelEnabled = true;
field1.condenseWhite = false;
field1.restrict = null;
field1.variable = null;
field1.maxChars = null;
field1.styleSheet = undefined;
field1.tabInded = undefined;

this.createTextField("field2", 2, 10, 40, 200, 20);
field2.type = "input";
field2.border = true;
field2.background = false;
field2.password = false;
field2.multiline = false;
field2.html = false;
field2.embedFonts = false;
field2.selectable = true;
field2.wordWrap = false;
field2.mouseWheelEnabled = true;
field2.condenseWhite = false;
field2.restrict = null;
field2.variable = null;
field2.maxChars = null;
field2.styleSheet = undefined;
field2.tabInded = undefined;

function Login()
{
Selection.setFocus(this.field1);
}

import flash.external.ExternalInterface;

ExternalInterface.addCallback("Login", this, Login);


Page code:

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>avTabTest</title>
</head>

<body bgcolor="#ffffff">

<script language="JavaScript">
var loadJSurl = "tabTest.js";
document.write('<scrip' + 't type="text/javascript" src="' + loadJSurl + '">');
document.write('</scrip' + 't>');
</script>

</body>
</html>


tabTest.js - JavaScript code:


var TABTEST_DIV_ID = "avTabTest";
var TABTEST_SWF_NAME = "avTabTest.swf";
var TABTEST_OBJECT_ID = "av";
var FLASH_CAB_URL = "http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0";

window.top.tabTestInterface = new tabTestInterface();

document.write('<a href="javascript:window.top.tabTestInterface.login();">Login</a>' +
'<div id="' + TABTEST_DIV_ID + '" name="' + TABTEST_DIV_ID + '"' +
' style="position:fixed;z-index:100;left:300 px;top:100 px;width:300px;visibility:hidden;"></div>');


var thisObject = getDocumentObject(TABTEST_DIV_ID);

var tabTestHeight = 100;
var tabTestWidth = 250;
var windowMode = "Transparent";

var tabTestTag = '<div id="' + TABTEST_DIV_ID + '" name="' + TABTEST_DIV_ID + '" ' +
'style="position:absolute;z-index:100;left:0px;top:0px;width:900px;visibility:visible;" >' +
'<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" ' +
'codebase="' + FLASH_CAB_URL + '" ' +
'width="' + tabTestWidth + '" height="' + tabTestHeight + '" id="' + TABTEST_OBJECT_ID + '" name="' + TABTEST_OBJECT_ID + '" align="right">' +
'<param name="allowScriptAccess" value="always" />' +
'<param name="movie" value="' + TABTEST_SWF_NAME + '" />' +
'<param name="quality" value="high" />' +
'<param name="bgcolor" value="#ffffff" />' +
'<param name="scale" value="noscale" />' +
'<param name="SeamlessTabbing" value="false" />' +
'<param name="wmode" value="' + windowMode + '" >' +
'</object>' +
'</div>';

thisObject.outerHTML = tabTestTag;




function getDocumentObject(anId)
{
var Result = null;
Result = window.document.getElementById(anId);

if ((Result === null) && (window.document.body))
{
for (var counter = 0;counter < window.document.body.childNodes.length;counter++)
{
if (window.document.body.childNodes[counter].id == anId)
{
Result = window.document.body.childNodes[counter];
break;
}
}
}

if ((Result === null) && (window.document.all))
{
Result = window.document.all[anId];
}

if ((Result === null) && (window.document.layers))
{
Result = window.document.layers[anId];
}
return Result;
};



function tabTestInterface()
{
this.login = function()
{
this.focusOnViewer();
getDocumentObject(TABTEST_OBJECT_ID).Login();
}

this.focusOnViewer = function()
{

var theViewer = getDocumentObject(TABTEST_OBJECT_ID);
if (theViewer === null)
trace("cannot find the Viewer in focusOnViewer()");
else
{
if (typeof(theViewer.focus) == "undefined")
alert("Viewer.focus undefined");
else
theViewer.focus();
}
}

}

Actionscript/Flex 3 - Seeking Tutorial That Connects Flex With Various Architectures
I am looking for a step-by-step detailed tutorial that will show me how to connect the following technologies with my Flex Application (from installation to actual usage to understanding what each part does). My flex application needs to be able to save data from a datagrid in the database and retrieve it. All suggestions and examples are welcome.Thanks

# Presentation Layer

* Flex 3

# Remoting and web messaging technology Layer

* BlazeDS


# Business Layer

* Spring

# Data Access (Object-Relational Mapping)

* Hibernate

# Data Storage

* MySQL

# Application Server

* JBoss

# Build

* Ant or Maven

Note On Tabbing/ Focus Issues In Some Flash Components.
I was working on the large flash standalone project. During the development, we found some strange things about the tabbing and focus. Some of you might already know these issues.
Here is the list.please add your finding here so that others dont have to waste their time on research.


1) Flash MX 2004 -- > I disabled a radio button useing radioBtn.enabled = false. So now I can't click & select the radio button. Now press the tab & get the focus on the radio button. press the arrow keys & navigate through radio buttons of that group & you will see that, disabled radio button is also gatting selected. It means disabled radio buttons are not truely disabled. they still can be selected using keyboard.
http://www.balasainet.com/members/cr...it/radio1.html


2) Flash MX -- > I assign a handler function to a combobox using comboBox.setChangeHandler("comboFunc"). When I select any value in the combobox, handler function gets execute, good. Now I remove all the values in the combobox. When I click on that combobox, my handler function doesn't get execute since combobox is empty nothing is selected. Now click the combobox & press the down/up arrow key & you will see that handler function is executed. It means that even if the combobox is empty & there is no value to select, handler function can be executed.
http://www.balasainet.com/members/cr...it/combo1.html


3) Flash MX 2004 -- > Date(calendar) component doesn't receive focus at all. It means you cant select date component using tab.


4) Flash MX 2004 -- > I have three radio buttons r1, r2, r3 with group named radioGroup.
I assigned a handler function 'onRadioSelected' to each of the radiobutton. r1.addEventListener("click", onRadioSelected);, r2.addEventListener("click", onRadioSelected);, r3.addEventListener("click", onRadioSelected);.
When I click any of the radio button, handler function gets executed, good. Now press the tab and get the focus on the radio button of that group & navigate through r1, r2 & r3 using arrow keys. You will see that handler function is NOT getting executed. It means when you select any radio button using mouse, handler function will execute. but, when you select any radio button using tab, handler function doesnt execute.
The work around for this, is to assign the handler function to the group. radioGroup.addEventListener("click",onRadioSelecte d); instead of assigning the handler function to the individual buttons. But what if I want to assign different handler functions to each of the radio buttons?
http://www.balasainet.com/members/cr...it/radio2.html


5) When you import the flash movie in the Director mx 2004, in many situations tabbing/focus doesn't work properly or doesn't work at all.

This is very strange that components behavior is different for mouse clicks and the keyboard hits. We never expected such issues.

regards
Mahesh Kokadwar

Tabbing Into A Flash Black Hole - Accessibility Issue
If you place a Flash movie with a button on a web page, users can tab into the Flash movie but they can't tab out. This is a huge problem for people who use the tab key as their primary or only means of navigation. Tabbing through a web site is very common for blind surfers with speech browsers.
An example is at my site The Renaissance Center . When you get to the site, hit tab. A button in the banner is highlighted. Then you can't tab away from that button. Very bad.
I've tried a couple of strategies. I tried setting up an fscommand in the flash movie, triggered by the tab key, that calls a JavaScript function to move the focus on to the next thing. Trouble is, as far as I can tell, only text fields in a form can recieve focus this way. I haven't been able to get it to work with other objects. Ideally, if an <a name=>tag could get the focus via JavaScript, I'd be set. But all I got was either nuthin' or errors.
So I thought about doing it a different way. I found a suggestion that I use a single pixel transparent gif, invisible to visual browsers, with alt text for speech based browsers, that links to an alternate version of the page designed for speech. I'm willing to do that, and it's concievable since I use server-side programming, but gee, if I could just get the tab key out of that Flash black hole I wouldn't have to do all that! I already have text-based equivalents to Flash content, alt tags on every image, css for typography... My page would already be accessible if the durn-danged focus didn't get trapped in the Flash movie. Any ideas? Help?

Flex Displaying Labels/Text Vertically In Flex 3
Hi All,

I have a chart in Flex 3 and am currently displaying the axis names using <mx:Label! I want to display the vertical axis name vertically, that is
p
r
i
c
e

instead of

price

I was wondering if anyone knew how I might be able to do this? Any help really would be greatly appreciated!

Thanks,
Derm

Flex Drop Alternate Labels From A Flex Bar Chart
Hi,

I have a bar graph in flex. i need to show labels on the x axis only after a definite intervals. actually this is to avoid overlapping of labels. for eg. if it is the 12 months shown on x axis, i need to show Jan April July etc. instead of Jan,Feb,March,April etc.
Any help would be appreciated.

Thanks
Ananya.

Flex Flex 3 Update 2 ( AS3 ) And Visual Basic 2008
Hello i am newbie for your forum . A lot of thanks for welcome.

I would to know about Flex and Visual Basic 2008 ( 9 Version with SP 1 ) because it is different with "fscommand" or "externedinterface.call"

I know that adding with shockwave in Visual Basic 2008 like old version of using object.
http://www.kirupa.com/developer/mx/flashvb.htm

But it is old version! I am using Visual Studio 2008 Pro with Service Pack 1 ...
I want to create swc with externedinterface or fscommand like MDM Zinc 3.x or Rapid applications...
Can you say me when your simple example for code?
I want to know:
- How do i exit an Application from Visual Basic 2008 while i click with externedinterface by Flex-Application.

Edit:
Flex Builder 3: Code:
Code:
<?xml version="1.0" encoding="utf-8"?><mx:Application
xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute"><mx:Script>
<![CDATA[

publicfunction myAppexit():void
{
fscommand("vb_exit", "");
}
]]>
</mx:Script>
<mx:Button label="Exit" click="myAppexit()" left="10" top="10"/>
</mx:Application>
Visual Basic 2008: Code:

Code:
Public
Class Form1PrivateSub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) HandlesMyBase.Load

AxShockwaveFlash1.Movie = "C:Dokumente und EinstellungenSnakeMediaEigene DateienVisual Studio 2008ProjectsWindowsApplication1WindowsApplication1myApp.swf"
EndSub
PublicSub AxShockwaveFlash1_FSCommand(ByVal command As System.String) Handles AxShockwaveFlash1.FSCommand
Application.Exit()
EndSub
End Class
2 Errors were outputs.. i can not try.. Please answer me for help!!


Thank you.

Best regards, SnakeMedia

Develop FLEX Applications, Without Purchasing FLEX Server
BIG news today, Mike Chambers has announced that the next version of flexbuilder (codenamed zorn which will be an eclipse plugin) will be able to compile mxml and Actionscript files into swfs, without having the flex server. There will still be things that you need flex server for (enterprise level features, no word on what these are just yet) but you wont need it for most of your flex swfs. This is a HUGE deal btw.

You can see the post here: http://weblogs.macromedia.com/mesh/a...zorn_requi.cfm

make sure you read through the comments, esp. my question and his answer.

Convert "Load Game" Code From Flex To CS3
Hi! I'm looking at some two way communcation code with databases. I've found a perfect example to use this with Flex! But how do I use this code in CS3? What should I change?

Class SendAndLoadExample:

Code:

package

{

import flash.events.*

import flash.net.*;

public class SendAndLoadExample {

public function SendAndLoadExample() {}
public function sendData(url:String, _vars:URLVariables):void {
var request:URLRequest = new URLRequest(url);
var loader:URLLoader = new URLLoader();
loader.dataFormat = URLLoaderDataFormat.VARIABLES;
request.data = _vars;
request.method = URLRequestMethod.POST;
loader.addEventListener(Event.COMPLETE, handleComplete);
loader.addEventListener(IOErrorEvent.IO_ERROR, onIOError);
loader.load(request);
}
private function handleComplete(event:Event):void {
var loader:URLLoader = URLLoader(event.target);
trace(”Par: ” + loader.data.par);
trace(”Message: ” + loader.data.msg);
}
private function onIOError(event:IOErrorEvent):void {
trace(”Error loading URL.”);
}
}
}
I don't think there are so much to do with the code above. But how should i change the SendAndLoadExample.mxml below?

SendAndLoadExample.mxml

Code:
<?xml version=”1.0″ encoding=”utf-8″?>
<mx:Application xmlns:mx=”http://www.adobe.com/2006/mxml” layout=”vertical”>
<mx:Script>
<![CDATA[
import flash.net.URLVariables;
private var mySendAndLoadExample:SendAndLoadExample = new SendAndLoadExample();
private function sendAndLoad():void {
var url:String = "http://[your server]/login.php”;
var variables:URLVariables = new URLVariables();
variables.UserName = “tushar”;
variables.Password = “my_password”;
mySendAndLoadExample.sendData(url, variables);
}
]]>
</mx:Script>
<mx:Button label=”Fetch data” click=”sendAndLoad()”/>
</mx:Application>
Example from: http://tush.wordpress.com/2007/07/20...ver-variables/

Looking For AS3 (but Flex) "Page Flip" Code
The company I work for needs good page flip code for a project. The code needs to be available for commercial use. Doesn't need to be free, but not too expensive. We've done a lot of research and the only code out there that we can find is the standard AS2 code, and one good example that's been written for Flex. We develop in AS3, but not Flex (and don't have the budget, or knowledge to quickly translate from Flex).

Does anyone have any good links/leads? I'd really appreciate.

Thanks

Robert

Flex Tutorial: Twitter, Flex And JSON
I put up a tutorial that should get you started on how to use the Twitter API in Flex: Twitter, Flex and JSON

Flex Flex Tile List Component
How to make the Flex Tile list component scroll the content continously like in Scribd ? The tile list does not scroll continuously, but it abruptly jumps and fits the content place holders in the viewable area.

Flex Dynamic DataGrid Creation In Flex 3
Hi All

Can anyone please suggest me a way to create a data grid dynamically in Flex 3.(I actually was want to create it thru Action Script.)
The data would come from the XML and the rows of the grid are also not going to be fixed. It will be dependent on the number of nodes in the XML.
The data grid will have 3 columns 1 containing a text field, and the rest 2 will contain small icons, all created dynamically.
It would be gr8 if some code related to that can be provided.

Thanks for any help that can be provided.
Vicky

Flex RawChildren Ruins Layout In Flex 3
Hey all!

I've been playing around with Flex lately, and having come from a pure AS3 background, I couldn't help but create some simple effects in there for fun. That's when I hit a snag. Now, with Flex, I'd have to use the UIComponents' rawChildren object in order to add widgets of DisplayObject types... fair enough. Problem is when I do that, the components stop obeying layout rules, transitions stop working, etc.

The best way to really demonstrate this problem is to see the project itself. Here's a link to the project source:

http://www.thurinusworks.com/public/problem_src.zip

In there I created a Panel component that has view states and transitions, and an Application that holds that Panel and houses a bit of actionscript to create a sparkly mouse toy effect. If you commented out all the script for the mouse toy, you'll see that the Panel centers on the Application as you resize the window, and clicking the 'Register' link would display a nice elastic transition effect between view states. When the mouse toy is active, the Panel position stops working correctly, and clicking on the 'Register' link would simply display the view state with no transition. It happens intermittently, but seems to guarantee happening after the first SWF launch, so if you don't see it happening, relaunch the SWF and it should screw up.

I don't know what's causing it to break like this. It's either my error or a serious bug in Flex, and I dearly hope it's the former... If it is, what must I do to fix it? If it isn't, is there a work-around?

Thanks for *any* help you can provide!

Best regards,
Jay

Flex Filling Non-Flex Objects In A Repeat
Filling non-Flex objects in a Repeat

Hi guys,

For our current project were trying to put as much as possible of the display list structure into mxml. Because that's more readable.
This of course also includes using Repeat's for dynamical parts.

But, we build some parts in Flash. Just little peaces for skinning.
(We publish those as swc and use them in Flex)

We can't of course just use this in flex, but we have the DisplayObjectWrapper from Mr. Grant to fix that.
But despite of this wrapper I can't change the properties of non-Flex components within a Repeat, in mxml.

A simple example:


HTML Code:
<?xml version="1.0" encoding="utf-8"?>
<mx:Canvas
xmlns:mx="http://www.adobe.com/2006/mxml"
xmlns:text="flash.text.*"
xmlns:ui="com.gskinner.ui.*">

<mx:Script>
<![CDATA[
[Bindable]
public var texts:Array = ["a","b","c"]
]]>
</mx:Script>

<mx:Repeater id="r" dataProvider="{texts}">
<ui:DisplayObjectWrapper>
<text:TextField text="{r.currentItem}" />
</ui:DisplayObjectWrapper>
</mx:Repeater>


</mx:Canvas>
This gives the (compile) error:
"Unable to generate initialization code within Repeater, due to id or data binding on a component that is not a visual child."

I went searching but couldn't find much. Only that you can get this error if you use the DataGridColumn in a certain way in a Repeat.


Anyone any idea how to get this working?

Thnx

Copyright © 2005-08 www.BigResource.com, All rights reserved