با سلام دوستان
من مشکلی که دارم این که یه کد اندروید نوشتم درست هم کار میکنه
این از کد:
package com.example.myapp1;
import android.app.Activity;
import android.os.Bundle;
import android.view.View;
import android.widget.TextView;
public class MainActivity extends Activity
{
TextView textView;
//public int count = 0;
@Override
public void onCreate(Bundle bundle)
{
super.onCreate(bundle);
setContentView(R.layout.main);
textView = (TextView) findViewById(R.id.num);
textView.setText("0");
}
public void back(View view)
{
int count = 0;
count = Integer.parseInt(textView.getText().toString());
count++;
textView.setText(count+"");
}
}
این کد تمرینی صلوات شمار هستش که با جاوا نوشتمش
حالا همین رو دارم با اکشن اسکریپت 3 هم مینویسمش ولی درست در نمیاد
import flash.events.MouseEvent;
this.stop();
var num:int = 0;
_background.addEventListener(MouseEvent.CLICK,back groundclick);
function backgroundclick(event:MouseEvent)
{
num = toolsNumber.text;
num++;
}
متاسفانه درست کار نمیکنه یا اصلا بگم کار نمیکنه وقتی کلیک میخوره هیچی
چکار کنم
ممنون