Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Rendre visible un bouton checkbox après une interaction

Guest
Mar 01, 2016 Mar 01, 2016

Bonjour,

j'ai besoin de savoir comment appliquer dans mon animation l'affichage d'un checkbox après que l'utilisateur lit la totalité de la fiche mise sur le scrollpane. en AS3 .

Merci

TOPICS
ActionScript
528
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Mar 01, 2016 Mar 01, 2016

assign its visible property to true, or add it to the display using addChild().

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Mar 01, 2016 Mar 01, 2016

nn je veux que l’utilisateur visualise la totalité du fichier dans le ScrolPane après le bouton s'affiche.

Merci.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Mar 01, 2016 Mar 01, 2016

what file do you want displayed in the scrollpane?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Mar 01, 2016 Mar 01, 2016

text

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Mar 01, 2016 Mar 01, 2016

you can do that but a textarea is more suitable for display of text.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Mar 01, 2016 Mar 01, 2016

oui mais j'ai beaucoup de texte et peu d'espace de d'affichage donc je doit utiliser le ScrollPane, et j'ai besoin d'utiliser un boutton checkbox qui s'affiche a la fin pour passer au frame suivant.

Merci

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Mar 01, 2016 Mar 01, 2016

you can assign the source property of your scrollpane to be your textfield.

but if you're going to add more than 1 object to your scollpane (eg, a textfield and a checkbox), assign the source to be an empty movieclip and add children (eg, the texfield and checbox) to that movieclip.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Mar 01, 2016 Mar 01, 2016

j'ai esseyey d'ajouter le text et le checkbox  au Scollpane, mais j'ai besoin qu'apres que l'utilisateur clique sur le checkbox il passe au frame suivant voila un extrait du code:

import flash.events.MouseEvent;

import flash.display.MovieClip;

public class testNN extends MovieClip{

MovieClip (ScrollPane.content).btn.addEventListener(MouseEvent.CLICK, goForward);

function goForward(event:MouseEvent):void {

    MovieClip (CheckBox.content).nextFrame();

}

}

;

voila les erreurs :

Scene 1, Layer 'Layer 1', Frame 1, Line 71114: The public attribute can only be used inside a package.

Merci bien de m'aider a le realiser

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Mar 01, 2016 Mar 01, 2016

that's an improperly setup class file.  in addition, it's not clear what you should be using to reference your checkbox.

but this would work if you have a scrollpane and checkbox in your library:

package{

import flash.display.MovieClip;

import flash.events.MouseEvent;

import fl.containers.ScrollPane;

import fl.controls.CheckBox;

public class TestNN{

private var cb:CheckBox = new CheckBox();

private var sp:ScrollPane = new ScrollPane();

private var tf:TextField=new TextField();

private var parent:MovieClip = new MovieClip();

public function TestNN(){

addChild(sp);

sp.source =parent;

tf.text = 'whatever';

parent.addChild(tf);

parent.addChild(sp):

// assign x and y properties for tf and sp

sp.addEventListener(MouseEvent.CLICK,f);

}

private function f(e:MouseEvent):void{

trace(e);

}

}

}

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Mar 02, 2016 Mar 02, 2016

j'ai essayer j'ai cette erreur:

Scene 1, Layer 'Layer 1', Frame 1, Line 51083: Syntax error: package is unexpected.

Merci

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Mar 02, 2016 Mar 02, 2016
LATEST

you can't put that code on a timeline.  that's class code and must be placed in a class file.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines