Home Tutorials Forums Articles Blogs Movies Library Employment Press
Old 01-17-2008, 11:11 PM   #1
Robin001
Registered User
 
Join Date: Jan 2008
Posts: 8
Default Very new to flex and have 2 questions

Hello Everybody,

I have 2 questions.
I should say that i'm very new to Flex 2 and pretty much when through the lynda training for beginners so i'm getting better and hope to learn lot more.. not alot of forums for flex...

question 1.
when you create an application for example, user information colletion form;
When you design the user form in html, you create a header.html, the footer.html and put pretty logs etc. my question, after creating the swf file, do you create a seprate html file to embed the application. I know when you compiles the application flex creates the html and you can run that but to add logos and the headers and the footers do you create that within the application or is that something seprate, do i need to create example dreamweaver to create the headers and the footers to make the page look good with logs and stuff...


question 2.
i was working through a tutorial and interested in doing someting different.
1. created a viewstack
2. created a label outside of viewstack
3. when someone clicks a button it runs a function.
4 the functions job is to change the text in the lable
5 my code seem to have some problems and need help understand with a fix.
error meg received:
duplicate funtion definition
incompatable override

any help you can give me would be greatly appreciated.
thanks


Code:
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="vertical">

<mx:Script>
	<![CDATA[
		
		private function inputscreen(): void
		{ 
			labtest.text = "test from function multi users";
			 }
			 
		private function multiuser(): void
		{ labtest.text = "from function and its mulitusers"; }

		private function onlinestore():void
		{ labtest.text = "from function and online store"; }
		
	]]>
</mx:Script>

<mx:Label text="headder" id="labtest" />
<mx:HBox>
	<mx:Button label="Online training" click="multiuser()" />
	<mx:Button label="Multi users" click="inputscreen()" />
	<mx:Button label="Online Store" click="onlinestore()" />
</mx:HBox>

		<mx:ToggleButtonBar dataProvider="vStack" />
		
	<mx:ViewStack id="vStack">
		
	<mx:VBox id="onlinetraining"
		label="Training"
		cornerRadius="20"
		borderStyle="soldi"
		height="150" width="200"
		backgroundColor="#ffffff"
		paddingLeft="10"
		paddingTop="10"  borderColor="#000000">
		
		<mx:HBox width="100%">
			<mx:Text text="Online Training" fontSize="19" width="75%" />	
		</mx:HBox> 
		
		<mx:Text width="100%" >
			<mx:text> 
				Learn the latest tools and techniques in 
				digital media, design, and development.
			</mx:text>
		</mx:Text>
	</mx:VBox>	
	
	
	
	<mx:VBox id="multiuser"
		label="Multiple Users"
		cornerRadius="20"
		borderStyle="solid"
		height="150" width="200"
		backgroundColor="#ffffff"
		paddingLeft="10"
		paddingTop="10" borderColor="#000000"
		paddingRight="10">
		<mx:HBox width="100%" borderColor="#000000" borderStyle="solid"	>
			<mx:Text width="75%" text="Multi-user Solutions" fontSize="19" />
		</mx:HBox>
		<mx:Text width="100%">
			<mx:text> Programs for organizations with moe then 5 people.</mx:text>	
		</mx:Text>
	</mx:VBox>
	
	<mx:VBox id="store"
		label="Store"
		cornerRadius="20"
		borderStyle="Solid"
		height="150" width="200"
		backgroundColor="#ffffff"
		paddingLeft="10"
		paddingTop="10">
		<mx:HBox width="100%">
			<mx:Text width="75%" text="Our Online Store" fontSize="19" />
		</mx:HBox>
		<mx:Text width="100%">
			<mx:text> Buy right from the web and never leave your home</mx:text>
		</mx:Text>
	</mx:VBox>
	
	</mx:ViewStack>	
	
</mx:Application>
Robin001 is offline   Reply With Quote
Old 01-18-2008, 04:13 AM   #2
jimmy5804
Member
 
Join Date: May 2007
Posts: 59
Default

You've got a component and a method both named "multiuser". The problem is that multiuser() can either be the private method you've defined or the constructor of the "multiuser" component. Rename the method or the component to something else and you're golden.
jimmy5804 is offline   Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 01:10 PM.

///
Follow actionscriptorg on Twitter

 


Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Ad Management plugin by RedTyger
Copyright 2000-2013 ActionScript.org. All Rights Reserved.
Your use of this site is subject to our Privacy Policy and Terms of Use.