Flex/CF vs xhtml/CF
Hi all, whilst I have kept one eye on flex I have never
ventured in.
I currently build and maintain a internal application,
consists of various functions such as customer data management,
sales data management etc etc..
my question is, as a complete flex newbie, what is the
benefit of me using flex (and coldfusion) or as i currently do,
html web pages and coldfusion...?
Many thanks in advance
It greatly depends on your intended purpose or “Use
Case” of your application really. So this is not something
simple to answer without knowing that. But the biggest reason I
chose Flex over traditional xHTML (Web 1.5 :) technologies is if
the application I am building needs to act and function more like a
desktop application rather then a WebSite. Think statefull vs.
stateless.
So for intranet applications, command and control
applications, generally anything that requires a rich UI and there
is no need for extensive SEO within the application. I would use
Flex.
For simple information sites with little user interactivity,
other then navigation, where a majority of the application is
simple text, (wiki's, pamphlet sites, ect...) or when I need to
make sure that the site is indexable by the major search engines
(not so much a problem anymore) then I use xHTML.
More and more however I find less and less of a reason to
drop back to any form of xHTML and am finding that just about
everything I would even need I can accomplish in Flex. Now that
Google and Yahoo are introspecting and indexing SWF files the SEO
is less of a problem (though not perfect yet).
Similar Messages
-
We are very pleased to announce the launch of
http://FlexCF.com this is a sister
site for
http://LearnCF.com and focuses on
Flex application development with a ColdFusion backend.
There are seven tutorials published on launch, with more to
come.
These sites are Not for Profit community sites, you can
contribute tutorials. All costs for hosting & development of
these sites are provided free by the operators. Any revenue
generated will be used to purchase prizes for tutorial authors.
Regards
Dale Fraser
http://learncf.com
http://flexcf.comIt greatly depends on your intended purpose or “Use
Case” of your application really. So this is not something
simple to answer without knowing that. But the biggest reason I
chose Flex over traditional xHTML (Web 1.5 :) technologies is if
the application I am building needs to act and function more like a
desktop application rather then a WebSite. Think statefull vs.
stateless.
So for intranet applications, command and control
applications, generally anything that requires a rich UI and there
is no need for extensive SEO within the application. I would use
Flex.
For simple information sites with little user interactivity,
other then navigation, where a majority of the application is
simple text, (wiki's, pamphlet sites, ect...) or when I need to
make sure that the site is indexable by the major search engines
(not so much a problem anymore) then I use xHTML.
More and more however I find less and less of a reason to
drop back to any form of xHTML and am finding that just about
everything I would even need I can accomplish in Flex. Now that
Google and Yahoo are introspecting and indexing SWF files the SEO
is less of a problem (though not perfect yet). -
Can someone please tell me why my flex swf isnt appearing in firefox?
Like the title says, could someone possibly explain to me what im doing wrong with embedding this swf? **My code works fine in chrome**...But doesn't appear in FireFox, and it look compacted in IE, like its only set to a 5% height or something.
All I want to do is have the swf scale to 80% width(then i use the margin:0 auto; to center it), then 75% height. Theres a header, small ad at the top, and a footer at the bottom. All while being compatable with Chrome, FF, IE.
Incase possibly this matters..in my Flex Project I set the swf height and width to 100%. I figured since it's being embeded inside the `.mainContainer` div, the swf would then assume its parent(mainContainer)'s width and height wich is set to width:80% and height:75%. **And it does it chrome just fine** but like i said above the swf doesn't appear in FF. I thought maybe i should note this incase it's necessary information to solve this bug.
I didn't think this would be too hard but I can't seem to get the swf to load in FF. I'm seeing the swf making connects to some netConnections and stuff like its there, i just cant see anything.
-What am i doing wrong?
-Is there a better way I should be implementing the swf?
-How can i figure out whats wrong on my own in the future?
(im so used to working in Flash builder on flash projects, the debugging is so simple, informative, and easy to use. With only having access to "inspector" in chrome which never spits out any useful information I feel like im coding in the dark compared to using eclipse)
**EDIT:**
1 more thing I should mention. Pretty much the entire "embed" code provided here was auto generated by Flash Builder. I created .mainContainer around the "embed" code and all the extra divs around it... my header, footer,ect. Without any of my extra content, the swf appears just fine like you would expect it in firefox. SO my point in saying this is i do not think its **literally** the embed code. Because that embed code works in FF. It's just how im implemented my header, and div around this flash content that seems to break the code in FF for some reason.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<title>TestApp</title>
<meta name="google" value="notranslate" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link href="assets/css.css" rel="stylesheet" type="text/css" />
<link rel="stylesheet" type="text/css" href="history/history.css" />
<?php
if(!isset ($_GET["chan"]))
{$chan="random";}
else
{$chan = preg_replace('/[^a-z]/', "", strtolower($_GET["chan"]));}
?>
<script type="text/javascript" src="history/history.js"></script>
<script type="text/javascript" src="swfobject.js"></script>
<script type="text/javascript">
var swfVersionStr = "10.2.0";
var xiSwfUrlStr = "playerProductInstall.swf";
var flashvars = {chan: "<?php echo $chan ?>"};
var params = {};
params.quality = "high";
params.bgcolor = "#ffffff";
params.allowscriptaccess = "sameDomain";
params.allowfullscreen = "true";
params.wmode="transparent";
var attributes = {};
attributes.id = "TestApp";
attributes.name = "TestApp";
attributes.align = "middle";
swfobject.embedSWF(
"TestApp.swf", "flashContent",
"100%", "100%",
swfVersionStr, xiSwfUrlStr,
flashvars, params, attributes);
swfobject.createCSS("#flashContent", "display:block;text-align:left;");
</script>
</head>
<body>
<div class="wrapper">
<div class="TopBar">
<div class="homeBarBtnsHolder">
</div>
</div>
<div class="topad">
<!-- google ad-->
</div>
<div class="mainContainer">
<!--embed -->
<div id="flashContent">
<p>
To view this page ensure that Adobe Flash Player version
10.2.0 or greater is installed.
</p>
<script type="text/javascript">
var pageHost = ((document.location.protocol == "https:") ? "https://" : "http://");
document.write("<a href='http://www.adobe.com/go/getflashplayer'><img src='"
+ pageHost + "www.adobe.com/images/shared/download_buttons/get_flash_player.gif' alt='Get Adobe Flash player' /></a>" );
</script>
</div><!--flashContent -->
<noscript>
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="100%" height="100%" id="TestApp">
<param name="movie" value="TestApp.swf" />
<param name="quality" value="high" />
<param name="bgcolor" value="#ffffff" />
<param name="allowScriptAccess" value="sameDomain" />
<param name="allowFullScreen" value="true" />
<param name="wmode" value="transparent" />
<param name="FlashVars" value="chan=<?php echo $chan ?>" />
<!--[if !IE]>-->
<object type="application/x-shockwave-flash" data="TestApp.swf" width="100%" height="100%">
<param name="quality" value="high" />
<param name="bgcolor" value="#ffffff" />
<param name="allowScriptAccess" value="sameDomain" />
<param name="allowFullScreen" value="true" />
<param name="wmode" value="transparent" />
<param name="FlashVars" value="chan=<?php echo $chan ?>" />
<!--<![endif]-->
<!--[if gte IE 6]>-->
<p>
Either scripts and active content are not permitted to run or Adobe Flash Player version
10.2.0 or greater is not installed.
</p>
<!--<![endif]-->
<a href="http://www.adobe.com/go/getflashplayer">
<img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash Player" />
</a>
<!--[if !IE]>-->
</object>
<!--<![endif]-->
</object>
</noscript>
<!--embed -->
</div><!--mainContainer end -->
<div class="push"></div><!--this is the push to make my footer stick to the bottom-->
</div> <!--wrapper -->
<div class="footer">
<p>Top part of footer infoHere</p>
<p>Lower part of footer infoHere</p>
</div>
</body>
</html>
css.css
html, body {
height:100%;
width:100%;
body {
margin:0;
padding:0;
overflow:auto;
text-align:center;
background: url('../../assets/images/homeBG.png') repeat-x;
font-family: Helvetica, Arial, sans-serif;
font-size: 14px;
object:focus {
outline:none;
#flashContent {
display:none;
.mainContainer {
min-width:340px;
min-height:500px;
height: 75%;
width:80%;
margin:0 auto;
padding:0;
.wrapper {
min-height: 100%;
height: 100%;
width:100%;
height: auto !important;
margin: 0 auto -200px;
.TopBar {
background: url('../../assets/images/TopBarBG.png') repeat-x;
text-align: left;
height:50px;
width:100%;
box-shadow: 0px 7px 16px rgba(0, 0, 0, 0.65);
-moz-box-shadow: 0px 7px 16px rgba(0, 0, 0, 0.65);
-webkit-box-shadow: 0px 7px 16px rgba(0, 0, 0, 0.65);
margin-bottom:15px;
.footer, .push {
height: 200px;
text-align:center;
clear: both;
width:100%;Thanks to those of you who have responded. It is just frustrating because I absolutely love this phone. I just was shocked to see these ever changing colored vertical lines and sometimes just light grayish stripes throughout my screen. They come and go. Constantly changing, sometimes disappearing and then showing up again in a different app or simply when I pick up my phone after leaving it sit. The problem is where to start? I'm thinking straight to the nearest Apple Store on Monday morning.
-
Completely different AMF request packets for same remote service call from Flex to PHP using ZendAMF
I was trying to debug why one of the remote-services in our Flex application was failing randomly. What I found was interesting. Completely different AMF request packets were sent for same remote service call from Flex to PHP.
When the service call succeeds the AMF request packet looks like the following:
POST /video/flex/bin-debug/gateway.php HTTP/1.1
Host: localhost
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.15) Gecko/20110303 Firefox/3.6.15
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: en-us,en;q=0.5
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive: 115
Cookie: PHPSESSID=j6u30i8uu6c3cvp8f4kipcpf05
Referer: http://localhost/video/flex/bin-debug/main.swf/[[DYNAMIC]]/5
Content-type: application/x-amf
C ontent-length: 305
Flex Message (flex.messaging.messages.RemotingMessage) operation = getMemberFromEvent clientId = 2F997CD0-7D08-8D09-1A9B-0000422676C8 destination = MembereventService messageId = B46AB58D-2241-83F0-41E4-9FE745565492 timestamp = 0 timeToLive = 0 body = [ 280 ] hdr(DSId) = nil
And when the service fails the AMF request packet looks like this:
ServiceRequest: getMemberFromEvent; RemoteService; getMemberFromEvent
(mx.messaging.messages::RemotingMessage)#0
body = (Array)#1
[0] 250
clientId = "1AA4FAAB-AEA5-8109-4B0D-000002B3A9A1"
destination = "MembereventService"
headers = (Object)#2
DSEndpoint = (null)
DSId = "nil"
messageId = "2F92E6C0-FE92-A09B-B150-9FE2F28D9738"
operation = "getMemberFromEvent"
source = "MembereventService"
timestamp = 0
timeToLive = 0
Also, following is the error message on Flex when the service fails:
{Fault code=Channel.Call.Failed, Fault string=error, Fault detail=NetConnection.Call.Failed: HTTP: Failed, Destination=MembereventService}
We are using Swiz as the micro-architecture for Flex development and Zend AMF for remoting between Flex and PHP.
Any ideas what is wrong here, what is causing Flex to send different request packets for the same service & what I can do to fix it?Hi, I know that your post is almost 5 years ago, but have you found the solution to this issue?
Thanks. -
Encoding problem in Flex - HTTPService
Problem with swedish character å, ä och ö in a
simple form mail with flex, php and mySQL.
Have tried to change this in flex - mySimpleFormMail.mxml:
<?xml version="1.0" encoding="utf-8"?> to
<?xml version="1.0" encoding="Latin1"?> and to
<?xml version="1.0" encoding="iso-8859-1"?>
Have also at the same time changed this in mail.php:
<meta http-equiv="Content-Type" content="text/html;
charset=utf-8" /> to
<meta http-equiv="Content-Type" content="text/html;
charset=Latin1" /> and to
<meta http-equiv="Content-Type" content="text/html;
charset=iso-8859-1" />
The mySimpleFormail looks like this is this:
From---------------------------------------
Name----------------------------------------
To------------------------------------------
E-mail---------------------------------------
Mesage---------------------------------------
SEND (button)
The e-mail generated from mySimpleFormail looks like this:
From: Patrik Hällman
Email Address: [email protected]
To:
Patrik Hällman
Email Address: [email protected]
Message: testing if this form works with the following
character -
åä och ö.
...as you can see
swedish character å, ä och ö is wrong
displayed.
This is catastrophic when you working with cms and databases.
All help I can get from this forum is really appreciated.
Here is the result from <traceTarget>:
[SWF] C:\AppServ\www\email \bin-debug\email_send4.swf - 910
229 bytes after decompression
'AB8F6784-15FC-7BD4-D26D-F73192A7717F' producer set
destination to 'DefaultHTTP'.
'direct_http_channel' channel endpoint set to http:
'AB8F6784-15FC-7BD4-D26D-F73192A7717F' producer sending
message 'AA84F829-98F0-E93F-D7AC-F732847CF6B2'
'direct_http_channel' channel sending message:
(mx.messaging.messages::HTTPRequestMessage)#0
body = (Object)#1
emailMessage = "Now I´m testing with the swedish
character å, ä and ö."
senderEmail = "[email protected]"
senderName = "Peter Fällman"
sendToEmail = "[email protected]"
sendToName = "Patrik Hällman"
clientId = (null)
contentType = "application/x-www-form-urlencoded"
destination = "DefaultHTTP"
headers = (Object)#2
httpHeaders = (Object)#3
messageId = "AA84F829-98F0-E93F-D7AC-F732847CF6B2"
method = "POST"
recordHeaders = false
timestamp = 0
timeToLive = 0
url = "
http://www.myhomesite.se/email/email.php"
'AB8F6784-15FC-7BD4-D26D-F73192A7717F' producer connected.
'AB8F6784-15FC-7BD4-D26D-F73192A7717F' producer acknowledge
of 'AA84F829-98F0-E93F-D7AC-F732847CF6B2'.
Decoding HTTPService response
Processing HTTPService response message:
(mx.messaging.messages::AcknowledgeMessage)#0
body = "<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0
Transitional//EN" "
http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="
http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html;
charset=iso-8859-1" />
<title>Untitled Document</title>
</head>
<body>
</body>
</html>
clientId = "DirectHTTPChannel0"
correlationId = "AA84F829-98F0-E93F-D7AC-F732847CF6B2"
destination = ""
headers = (Object)#1
messageId = "5624FC90-E89E-2B47-92B9-F7328A8CB993"
timestamp = 0
timeToLive = 0Search this forum for the words "chinese character". Another
user said they had succeded in doing this.
Tracy -
Flex Developer Opening (Singapore)
Looking for a number of Flex Developers/consultants for
opening in Singapore
Responsibilities:
Develop web user interfaces, style sheets, templates and
layouts for use in projects, product development/implementation and
maintenance-support.
Create sitemaps, wireframes (HTML/XHTML) and other
architectural documents, as needed, based on firm understanding of
UI and navigation planning.
Conceptualize requirements into creative, dynamic and rich
UI.
Ensure site design integrity and quality control.
Stay knowledgeable of the industry standards and trends.
Applying methodology (e.g. OO, RUP, Agile) to prepare
high-level design documents.
Requirements:
1+ year experience in professional experience in design,
coding, and corporate branding.
Knowledge of building rich web interfaces and architectures
and proven experience of web development technologies and
frameworks.
Knowledge of HTML / CSS and web standards.
Working knowledge of Macromedia Flash, ActionScript 2 / 3.
Working experience in Web Technology such as Java and
Flash/Flex.
Knowledge and understanding in integration technology such as
J2EE is a plus.
Excellent technical, analytical and communication skills.
Strong team player, able to work successfully with
cross-functional, geographically dispersed teams.
Interested, please email to [email protected]
Thank you.
Regards,
MKYou should also crosspost this at
http://www.cflex.net/ and the Flex
jobs yahoogroup.
hth,
matt horn
flex docs -
Need Adobe Flex User Experience Designers & Developers - SF BAY AREA
The User Experience Designer will provide the necessary services requested by Business Partners for critical initiatives such as the National Agreement Implementation, Employee Portal Framework, KP Intranet and Clinical Library. You will also provide services as requested to additional clients including projects such as web sites, Flex applications and application support. This position will be based in Pleasanton, CA and will require travel to Oakland and other locations for projects, development and meetings.
Essential Functions:
Design, code, test, deploy, and maintain intranet sites and applications, working both independently and in team settings.
Develop CSS standards and strategy across the intranet environment, encompassing portal framework.
Scope new project work and create detailed project cost estimates, plans, and schedules.
Assist staff in web site maintenance, design and development for existing sites and applications.
Incorporate RIA elements when prudent.
Design within existing brand standards, and test for cross-browser compatibility.
Use knowledge of Section 508 accessibility compliance when applicable.
Work with developers to integrate front-end code with back-end functionality, while maintaining code compliance and consistency.
Help developers and development teams troubleshoot and fix UI problems.
Develop resolutions, recommend solutions and build action plans as needed.
Can independently perform, guide, assist or mentor others in web development and maintenance using industry best practices and specific internal procedures and standards in all phases of development, implementation, and post-implementation.
Minimum Technical Skills Required:
4 years experience Adobe Dreamweaver (CS4)
4 years experience HTML/XHTML and CSS
4 years experience Adobe Photoshop and Illustrator (CS4)
1 year experience with JavaScript, AJAX, DOJO and SPRY
3 years experience with Microsoft OS
Skilled in Microsoft Office Productivity Tools
Basic Qualifications:
Bachelor's degree in Computer Science or equivalent skills and experience.
5 years relevant work experience with solid hands-on experience in design and build activities.
5 years experience in estimating, planning and coordinating multiple projects.
Experience delivering on enterprise level projects in large companies; familiar with a variety of back-end middleware and endpoint tools.
Exhibits excellent attention to detail and diligently follows through to resolve issues.
Consistently demonstrates flexibility, organization and prioritization of tasks.
Experience working collaboratively with non-technical users.
Good communication skills both verbal and written form.
Ability to work independently with minimal guidance and as a member of a team.
Knowledge and understanding of Intranet, Web development best practices, usability and current code standards.
Preferred Qualifications:
Experience with Adobe Flex, IBM WebSphere, RAD 6 or 7, Adobe Flash and/or RIA
Experience with TeamSite Content Management
Experience with Web Standards and usability testing
***CANDIDATES SHOULD BE LOCAL TO THE SF BAY AREA*** Please contact me here or call 925.924.6359.people complaining about problems installing an office over another office are (dare i say it) stupid. it makes absolutely no sense installing one over the trial version. just uninstall the trial and you'll be fine. every single time.
as for problem with uninstalling mcafee (or any other antivirus, for that matter, just download the uninstaller from the software company e.g. http://service.mcafee.com/FAQDocument.aspx?id=TS100507 for mcafee.
that said i believe you get to choose if you want mcafee and/or office when you go through the inital boot, the "on-screen instructions"
you can slow down the odd via power manager
and thanks for the tips on changing the reg to have the user profiles somewhere else!
T400s - 2815RW1 + Win7 Ultimate
Don't pm me for help! That's what the forum is for. Also, Google's nicer than me. Ask him. -
File Upload using Flex/ColdFusion. 2044 error
I am looking for a little more clarity around the file upload using Flex and Cold Fusion. When I run this using my server I get Error #2044: Unhandled IOErrorEvent:. text=Error #2038: File I/O Error.
I did create a regular cfform and had it use my ColdFusion upload form and that worked fine, so I feel good about the upload form. I am starting to think there is a permission error with the Flash Player writing to the folder. When this is ran, it will show the file being 100% loaded but the complete event is never triggered. I put alerts to see where it hits and 100 does show at the same time as my error message. The complete alert never shows. I also put an alert in my cfm page and it never reaches that page to hit it. Whether I use an absolute URL or relative path. I have also tried the urlrequestmethod.post and nothing changed. Thanks in advance. BTW. I am using Flex 3.
This is my mxml file
<?xml version="1.0" encoding="utf-8"?>
<mx:Application
xmlns:mx="http://www.adobe.com/2006/mxml" xmlns:example="com.example.*" horizontalAlign="center" viewSourceURL="srcview/index.html">
<mx:Script>
<![CDATA[
import com.example.FileDownload
import mx.controls.Label
import com.example.FileUpload]]>
</mx:Script>
<mx:Label id="title" text="File I/O Example" fontSize="24" fontStyle="bold" />
<mx:Text id="subtitle" text="From Programming ActionScript 3.0, Chapter 22: Networking and communication" width="100%" textAlign="center" fontSize="12" /><example:FileDownload
id="fileDownload" creationComplete="fileDownload.init(downloadProgress, cancelDownload);" />
<example:FileUpload id="fileUpload" creationComplete="fileUpload.init(uploadProgress, cancelUpload);" />
<mx:HBox>
<mx:Panel title="Upload File" paddingTop="10" paddingBottom="10" paddingLeft="10" paddingRight="10">
<mx:ProgressBar id="uploadProgress" label="" mode="manual" />
<mx:ControlBar horizontalAlign="right">
<mx:Button id="startUpload" label="Upload..." click="fileUpload.startUpload();" />
<mx:Button id="cancelUpload" label="Cancel" click="fileUpload.cancelUpload();" enabled="false" />
</mx:ControlBar>
</mx:Panel>
<mx:Panel title="Download File" paddingTop="10" paddingBottom="10" paddingLeft="10" paddingRight="10">
<mx:ProgressBar id="downloadProgress" label="" mode="manual" />
<mx:ControlBar horizontalAlign="right">
<mx:Button id="startDownload" label="Download..." click="fileDownload.startDownload();" />
<mx:Button id="cancelDownload" label="Cancel" click="fileDownload.cancelDownload();" enabled="false" />
</mx:ControlBar>
</mx:Panel>
</mx:HBox></mx:Application>
here is my coldfusion upload script
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
</head>
<body>
<script>alert('hello')</script>
<cfset currentPath = getCurrentTemplatePath()>
<cfset currentDirectory = getDirectoryFromPath(currentPath)>
<cfoutput>This directory is #currentDirectory#</cfoutput>
<cffile action="UPLOAD" filefield="Filefield" destination="#currentDirectory#" nameconflict="OVERWRITE"/>
</body>
</html>
here is the package
package
com.example { import flash.events.*;
import flash.net.FileReference;
import flash.net.URLRequest;
import flash.net.URLRequestMethod;
import mx.controls.Button;
import mx.controls.ProgressBar;
import mx.core.UIComponent;
import mx.controls.Alert;
public class FileUpload extends UIComponent {
// Hard-code the URL of the remote upload script.
private const UPLOAD_URL:String = "upload_script.cfm";
private var fr:FileReference;
// Define reference to the upload ProgressBar component.
private var pb:ProgressBar;
// Define reference to the "Cancel" button which will immediately stop the upload in progress.
private var btn:Button;
public function FileUpload() {}
/*** Set references to the components, and add listeners for the SELECT,
* OPEN, PROGRESS, and COMPLETE events.
public function init(pb:ProgressBar, btn:Button):void {
// Set up the references to the progress bar and cancel button, which are passed from the calling script.
this.pb = pb;
this.btn = btn;
fr =
new FileReference();fr.addEventListener(Event.SELECT, selectHandler);
fr.addEventListener(Event.OPEN, openHandler);
fr.addEventListener(ProgressEvent.PROGRESS, progressHandler);
// fr.addEventListener(Event.COMPLETE, completeHandler);
/*** Immediately cancel the upload in progress and disable the cancel button.
public function cancelUpload():void {fr.cancel();
pb.label =
"UPLOAD CANCELLED";btn.enabled =
false;}
/*** Launch the browse dialog box which allows the user to select a file to upload to the server.
public function startUpload():void {fr.browse();
/*** Begin uploading the file specified in the UPLOAD_URL constant.
private function selectHandler(event:Event):void {
var request:URLRequest = new URLRequest(UPLOAD_URL);
/* request.url = UPLOAD_URL*/request.method = URLRequestMethod.POST;
try
{fr.upload(request);
}catch (error:Error){
trace
("error uploading")}
/*** When the OPEN event has dispatched, change the progress bar's label
* and enable the "Cancel" button, which allows the user to abort the
* upload operation.
private function openHandler(event:Event):void {pb.label =
"UPLOADING";btn.enabled =
true;}
/*** While the file is uploading, update the progress bar's status and label.
private function progressHandler(event:ProgressEvent):void {pb.label =
"UPLOADING %3%%";pb.setProgress(event.bytesLoaded, event.bytesTotal);
if(event.bytesLoaded==event.bytesTotal){
trace(Event.COMPLETE)Alert.show(
"100")}
/*** Once the upload has completed, change the progress bar's label and
* disable the "Cancel" button since the upload is already completed.
private function completeHandler(event:Event):void {Alert.show(
"in function")pb.label =
"UPLOADING COMPLETE";pb.setProgress(0, 100);
btn.enabled =
false;}Presumably you need to add a result handler to your request.
-
Does Flex support multiple namespaces?
I have a simple calorie calculator application which uses the adobe namespace => xmlns:mx="http://www.adobe.com/2006/mxml" automatically
I also want to include the namespace "http://www.w3.org/1999/xhtml" to use standard xhtml tags but I keep getting this error
Could not resolve <andre:h1> to a component implementation. Calory/src Calory.mxml line 58 1259888536456 15
Here is my full code
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:andre="http://www.w3.org/1999/xhtml" xmlns:mx="http://www.adobe.com/2006/mxml" creationComplete="populateCombo(event)" color="#679D88" backgroundGradientAlphas="[1.0, 0.47]" backgroundGradientColors="[#D2DDDF, #684E4E]">
<mx:Style source="calorie.css" />
<mx:states>
<mx:State name="results">
<mx:SetProperty target="{labelDuration}" name="width" value="190"/>
<mx:SetProperty target="{resultOfCalculation}" name="width" value="530"/>
</mx:State>
</mx:states>
<mx:Script>
<![CDATA[
import mx.events.FlexEvent;
import flash.events.MouseEvent;
private function populateCombo(e:FlexEvent):void
var dp:Array = new Array();
dp.push({label:"Choose exercise ...", data:0});
dp.push({label:"Aerobics (high impact)", data:0.07142});
dp.push({label:"Aerobics (low impact)", data:0.0333});
dp.push({label:"Basketball", data:0.0779});
dp.push({label:"Cycling", data:0.0779});
dp.push({label:"Jogging (slow)", data:0.0666});
dp.push({label:"Jogging (moderate)", data:0.0974});
dp.push({label:"Jogging (fast)", data:0.1});
dp.push({label:"Soccer", data:0.07142});
dp.push({label:"Swimming (moderate)", data:0.05844});
dp.push({label:"Tennis", data:0.06666});
dp.push({label:"Walking (brisk)", data:0.0666});
comboExerciseType.dataProvider = dp;
private function getCalories(e:MouseEvent):void
var calsBurned:Number = Number(comboExerciseType.value);
var kjBurned:Number;
var duration:Number = Number(textDuration.text);
var weightLBS:Number;
if(rdoKilograms.selected == true)
weightLBS = 2.2 * Number(textWeight.text);
else
weightLBS = Number(textWeight.text);
calsBurned = calsBurned * weightLBS * duration;
currentState = "results";
kjBurned = calsBurned * 4.2;
resultOfCalculation.text = "You burned " + String(Math.floor(calsBurned)) + " calories or " +
String(Math.floor(kjBurned)) + " kilojoules";
]]>
</mx:Script>
<mx:Panel x="58.5" y="72" width="556" height="332" layout="absolute" title="Calorie Calculators" id="panel1">
<mx:VBox x="0" y="0" height="292" width="536" id="vbox1">
<andre:h1> //This line is the problem
This is the standard header
</andre:h1>
<mx:Spacer width="300">
</mx:Spacer>
<mx:HBox width="537">
<mx:Label text="Weight" width="190" height="34" id="labelWeight" styleName="labelWeight"/>
<mx:TextInput width="333" height="35" id="textWeight"/>
</mx:HBox>
<mx:HBox width="536">
<mx:Label text="Exercise Type" width="190" id="labelExerciseType" enabled="true" styleName="labelExerciseType"/>
<mx:ComboBox height="29" width="336" id="comboExerciseType"></mx:ComboBox>
</mx:HBox>
<mx:HBox width="100%">
<mx:Label text="Duration (min)" width="187" id="labelDuration" styleName="labelDuration"/>
<mx:TextInput height="28" width="339" id="textDuration"/>
</mx:HBox>
<mx:HBox width="100%">
<mx:Spacer width="190"/>
<mx:RadioButton label="Pounds" fontWeight="bold" fontSize="20" fontFamily="Georgia" groupName="rdoWeight" selected="true" id="rdoPounds" width="171" styleName="rdoPounds"/>
<mx:RadioButton label="Kilograms" fontWeight="bold" fontSize="20" fontFamily="Georgia" groupName="rdoWeight" id="rdoKilograms" styleName="rdoKilograms"/>
</mx:HBox>
<mx:HBox width="100%">
<mx:Button label="Calculate" fontWeight="normal" fontSize="20" fontFamily="Georgia" click="getCalories(event) " id="buttonCalculate" styleName="buttonCalculate"/>
</mx:HBox>
<mx:Label text=" " fontWeight="bold" fontSize="20" fontFamily="Georgia" width="508" id="resultOfCalculation" styleName="resultOfCalculation" enabled="true"/>
</mx:VBox>
</mx:Panel>
</mx:Application>
I will thank you for insight!Just create a Flex component like any other. Here is information from the livedocs on creating Flex Components
http://livedocs.adobe.com/flex/3/html/help.html?content=ascomponents_advanced_3.html
To create something that mimics an h1 tag, you might look into a modified Label or Text class.
Honestly, I'm unsure why you'd want to try to reimplement xhtml tags in ActionScript 3. -
Can Flex do dynamic UI like AJAX?
With CGI or AJAX apps, if I want a checkbox for each of a
number of items returned by the server, I can just have the server
spit out a bunch of checkbox HTML elements, then set them as the
innerHTML for some div.
Since Flex is compiled, it doesn't seem like this is
possible. Is there a way to have any number of checkboxes
dynamically generated based on output from a server?"trustme73" <[email protected]> wrote in
message
news:g95ksf$32n$[email protected]..
> My requirement is slightly different. I am generating a
html layout in the
> server(html form with the list of input boxes and
buttons). When the
> browser
> receives this layout it just renders the page. I want to
convert this to
> flash
> UI. But flash has swf file which is complied. How can i
convert html page
> to
> flash ui(swf file)?. Here the html page is dynamically
generated one and
> the
> number of controls and the layout info will be decided
at runtime.
If your HTML is valid XHTML, you should be able to use e4x to
walk the tree
and display equivalent items. But since you have it working,
why not just
leave it alone? -
Problem with DOCTYPE tag in the index.html for flex file
When I have the following !DOCTYPE tag in the index.html file I use to load the flex swf file(s) both FireFox and Orical browsers both become horizontally shortened. When the tag removed everything works fine. Given that the !DOCTYPE tag is necessary for good html I'd really like to know what's going on.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">Good info on that site about HTML, unfortunatly it had nothing new for me. I did double check and everything and I was doing things the way they recomend.
I'm really bothered that this is happening. The DOCTYPE tag should be used and it should not have this effect when added to the HTML generated by the Flex Builder. Additionally the new Flash Builder does have the DOCTYPE tag in its generated HTML and this is very worrisome. -
I have a thesis project that must involve Flex
Hey guys, I'm trying to think of a useful Flex (possibly AIR deployed) application idea for a thesis project I'm doing in school this year. Problem is we have to have and present our idea prior to having any classes on Flex yet which makes it somewhat hard to think of the possibilities. We've had one intro class and I got to play with it and get a nice idea of it during an internship in England over the summer.
So far I have one decent vague idea and one very very vague ideas and I'm just looking for some insight as to if my ideas are even possible/worth it and any ideas you may have that I could try!
My first idea is to build an 'image gallery builder'. So an app for someone who has no knowledge or experience in web design and wants say an image gallery on their website.
For eg: A hardware store owner has a website and would like customers to able to easily navigate the store’s inventory in an image gallery displaying images of products for sale.
So my app would allow him to use a WYSIWYG interface that allows him to manipulate all the properties of a gallery with some sort of completely dynamic changeable base gallery layout. So with all sorts of visual buttons and such the user can change whatever feature of the gallery they would like. Thumb nail sizes, carousel types, headers, content text, colors, content layout etc. And everything they manipulate they can see a it change on the fly.
A lot of other gallery builders I see out there are very ugly and have very minimal options if you know what I mean.
What do you think? Is this something incredibly hard to do? does it make sense? That's as far as I've thought it with my minimal knowledge in Flex as of now.
My other ideas was do something with Flex and the Google maps SDK/API to create an interactive map to visualize geographically-based data that user can work with sorta thing.....haven't really thought that one much further...
Do you guys have any neat Flex application ideas I can consider?
And of course using Flex I have a good amount of knowledge (for a third year student) in XHTML,CSS,JS,PHP,MySQL,AS3.0No. Are you saving the project as a disk image rather than burning directly to disk from iDVD? If not then that's what I suggest you do. That will separate the encoding process from the burn process to save time and disks if the encoding is bad. It also lets you burn a second or third disk without having to encode again.
OT -
Multiple JavaScript errors on Flex LiveDocs pages
The newest beta 3
livedocs
don't work properly with Opera 8.5 and Opera 9 browsers.
Most annoying being Show/Hide Inherited... links not working
properly. As it stands, livedocs are quite unusable in Opera :-(
Some errors from JS console:
quote:
All Packages (Flex 2.0 ActionScript and MXML Language
Reference)
http://livedocs.macromedia.com/labs/1/flex20beta3/langref/package-summary.html
Inline script thread
Error:
name: TypeError
message: Statement on line 142: Could not convert undefined
or null to object
Backtrace:
Line 142 of linked script
http://livedocs.macromedia.com/labs/1/flex20beta3/langref/asdoc.js
(findTitleTableObject("packageUseBar")).style.display =
showPackageUse && showExamples ? "inline" : "none";
Line 3 of inline#2 script in
http://livedocs.macromedia.com/labs/1/flex20beta3/langref/package-summary.html
titleBar_setSubTitle("All Packages");
titleBar_setSubNav(false, false, false, false, false, false,
false, false, false, false, false,
quote:
mx.logging.AbstractTarget (Flex 2.0 ActionScript and MXML
Language Reference)
http://livedocs.macromedia.com/labs/1/flex20beta3/langref/mx/logging/AbstractTarget.html
Inline script thread
Error:
name: TypeError
message: Statement on line 198: Could not convert undefined
or null to object
Backtrace:
Line 198 of linked script
http://livedocs.macromedia.com/labs/1/flex20beta3/langref/asdoc.js
var rules = document.styleSheets[0].cssRules != undefined ?
document.styleSheets[0].cssRules : document.styleSheets[0].rules;
Line 186 of linked script
http://livedocs.macromedia.com/labs/1/flex20beta3/langref/asdoc.js
setInheritedVisible(getCookie("showInheritedConstant") ==
"true", "Constant");
Line 3 of inline#3 script in
http://livedocs.macromedia.com/labs/1/flex20beta3/langref/mx/logging/AbstractTarget.html
showHideInherited();So get this. After disabling, uninstalling, reinstalling both the extensions and Dreamweaver. Even deleted some new printer drivers because that was the only other thing that had changed, it came down to this...the DOCTYPE!
Not exactly sure why, but the DOCTYPE on my page had changed from
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
to
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN">
That's what broke the extension. Apparently ADDT needs "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"! As soon as I added it back in, it worked without any issues.
Thanks for the help though! -
Begginer Flex Apps for browser Questions:
Begginer Flex Apps for browser Questions:
To change Dim in Flex App I must change file in address bar of browser, in other words create another page?
Usually Flex Web sites come in only one file or many [upper 10?]?
Scrolled Area in Flex how called [I mean like XHTML DIV Scrolled area?
I book Flex 4: vol. I , Tranning from the Source, from Adobe press, covered:
Scrolled Areas
email components
publish to live server
if not, then all these covered in vol.II?to change the dimension of your flash window inside the browser you can use javascript... or you can have your flash-element in full size of the browser window and handle the resizing flash-intern, so you do not need an extra page for that. Just take a look at the HTML-Code and ask again if you are not that skilled with HTML/JavaScript.
usual you have only one SWF.
You can use the spark Scroller (see http://blog.flexexamples.com/2009/05/01/creating-a-scrolling-spark-panel-container-in-flex -gumbo/ for example)
Sorry, I don't know, but I can give you some hints:
for scrolling you can use Scroller
I don't know, what you mean by e-mail but you can use javascript to create a "mailto:"-link (see http://flexonblog.wordpress.com/2007/12/18/mailing-in-flex-using-javascript-function-mailt o/ )
the easiest way to deploy you just have to copy your swf and html-files from your flex-project to a web-server. -
Browser scrollbar if needed - Flex 4
I'm working on a flex project and I'm trying to resize my application based on the content being displayed in the current state. I'd like the wrapper to resize in the browser so that the browser's scroll bar appears if needed, which would be dependent on the user screen size.
I believe this needs to be done using Javascript but I haven't been able to find any good resources or examples.
I'd really appreciate any input.you just need the other way to embed the swf file..
try this
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:fb="http://www.facebook.com/2008/fbml">
<head>
<!-- Set the style-->
<style type="text/css" media="screen">
html, body { height:100%; }
body { margin:0; padding:0; overflow:auto; text-align:center;
background-color: #ffffff; }
</style>
<!-- Include support librarys first --> <script type="text/javascript" src="swfobject.js"></script>
<script type="text/javascript" src="jquery-1.4.4.js"></script>
<!-- Start Embed swf to the div target -->
<script type="text/javascript">
function init(){
swfContent();
function swfContent() {
//Show the SWF
$('#flashContent').append('<h1>You need at least Flash Player 9.0 to view this page.</h1><p><a href="http://www.adobe.com/go/getflashplayer"><img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" /></a></p>');
//A 'name' attribute with the same value as the 'id' is REQUIRED for Chrome/Mozilla browsers
swfobject.embedSWF("Main.swf", "flashContent", "955", "600", "9.0", null, null, null, {name:"flashContent"});
$(init);
</script>
</head>
<body>
<div id="flashContent"></div>
</body>
</html>
Maybe you are looking for
-
Does any-one perhaps know whether there's a voice recording app for ipad that shares directly via iMessage (not just email) - like voice memo does on iphone?
-
This is a problem I've been chasing, looking for a solution, since I registered my computer in January 2013. In spite of registering under about 5-6 different user IDs and passwords, I'm never able to get logged-in. I have disabled all security and a
-
How to assign maintenance view to a selection screen field in a program.
Hi Experts, I have created a custom table. Now, I have a program where there is a selection screen field for example "Load". After entering a value in the selection screen, and press enter, the user must be redirected to the maintenance view of the c
-
Unable to insert some special characters.
Hi, I am not able to insert some czech characters into the database. The problem is mainly seems to be due to the characterset. When I query the record, it displays some garbage characters or ? instead of (, ). Can anyone please suggest me a soluti
-
I need to use RTF on forms and reports
I need an RTF (Rich Text Format) text field, in wich I can copy and paste from other programs (like word), save on a db, and then print using a report. How can I do, please?